write.impute: Write a snpStats object in IMPUTE format

Description Usage Arguments Value Author(s) Examples

Description

see write.simple for general information

Usage

1
write.impute(X, a1, a2, bp, fileroot, rs.id = NULL, snp.id = NULL)

Arguments

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

fileroot

Root of output file names. fileroot.gen and fileroot.sample will be created.

rs.id

vector of rs ids (if empty, will set to rownames(X))

snp.id

vector of snp ids (if empty, will set to S1...Sn)

Value

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

Author(s)

Chris Wallace

Examples

1
2
3
4
5
6
7
8
data(testdata,package="snpStats")
A.small <- Autosomes[1:6,1:10]
pf <- tempfile()

## write in suitable format for IMPUTE
nsnps <- ncol(A.small)
write.impute(A.small, a1=rep("1",nsnps), a2=rep("2",nsnps), bp=1:nsnps, fileroot=pf)
unlink(pf)

chr1swallace/snpStatsWriter documentation built on May 13, 2019, 6:20 p.m.