View source: R/find_unique_geno.R
find_unique_geno | R Documentation |
For genotype data (markers x individuals) on a set of individuals, find the unique genotypes for each marker, provided that there are exactly two. (If more than two or fewer than two, return NAs.)
find_unique_geno(genotypes, na.strings = c("N", "H", "NA", ""), cores = 1)
genotypes |
Matrix of genotypes (markers x individuals) |
na.strings |
Genotypes to be considered as missing values. |
cores |
Number of CPU cores to use, for parallel calculations.
(If |
Matrix with two columns. Each row corresponds to a marker,
and has the two unique genotypes, or NA
s (if >2 or <2 unique
genotypes).
count_unique_geno()
, encode_geno()
g <- rbind(c("NA", "A", "A", "A", "T"),
c("NA", "NA", "NA", "A", "A"),
c("A", "A", "T", "G", "G"),
c("C", "C", "G", "G", "NA"))
ug <- find_unique_geno(g)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.