Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

compare_geno

Compare individuals' genotype data


Description

Count the number of matching genotypes between all pairs of individuals, to look for unusually closely related individuals.

Usage

compare_geno(cross, omit_x = FALSE, proportion = TRUE, quiet = TRUE, cores = 1)

Arguments

cross

Object of class "cross2". For details, see the R/qtl2 developer guide.

omit_x

If TRUE, only use autosomal genotypes

proportion

If TRUE (the default), the upper triangle of the result contains the proportions of matching genotypes. If FALSE, the upper triangle contains counts of matching genotypes.

quiet

IF FALSE, print progress messages.

cores

Number of CPU cores to use, for parallel calculations. (If 0, use parallel::detectCores().) Alternatively, this can be links to a set of cluster sockets, as produced by parallel::makeCluster().

Value

A square matrix; diagonal is number of observed genotypes for each individual. The values in the lower triangle are the numbers of markers where both of a pair were genotyped. The values in the upper triangle are either proportions or counts of matching genotypes for each pair (depending on whether proportion=TRUE or =FALSE). The object is given class "compare_geno".

Examples

grav2 <- read_cross2(system.file("extdata", "grav2.zip", package="qtl2"))
cg <- compare_geno(grav2)
summary(cg)

qtl2

Quantitative Trait Locus Mapping in Experimental Crosses

v0.24
GPL-3
Authors
Karl W Broman [aut, cre] (<https://orcid.org/0000-0002-4914-6671>), R Core Team [ctb]
Initial release
2020-12-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.