write.mach: Write a snpStats object in mach format

Description Usage Arguments Value Author(s) Examples

Description

see write.simple for general information

Usage

1
2
3
4
  write.mach(X, a1, a2, pedfile, mfile,
    pedigree = rownames(X), member = rep(1, nrow(X)),
    father = rep(0, nrow(X)), mother = rep(0, nrow(X)),
    sex = rep("M", nrow(X)), snp.names = colnames(X))

Arguments

pedfile

Output pedigree file name.

mfile

Output marker file name.

pedigree

Optional pedigree/member/father/mother/sex indentifier vectors, same order as rows in snpStats object. If missing, pedigree is set to rownames(X) and the others default to unrelated males

member

See pedigree

father

See pedigree

mother

See pedigree

sex

See pedigree

snp.names

optional SNP names to include in the marker map file. Defaults to colnames(X).

X

SnpMatrix object

a1

vector of first allele at each SNP

a2

vector of second allele at each SNP

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
 9
10
data(testdata,package="snpStats")
A.small <- Autosomes[1:6,1:10]
pf <- tempfile()
mf <- tempfile()

## write in suitable format for MACH
nsnps <- ncol(A.small)
write.mach(A.small, a1=rep("1",nsnps), a2=rep("2",nsnps), pedfile=pf, mfile=mf)
unlink(pf)
unlink(mf)


Search within the snpStatsWriter package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.