calc_genetic_sim: Calculate genetic similarity among individuals

Description Usage Arguments Details Value Examples

Description

Calculate genetic similarity among individuals from conditional genotype probabilities.

Usage

1
2
calc_genetic_sim(probs, use_grid_only = TRUE, omit_x = TRUE,
  use_allele_probs = TRUE, quiet = TRUE, n_cores = 1)

Arguments

probs

List of three-dimensional arrays of probabilities, as calculated from calc_genoprob.

use_grid_only

If TRUE and probs were calculated with stepwidth="fixed", reduce them to the grid using probs_to_grid.

omit_x

If TRUE, only use the autosomes.

use_allele_probs

If TRUE, assess similarity with allele probabilities (that is, first run genoprob_to_alleleprob); otherwise use the genotype probabilities.

quiet

IF FALSE, print progress messages.

n_cores

Number of CPU cores to use, for parallel calculations. (If 0, use detectCores.)

Details

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 like a 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.

Value

A matrix of proportion of matching alleles.

Examples

1
2
3
grav2 <- read_cross2(system.file("extdata", "grav2.zip", package="qtl2"))
probs <- calc_genoprob(grav2, step=1, error_prob=0.002)
sim <- calc_genetic_sim(probs)

simecek/qtl2 documentation built on May 29, 2019, 10:01 p.m.