transHapmap2numeric | R Documentation |
This function help users to transform genetic matrix from character format to numeric format. AA-0, Aa-1, aa-2, A is major allele and a is minor allele.
transHapmap2numeric(G)
G |
Genetic matrix of character, row represents sample and column represents SNP. |
0: AA
1: Aa
2: aa
A is major allele and a is minor allele
A matrix for genotypic data in numeric format.
Qian Cheng, Shuqin Jiang, Xiangfeng Wang
## Not run! ## load hapmap data (genomic data) of MZ hybrids data(MZ) ## pre-process for input of transHapmap2numeric rownames(MZ) <- MZ[,1] MZ <- MZ[,-c(1:11)] MZ.t <- t(MZ) ## conversion MZ.n <- transHapmap2numeric(MZ.t) dim(MZ.t)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.