compare_genoprob {qtl2} | R Documentation |
Compare two sets of genotype probabilities
Description
Compare two sets of genotype probabilities for one individual on a single chromosome.
Usage
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 |
probs2 |
A second set of genotype probabilities, just like |
cross |
Object of class |
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 |
minmarkers |
Minimum number of markers in results. |
minwidth |
Minimum width in results. |
annotate |
If TRUE, add some annotations to the |
Details
The function does the following:
Reduce the probabilities to a set of common locations that also appear in
cross
.Use
maxmarg()
to infer the genotype at every position using each set of probabilities.Identify intervals where the two inferred genotypes are constant.
Within each segment, compare the observed SNP genotypes to the founders' genotypes.
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
Examples
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)