Question: The best test for the two conditional problem.
1
unique37970 wrote:

Dear all,

I am wondering which test is suitable for my case (i have two condition i.e. C (3 replicates) and T (3 replicates)) and what is basically makes difference between "Wald" and "LRT" test implemented in DESeq2. I tested both with my dataset but was surprised when i end up with much differences in terns of DE tags. Then i tested with example dataset and found there is really differences in both tests.

here i m presenting both tests using example of deseq and got differences in terms of DE tags:

``````# count tables from RNA-Seq data
cnts <- matrix(rnbinom(n=1000, mu=100, size=1/0.5), ncol=10)
cond <- factor(rep(1:2, each=5))
cond
# object construction
dds <- DESeqDataSetFromMatrix(cnts, DataFrame(cond), ~ cond)
# standard analysis (Default Wald test)
dds <- DESeq(dds)

res <- results(dds)

sum(na.omit(res\$pvalue <= 0.05))
###7
sum(na.omit(res\$pvalue <= 0.05 & abs(res\$log2FoldChange) >= 1))
###4
sum(na.omit(res\$pvalue <= 0.05 & abs(res\$log2FoldChange) >= 1.5))
###0
###0
sum(na.omit(res\$padj <= 0.05 & abs(res\$log2FoldChange) >= 1))
###0
sum(na.omit(res\$padj <= 0.05 & abs(res\$log2FoldChange) >= 1.5))
###0

# an alternate analysis: likelihood ratio test
ddsLRT <- DESeq(dds, test="LRT", reduced= ~ 1)

resLRT <- results(ddsLRT)

sum(na.omit(resLRT\$pvalue <= 0.05))
###7
sum(na.omit(resLRT\$pvalue <= 0.05 & abs(resLRT\$log2FoldChange) >= 1))
###7
sum(na.omit(resLRT\$pvalue <= 0.05 & abs(resLRT\$log2FoldChange) >= 1.5))
###2
###0
sum(na.omit(resLRT\$pvalue <= 0.05 & abs(resLRT\$log2FoldChange) >= 1))
###7
sum(na.omit(resLRT\$padj <= 0.05 & abs(resLRT\$log2FoldChange) >= 1.5))
###0
``````

I understand the concept behind the wald (applicable when we have two condition) and LRT test (when we have more than 2 conditions and intent to check interaction between conditions). But what if i only have two condition like Male (15 or more replicate) and Female (15 replicates). Then in this case what test would be more appropriate using DESeq2 ?

rna-seq deseq2 bioconductor R • 1.6k views
modified 3.5 years ago by Michael Love1.9k • written 3.5 years ago by unique37970
1
Michael Love1.9k wrote:

We discourage simultaneous cross-posting on Bioconductor support and Biostars, or at least you should provide a link so that others can see the question has already been answered elsewhere.

https://support.bioconductor.org/p/82614/