Learn R Programming

gtx (version 0.0.3)

read.snpdata.mach: Read genotype dosages in the format output by MACH

Description

Reads snp coding information and genotype data from paired .mlinfo and .mldose files, as generated by the MACH and minimac genotype imputation programs, and returns the data in a standard format (see snpdata) that can be used by other functions in this package.

Usage

read.snpdata.mach(fileroot, tol.af = 0.01, phenotypes = NULL)

Arguments

fileroot
a filename root to which .mlinfo and .mldose extensions will be appended.
tol.af
a tolerence for checking allele frequencies between the two files read.
phenotypes
if not NULL, a data frame of phenotypes to be merged with the genotypes; must contain a column called MACHID which is used to match against the first column of the mldose file.

Value

  • Returns a list with snpinfo and data slots, see snpdata.

Details

This function will (just) work as is with HapMap imputed single chromosomes and 4000 individuals. Need to comment on how to extract large numbers of SNPs before feeding to R.

References

Information about the MACH and minimac programs for genotype imputation, including their output formats, can be found at http://www.sph.umich.edu/csg/abecasis/MACH.