Description Usage Arguments Details Value Examples
Calculate genetic similarity among individuals (kinship matrix) from conditional genotype probabilities.
1 2 |
probs |
Genotype probabilities, as calculated from
|
type |
Indicates whether to calculate the overall kinship
( |
omit_x |
If |
use_allele_probs |
If |
quiet |
IF |
cores |
Number of CPU cores to use, for parallel calculations.
(If |
If use_allele_probs=TRUE
(the default), we first
convert the genotype probabilities are converted to allele
probabilities (using genoprob_to_alleleprob()
). This is
recommended, as then the result is twice the empirical kinship
coefficient (e.g., the expected value for an intercross is 1/2;
using genotype probabilities, the expected value is 3/8).
We then calculate sum_kl (p_ikl p_jkl) where k = position, l = allele, and i,j are two individuals.
For crosses with just two possible genotypes (e.g., backcross), we don't convert to allele probabilities but just use the original genotype probabilities.
If type="overall"
(the default), a matrix of
proportion of matching alleles. Otherwise a list with one matrix
per chromosome.
1 2 3 4 5 6 7 8 9 | grav2 <- read_cross2(system.file("extdata", "grav2.zip", package="qtl2geno"))
map <- insert_pseudomarkers(grav2$gmap, step=1)
probs <- calc_genoprob(grav2, map, error_prob=0.002)
K <- calc_kinship(probs)
# using only markers/pseudomarkers on the grid
grid <- calc_grid(grav2$gmap, step=1)
probs_sub <- probs_to_grid(probs, grid)
K_grid <- calc_kinship(probs_sub)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.