Learn R Programming

snpStatsWriter (version 1.5-6)

write.snphap: Write SNPHAP files

Description

Simple wrapper to write.simple to write files in SNPHAP format

Usage

write.snphap(X, a1 = NULL, a2 = NULL, file)

Arguments

X
SnpMatrix object
a1
vector of first allele at each SNP
a2
vector of second allele at each SNP
file
Output file name.

Value

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

Details

If not allele codes are given, a1 and a2 will be set to 1 and 2 for all SNPs

Examples

Run this code
data(testdata,package="snpStats")
A.small <- Autosomes[1:6,1:10]
f <- tempfile()
## write in suitable format for snphap
write.snphap(A.small, file=f)
unlink(f)

Run the code above in your browser using DataLab