Learn R Programming

snpStatsWriter (version 1.5-6)

write.impute: Write a snpStats object in IMPUTE format

Description

see write.simple for general information

Usage

write.impute(X, a1, a2, bp, pedfile, snp.id = NULL)

Arguments

pedfile
Output file name.
snp.id
vector of snp ids
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]
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, pedfile=pf)
unlink(pf)

Run the code above in your browser using DataLab