View source: R/convert.variants.to.numeric.R
convert.variants.to.numeric | R Documentation |
Given a matrix or data frame with character ACGT SNP values, convert them to numeric values with the major allele coded as 0 and the minor allele as 1.
convert.variants.to.numeric(variants)
variants |
Data frame with four header columns. The SNPs must be in ACGT format in columns 5 through ncol(snps). |
This function is used before calling plot.alleles() to convert the SNPs into a numeric form suitable for plotting.
Data.frame of the same dimentions as the snps argument, but with the alleles converted to 0 or 1.
Daniel Gatti
data(example.snps)
numeric.snps = convert.variants.to.numeric(example.snps[1:100,])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.