an R package to estimate FDR in sequential genome scans

It extends the Multiple Interval Mapping (MIM) procedure (implemented in QTL Cartographer) for expression QTL (eQTL) analysis. In spite of the name, it can work with other sequential genome scan methods besides MIM, and other QTL mapping studies which include thousands of traits.

downloads


install and load

R CMD install MIM.eQTL_0.1.tar.gz -l Rlib
'Rlib' is the destiny folder to install the package. It is possible to put the directory 'Rlib' into the library search path of R by changing the .Rprofile file in the home directory. Or we can just type

.libPaths('\Rlib')

in R. Then the library can be loaded by

library(MIM.eQTL)

Besides the documentation, I think the following 2 examples might help understand the procedure.

Example 1

# load data
data(gs.test,gs.null);

# 'gs.test' contains all LR test statistics from MIM applied to the Brem's yeast data.
# We claimed 5182 QTL for 3367 expression traits with FDR 8%.
# Among them, there are 1242 traits with 2 or more QTL. #

test<-gs.test;
# 'null' contains all null statistics from permutation tests
null<-gs.null;

# estimating p0.
p <- getP0 (test,null,p0.method="efron",p0.quantile=0.25);
#find locfdr for each qtl
f <- find.locfdr (test, null, P0=p);
test <- attach.locfdr(test,f);
# estimate fdr among all positive findings
result <- compute.FDR(test);


Example 2

data(o.test,o.null,m.test,m.null,r.test,r.null);

# replication and modification of John storey's method as published in Plos biology Aug 2005.

# Using F statistics from 2 cycles of sequential genome scans using storey's original method; null statistics are obtained using Churchill's 1994 and 1996 method;
test <- o.test;
null <- o.null;

# Or, using F statistics from M2 that contains only main effects;
test <- m.test;
null <- m.null;

# Or, using F statistics from the restricted search, comparing M2 vs M1 only if F statistic of the the first QTL is larger than 13.94.

test <- r.test;
null <- r.null;

p <- getP0 (test,null, p0.method ="storey");
f <- find.locfdr (test, null, P0=p);
test <- attach.locfdr(test,f);
result <- find.QTL (test,FDR=0.1,n.QTL=2);