segmentsOnPeaks: Single QTL confidence intervals on LOD curves

Description Usage Arguments Examples

Description

segmentsOnPeaks Overlay confidence intervals onto a LOD plot, from as either plotLodProfile or plot.scanone.

Usage

1
2
3
4
segmentsOnPeaks(cross, calcCisOutput = NULL, ci.chr = NULL,
  peak = NULL, l = NULL, h = NULL, s1.output = NULL, mod = NULL,
  showallchr = FALSE, chr = NULL, pt.pch = 8, pt.cex = 0.8,
  pt.col = "red", int.y = 0, ...)

Arguments

cross

R/qtl cross object

calcCisOutput

The output from qtlTools::calcCis. If this is not supplied, ci.chr, peak, l, h must be. If calcCisOutput, these arguments are ignored

ci.chr

vector of chromosomes for segments

peak

vector of QTL peak positions (cM) for segments

l

vector of QTL lower confidence interval bounds (cM) for segments

h

vector of QTL upper confidence interval bounds (cM) for segments

s1.output

If plotting on a scanone LOD plot, provide the scanone object used previously.

mod

If plotting on lodProfile, pass the qtl model object that was input into plotLodProfile

showallchr

Must match call to plotLodProfile if qtl is specified

chr

If plotting on a specified set of chromosomes via scanone, replicate the chr call here.

pt.pch

pch parameter to points

pt.cex

cex parameter to points

pt.col

color parameter to points

int.y

the y intercept of the segments

...

additional parameters passed to segments, e.g. col, lty, etc.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
## Not run: 
library(qtlTools)
data(fake.bc)
cross<-fake.bc
cross <- calc.genoprob(cross, step=2.5)

# Make a QTL object and formula
mod <- makeqtl(cross, chr = c(2,5), pos = c(40,25), what = "prob")
sex <- data.frame(sex = cross$phe$sex)
nform <- "y ~ Q1 + Q2 + Q1*sex + sex"
#Calculate lodprofiles for confidence interval estimation
mod <- refineqtl(cross, mod, pheno.col = "pheno1",
                 qtl = mod, formula = nform, covar = sex, method="hk")

cis<-calcCis(mod)
plotLodProfile(mod, showallchr=FALSE)
segmentsOnPeaks(cross, qtl = mod, calcCisOutput = cis,  showallchr=FALSE)

plotLodProfile(mod, showallchr=TRUE)
segmentsOnPeaks(cross, qtl = mod, calcCisOutput = cis, showallchr=TRUE)
cis<-calcCis(mod, drop = 3)
segmentsOnPeaks(cross, qtl = mod, calcCisOutput = cis, showallchr=TRUE,
   col = "purple", int.y=.5)

s1<-scanone(cross, method="hk", pheno.col="pheno1")
perm<-scanone(cross, n.perm=100, method="hk",pheno.col="pheno1", verbose=FALSE)
cis<-calcCis(s1.output=s1, perm.output=perm)
plot(s1)
segmentsOnPeaks(cross, s1.output=s1, calcCisOutput = cis)
plot(s1, chr = c(2,5))
segmentsOnPeaks(cross, s1.output=s1, calcCisOutput = cis, chr = c(2,5))

## End(Not run)

jtlovell/qtlTools documentation built on May 20, 2019, 3:14 a.m.