compare_genoprob: Compare two sets of genotype probabilities

Description Usage Arguments Details Value See Also Examples

View source: R/compare_genoprob.R

Description

Compare two sets of genotype probabilities for one individual on a single chromosome.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
compare_genoprob(
  probs1,
  probs2,
  cross,
  ind = 1,
  chr = NULL,
  minprob = 0.95,
  minmarkers = 10,
  minwidth = 0,
  annotate = FALSE
)

Arguments

probs1

Genotype probabilities (as produced by calc_genoprob()) or allele dosages (as produced by genoprob_to_alleleprob()).

probs2

A second set of genotype probabilities, just like probs1.

cross

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

ind

Individual to plot, either a numeric index or an ID.

chr

Selected chromosome; a single character string.

minprob

Minimum probability for inferring genotypes (passed to maxmarg()).

minmarkers

Minimum number of markers in results.

minwidth

Minimum width in results.

annotate

If TRUE, add some annotations to the geno1 and geno2 columns to indicate, where they differ, which one matches what appears to be the best genotype. (* = matches the best genotype; - = lower match).

Details

The function does the following:

Value

A data frame with each row corresponding to an interval over which probs1 and probs2 each have a fixed inferred genotype. Columns include the two inferred genotypes, the start and end points and width of the interval, and when founder genotypes are in cross, the proportions of SNPs where the individual matches each possible genotypes.

See Also

plot_genoprobcomp()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
iron <- read_cross2(system.file("extdata", "iron.zip", package="qtl2"))
iron <- iron[1,"2"]   # subset to first individual on chr 2
map <- insert_pseudomarkers(iron$gmap, step=1)

# in presence of a genotyping error, how much does error_prob matter?
iron$geno[[1]][1,3] <- 3
pr_e <- calc_genoprob(iron, map, error_prob=0.002)
pr_ne <- calc_genoprob(iron, map, error_prob=1e-15)

compare_genoprob(pr_e, pr_ne, iron, minmarkers=1, minprob=0.5)

qtl2 documentation built on Oct. 18, 2021, 1:06 a.m.