Learn R Programming

snpStatsWriter (version 1.5-6)

write.phase: Write a snpStats object in PHASE/FastPHASE format

Description

see write.simple for general information

Usage

write.phase(X, a1 = rep(1, ncol(X)), a2 = rep(2, ncol(X)), bp = NULL, file)

Arguments

file
Output file name.
X
SnpMatrix object
a1
vector of first allele at each SNP
a2
vector of second allele at each SNP
bp
vector of base pair positions for each SNP

Value

No return value, but has the side effect of writing specified output files.

Examples

Run this code
data(testdata,package="snpStats")
A.small <- Autosomes[1:6,1:10]
f <- tempfile()

## write in suitable format for PHASE
nsnps <- ncol(A.small)
write.phase(A.small, file=f)
unlink(f)

Run the code above in your browser using DataLab