stepwiseStats: Extract QTL statistics from R/qtl models

Description Usage Arguments Details Value Author(s) References Examples

View source: R/stepwiseStats.R

Description

Takes a model generated by stepwiseQTL or manually model building in R/qtl, parses out several statistics and QTL confidence intervals, then returns a dataframe where each line is a term in the QTL model

Usage

1
stepwiseStats(cross, model.in, phe, covar = NULL, ci.method = "drop", drop = 1.5, prob = 0.95, plot = FALSE, printout = TRUE)

Arguments

cross

R/qtl cross object

model.in

R/qtl model object. Must be made with keepLodProfile=TRUE.

phe

Phenotype name corresponding the R/qtl model object

covar

Required if covar was specified in QTL model generation. Can only be an additive covariate. If not used in the multiple QTL model, ignored.

ci.method

Method to calculate confidence intervals. Must be either "drop" or "bayes", which invokes R/qtl functions lodint or bayesint respectively.

drop

If ci.method=drop, indicates parameter of lodint; otherwise ignored.

prob

If ci.method=bayes, indicates parameter of bayes; otherwise ignored.

plot

Logical. If true, plot the lodProfile.

printout

Currently ignored

Details

Currently implemented only for F2, Ril and Backcross populations. Statistics are generated with R/qtl's fitqtl function, getting estimates for QTL effects and dropone QTL ANOVA effects. Where a single QTL model is given, the QTL effects are extracted from the whole-model ANOVA table. For F2 populations, dominance effects are also calculated.

Value

A dataframe with the following column names: "phenotype", "chromosome", "position", "df", "type3SS", "LOD", "perc.var", "Fstat","P.chi2", "P.F", "effect.estimate", "effect.SE", "effect.t", "lowCImarker","hiCImarker", "lowCIpos", "hiCIpos". The lowCImarker column indicates the marker/pseudomarker bounding the lower limit of the confidence interval (at lowCIpos cM). The hiCImarker column indicates the marker/pseudomarker bounding the upper limit of the confidence interval (at hiCIpos cM). For F2 populations, the effect estimates, standard errors and t-statistics generated by the "get.ests" argument of R/qtl's fitqtl function ("effect.estimate", "effect.SE", "effect.t", respectively) are split into additive and dominance components with the following column names: "est.dom", "SE.dom", "t.dom", "est.add", "SE.add", "t.add".

Author(s)

John T. Lovell

References

Lovell et al. (2015) Exploiting differential gene expression and epistasis to discover candidate genes for drought-associated QTLs in Arabidopsis thaliana. The Plant Cell: Vol. 27: 969<e2><80><93>983

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
library(qtl)
library(plyr)
#use the multitrait dataset first
data(multitrait)
cross <- multitrait
qtlphes<-phenames(cross)[1:8]
cross <- calc.genoprob(cross, step=2.5)
modelList<-lapply(qtlphes, function(x) {
  stepwiseqtl(cross, penalties=c(3,4,3),max.qtl=3, pheno.col=x, method="hk", keeptrace=TRUE, verbose=FALSE, keeplodprofile=TRUE)
})
names(modelList)<-qtlphes

stepParsed<-lapply(qtlphes, function(x){
  stepwiseStats(cross, model.in= modelList[[x]], phe=x, covar=NULL, ci.method="drop", drop=1.5, plot=FALSE, printout=TRUE)
})
statsDF<-ldply(stepParsed, data.frame)
statsDF

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