add_threshold: Add thresholds to genome scan plot

View source: R/add_threshold.R

add_thresholdR Documentation

Add thresholds to genome scan plot

Description

Draw line segments at significance thresholds for a genome scan plot

Usage

add_threshold(map, thresholdA, thresholdX = NULL, chr = NULL, gap = NULL, ...)

Arguments

map

Marker map used in the genome scan plot

thresholdA

Autosomal threshold. Numeric or a list. (If a list, the "A" component is taken to be thresholdA and the "X" component is taken to be thresholdX.)

thresholdX

X chromosome threshold (if missing, assumed to be the same as thresholdA)

chr

Chromosomes that were included in the plot

gap

Gap between chromosomes in the plot. Default is 1% of the total genome length.

...

Additional arguments passed to graphics::segments()

Value

None.

Examples

iron <- read_cross2(system.file("extdata", "iron.zip", package="qtl2"))

map <- insert_pseudomarkers(iron$gmap, step=5)
probs <- calc_genoprob(iron, map, error_prob=0.002)
Xcovar <- get_x_covar(iron)
out <- scan1(probs, iron$pheno[,1], Xcovar=Xcovar)
# run just 3 permutations, as a fast illustration
operm <- scan1perm(probs, iron$pheno[,1], addcovar=Xcovar,
                   n_perm=3, perm_Xsp=TRUE, chr_lengths=chr_lengths(map))

plot(out, map)
add_threshold(map, summary(operm), col="violetred", lty=2)

qtl2 documentation built on May 29, 2024, 11:46 a.m.