7 months ago by

University College London Cancer Institute

Yes, when the numbers are unequal in this way, you will see many more genes passing your FDR Q value threshold. I faced this situation 2 years ago but for even more extreme/unequal sample distributions. I think that it's reasonable to use difference thresholds for each comparison.

Here is some code that allows you to visually check how FDR affects different comparisons by showing how many significant variables remain at each level of FDR - it also gives the nominal P-value equivalent at each FDR. in this way, you can choose a good cut-off.

```
options(scipen=999)
topT <- as.data.frame(AVsControl)
AVsControl.pvalues <- topT$pvalue[!is.na(topT$pvalue)]
#5% FDR
alpha <- 0.05
AVsControl.cutoff0.05 <- max(topT$pvalue[topT$padj<alpha], na.rm=TRUE)
#1% FDR
alpha <- 0.01
AVsControl.cutoff0.01 <- max(topT$pvalue[topT$padj<alpha], na.rm=TRUE)
```

et cetera...

```
pdf("RankPValue.pdf")
par(mar=c(5,8,5,8), cex=0.8, cex.main=0.8, cex.lab=0.8, cex.axis=0.8, mfrow=c(1,2))
#A versus Control
orderInPlot <- order(AVsControl.pvalues)
showInPlot <- (AVsControl.pvalues[orderInPlot] <= 0.05)
alpha <- 0.05
if (any(showInPlot))
{
plot(seq(along=which(showInPlot)), AVsControl.pvalues[orderInPlot][showInPlot], type="l", pch=".", main=paste("Significance cut-off @ 5% FDR = \n", round(AVsControl.cutoff0.05,9)), xlab=expression(paste("Rank ", italic("P"), " value (num. sig. genes)")), ylab=expression(paste(italic("P"), " value")))
abline(a=0, b=alpha/length(AVsControl.pvalues), col="red3", lwd=1)
}
orderInPlot <- order(AVsControl.pvalues)
showInPlot <- (AVsControl.pvalues[orderInPlot] <= 0.01)
alpha <- 0.01
if (any(showInPlot))
{
plot(seq(along=which(showInPlot)), AVsControl.pvalues[orderInPlot][showInPlot], type="l", pch=".", main=paste("Significance cut-off @ 1% FDR = \n", round(AVsControl.cutoff0.01,9)), xlab=expression(paste("Rank ", italic("P"), " value (num. sig. genes)")), ylab=expression(paste(italic("P"), " value")))
abline(a=0, b=alpha/length(AVsControl.pvalues), col="red3", lwd=1)
}
dev.off()
```