add_threshold: Add thresholds to genome scan plot

Description Usage Arguments Value Examples

View source: R/add_threshold.R

Description

Draw line segments at significance thresholds for a genome scan plot

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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)

Example output



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