find_consensus_geno {qtl2convert} | R Documentation |
Find the consensus genotype for each row of a genotype matrix
Description
For genotype data (markers x individuals) on a set of individuals from a single inbred line, find the consensus genotype at each marker.
Usage
find_consensus_geno(genotypes, na.strings = c("N", "H", "NA", ""), cores = 1)
Arguments
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 |
Value
Vector of consensus genotypes, one value per row of genotypes
See Also
find_unique_geno()
, encode_geno()
Examples
g <- rbind(c("NA", "N", "A", "A", "T", "G", NA, "H"),
c("C", "C", "G", "G", "A", NA, NA, NA),
rep(NA, 8),
c("C", "C", "G", "G", "G", "C", "G", "G"))
consensus <- find_consensus_geno(g)
[Package qtl2convert version 0.30 Index]