Learn R Programming

QTLRel (version 0.2-9)

lodci: Estimate LOD Support Intervals

Description

Estimate LOD support intervals.

Usage

lodci(llk,cv=0,lod=1.5,drop=3)

Arguments

llk
a data frame with components (chr, dist, y, ...), where "chr" is the chromosome on which the scanning locus is located, "dist" is the genetic or physical position of the scanning locus, and "y" is the test statistic.
cv
threshold. Reported support intervals cover at least one scanning locus where llk$y > cv.
lod
lod (1.5 by default) LOD support intervals are reported when llk$y is converted to LOD score.
drop
3 by default. See "details".

Value

  • A data frame with the following components:
  • chrthe chromosome
  • lowerthe lower bound
  • upperthe upper bound
  • indexindicates which scanning loci

Details

In case of multiple peaks on a chromosome, a peak has to satisfy: a) above the threshold cv; b) drops, e.g., 3 LOD on both sides except chromosome ends. So if two peaks close to each other but LOD between them doesn't drop, e.g., 3 LOD, only one of them is considered.

Examples

Run this code
data(miscEx)

# impute missing genotypes
gdtmp<- (gdat=="AA") + (gdat=="AB")*2 + (gdat=="BB")*3
   gdtmp<- replace(gdtmp,is.na(gdtmp),0)
# run 'genoProb'
prDat<- genoProb(gdat=gdtmp, gmap=genMap, step=Inf,
   gr=2, method="Haldane", verbose=TRUE)
y<- rnorm(20)
x<- matrix(1,nrow=20,ncol=1)
v<- cov(matrix(rnorm(500*20),ncol=20))
# estimate variance components
o<- estVC(y, x, v = list(AA=v,DD=NULL,HH=NULL,AD=NULL,
   MH=NULL,EE=diag(20)))

# genome scan
gcv<- v*o$par["AA"]
llk.hk<- scanOne(y=y, x=x, vc=gcv, prdat=prDat)

# extract LOD support intervals
tmp<- data.frame(y=llk.hk$p,chr=llk.hk$chr,dist=llk.hk$dist)
lodci(tmp, cv=5, lod=1.5, drop=3)

Run the code above in your browser using DataLab