write.snphap: Write SNPHAP files

Description Usage Arguments Details Value Author(s) Examples

View source: R/write.R

Description

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

Usage

1
  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.

Details

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

Value

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

Author(s)

Chris Wallace

Examples

1
2
3
4
5
6
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)

snpStatsWriter documentation built on May 2, 2019, 5:41 a.m.