cameraPR() non directional test
1
0
Entering edit mode
Hugo Varet ▴ 80
@hugo-varet-6301
Last seen 22 hours ago
France

Dear all,

I would like to use cameraPR() to test for the enrichment of some gene-sets (e.g. KEGG, GO, Reactome...) without specifying any direction as some genes can be up and others down within the same gene-set. According to the CAMERA's paper (http://nar.oxfordjournals.org/content/early/2012/05/24/nar.gks461.full) we can test for "non-directional" gene sets using the absolute log(FC) as statistic and I was wondering whether I could use this (or absolute t-statistic) with cameraPR(). For instance with this code:

y <- matrix(rnorm(1000*6),1000,6)
design <- cbind(Intercept=1,Group=c(0,0,0,1,1,1))
# First set of 20 genes are genuinely differentially expressed (up)
index1 <- 1:20
y[index1,4:6] <- y[index1,4:6]+1
# Second set of 20 genes are not DE
index2 <- 21:40
# Third set of 20 genes are down
index3 <- 41:60
y[index3,4:6] <- y[index3,4:6]-1
# fit model
fit <- eBayes(lmFit(y, design))
cameraPR(abs(fit$t[,2]), list(set1=index1, set2=index2, set3=index3), 
         inter.gene.cor=0.01, use.ranks=FALSE)
#     NGenes Direction      PValue         FDR
#set1     20        Up 0.002350959 0.007052876
#set2     20      Down 0.719682160 0.719682160
#set3     20        Up 0.025908100 0.038862150

In the output set3 appears to be "Up" as its genes' t-statistics are at the top of the list. Would this approach be correct?

Thanks for your help, best regards,

Hugo

CAMERA GeneSetEnrichment • 88 views
ADD COMMENT
0
Entering edit mode
@gordon-smyth
Last seen 6 hours ago
WEHI, Melbourne, Australia

Yes, you can still do non-directional tests using cameraPR(), but it's not quite as easy as it was using the original camera() function as it was in 2012 because we no longer output the one-sided p-values for each gene set. We now output the two-sided p-values only, in order to simplify the output.

If you input absolute t-statistics (recommended) or absolute logFC as the statistic, then you should set use.ranks=TRUE in the call to cameraPR(). You also need to convert the two-sided p-values back to upper-tail p-values by:

PValue <- out$PValue / 2
Dn <- out$Direction == "Down"
PValue[Dn] <- 1 - PValue[Dn]
FDR <- p.adjust(PValue, method="BH")

where out is the output from cameraPR().

In the next version of limma (3.64.0), I will add in a directional argument to camera() and cameraPR() to make non-directional tests easier by setting directional=FALSE.

ADD COMMENT

Login before adding your answer.

Traffic: 557 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6