encode_geno | R Documentation |
Encode a matrix of genotypes using a set of allele codes.
encode_geno(
geno,
allele_codes,
output_codes = c("-", "A", "H", "B"),
cores = 1
)
geno |
Character matrix of genotypes (rows as markers, columns as individuals) |
allele_codes |
Two-column matrix of alleles (rows as markers) |
output_codes |
Vector of length four, with missing, AA, AB, BB codes |
cores |
Number of CPU cores to use, for parallel calculations.
(If |
Matrix of same dimensions as geno
, but with values in output_codes
.
find_consensus_geno()
, find_unique_geno()
geno <- rbind(c("C", "G", "C", "GG", "CG"),
c("A", "A", "AT", "TA", "TT"),
c("T", "G", NA, "GT", "TT"))
codes <- rbind(c("C", "G"), c("A", "T"), c("T", "G"))
geno_encoded <- encode_geno(geno, codes)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.