read.impute: Read genotypes imputed by the IMPUTE2 program

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/indata.R

Description

The IMPUTE2 program generates, for each SNP and each subject, posterior probabilities for the three genotypes. This function reads such data as a SnpMatrix object, storing the posterior probabilities to as much accuracy allowed by a one-byte coding

Usage

1
read.impute(file, rownames = NULL, nsnp = NULL, snpcol = 2)

Arguments

file

The input file name. This file my be gzipped.

rownames

The row names for the output object. Note that these correspond to groups of three columns in the input file. If not supplied, names are generated as Sample1, Sample2 etc.

nsnp

The number of SNPs to be read in. This corresponds with the number of lines in the input file. If not supplied, the function does a preliminary pass to determine the number of lines

snpcol

Which column of the input will be used as the SNP name. Default is column 2

Details

No provision is made for data for the X chromosome. Such data must be first read as a SnpMatrix and subsequently coerced to an XSnpMatrix object

Value

an object of class SnpMatrix

Author(s)

David Clayton dc208@cam.ac.uk

See Also

SnpMatrix-class

Examples

1
##---- No example available yet

Example output

Loading required package: survival
Loading required package: Matrix

snpStats documentation built on Nov. 8, 2020, 10:59 p.m.