imputeRob: 'Create imputeR object. '

Description Usage Arguments Details Value Examples

View source: R/load_data.R

Description

A method for TasselHDF5 object. Recode it into '0, 1, 2' format.

Usage

1
imputeRob(h5, missingcode = 3)

Arguments

h5

TasselHDF5 object.

missingcode

The code for missing data point. Default=3.

Details

In the genotype file, '0, 1, 2' indicate the copy of alternative allele; Missingcode (default='3') indicates missing data. This function also calculate individual and locus missing rate.

Value

return "Geno4imputeR" object with three slots: "genomx", "info", "imiss". "genomx", genotype matrix. "info", loci information, including SNP ID (snpid), chr, position (pos), loci missing rate (lmiss), minor allele freq (maf). "imiss", individual plant missing rate.

See https://github.com/yangjl/imputeR/blob/master/vignettes/imputeR-vignette.pdf for more details.

Examples

1
2
3
4
5
# note this function requires at least 100G memeory to load teo.h5 file.
teo <- initTasselHDF5("largedata/teo.h5", version="5")
teo <- loadBiallelicGenotypes(teo, verbose = TRUE)
 #reformat to imputeR object
ob1 <- imputeRob(h5=teo, missingcode=3)

yangjl/imputeR documentation built on May 4, 2019, 2:28 p.m.