calc_het | R Documentation |
Calculate heterozygosites, by individual or by marker
calc_het(probs, by = c("individual", "marker"), omit_x = TRUE, cores = 1)
probs |
List of arrays of genotype probabilities, as
calculated by |
by |
Whether to summarize by individual or marker |
omit_x |
If TRUE, omit the X chromosome. |
cores |
Number of CPU cores to use, for parallel calculations.
(If |
calc_het()
looks at the genotype names (the 2nd
dimension of the dimnames of the input probs
), which must be
two-letter names, and assumes that when the two letters are
different it's a heterozygous genotype while if they're the
same it's a homozygous genotype
The result is a vector of estimated heterozygosities
calc_raw_het()
, calc_geno_freq()
iron <- read_cross2(system.file("extdata", "iron.zip", package="qtl2"))
p <- calc_genoprob(iron, err=0.002)
# heterozygosities by individual
het_ind <- calc_het(p)
# heterozygosities by marker
het_mar <- calc_het(p, "marker")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.