genoClasses2genoDoses | R Documentation |
Convert SNP genotypes from "genotypic classes" into "allele doses" by counting the number of minor alleles. The code is not particularly efficient, but at least it exists.
genoClasses2genoDoses(
x,
na.string = "--",
snpIDs1stCol = TRUE,
errorIfNotBi = TRUE,
verbose = 1
)
x |
matrix or data.frame with bi-allelic SNPs in rows and genotypes in columns |
na.string |
a character to be interpreted as NA values |
snpIDs1stCol |
indicates if the SNP identifiers are in the first column; otherwise they should be in the row names |
errorIfNotBi |
raises an error if a SNP is not bi-allelic; otherwise, raises a warning and set the SNP genotypes to missing |
verbose |
verbosity level (0/1) |
list of a matrix of allele doses with SNPs in columns and genotypes in rows, and a matrix with major and minor alleles
Timothee Flutre
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.