SNP2Geno {SimHap}R Documentation

Convert biallelic SNP data to genotype count data

Description

Converts biallelic SNP data to the format required by SNP analysis functions

Usage

SNP2Geno(geno, baseline)

Arguments

geno A data frame containing biallelic SNP data. The first column should contain a subject identifier. The remaining columns should each represent a biallelic SNP, containing two alleles per entry with no separator.
baseline A vector of character strings representing the 'wildtype' genotype.

Details

SNP2Geno uses baseline to recode biallelic SNP data into a series of columns representing genotype counts under additive, dominant and recessive models. The genotype specified as the wildtype will always be recoded as 0. Under an additive model, the heterozygote is recoded as 1 and the minor homozygote is recoded as 2. Under a dominant model, both the heterozygote and minor homozygote are recoded as 1, and under a recessive model, the heterozygote is recoded as 0 and the minor homozygote is coded as 1.

Value

SNP2Geno returns a data frame whose first column is a subject identifier. The remaining columns comprise 3 per SNP where the first is recoded under an additive model, the second is recoded under a dominant model and the third is recoded under a recessive model.

Author(s)

Pamela A. McCaskie

See Also

SNP2Haplo

Examples


data(SNP.dat)
geno.dat <- SNP2Geno(SNP.dat, baseline=c("MM", "11", "GG", "CC"))


[Package SimHap version 1.0.0 Index]