Question: DESeq2 Anova type comparison and Pvalues.
gravatar for halo22
8 months ago by
Indianapolis, IN
halo22190 wrote:

Hello All,

I am trying to make a group-wise comparison between 4 groups using DESeq2. After writing the contrast for the group comparisons, I see that log2foldchange and the lfcSE are different for each comparison but values for stat and p-value are the same for each comparison. Eg: Group1_vs_Group2 has the same P-values and stat as Group1_vs_Group3. I don't think this is correct. I'd really appreciate it if you could look at it and let me know if I am making a mistake with model building for any other thing.


Pheno <- read.csv('xxxxxxx.csv', header=T,sep=",")
Data <- read.csv('yyyyyyy.csv', header=T,row.names=1)
Pheno$Position <- as.character(Pheno$Position)
Data <- Data[,Pheno$Position]

dds <- DESeqDataSetFromMatrix(countData = Data,
                          colData = Pheno,
                          design = ~ Groups)

#design(dds) = ~ Groups 
dds = DESeq(dds, test = "LRT", reduced = ~ 1)

group1_group2 <- results(dds, contrast=c("Groups", "Group1", "Group2"))
group1_group2 <- group1_group2[!$pvalue),]
group1_group2 <- group1_group2[order(group1_group2$pvalue), decreasing = T]

group1_group3 <- results(dds, contrast=c("Groups", "Group1", "Group3"))
group1_group3 <- group1_group3[!$pvalue),]
group1_group3 <- group1_group3[order(group1_group3$pvalue), decreasing = T]
rna-seq rna deseq2 • 264 views
ADD COMMENTlink written 8 months ago by halo22190

I think it's because you used the LRT test so the p-value is computed on including the groups vs. omitting them. Try with Wald test and see if you get the same p-value again.

ADD REPLYlink written 8 months ago by Asaf8.5k

Thanks, @Asaf. I went through the vignette and found that 'LRT' would give a P-value if there is any difference between groups. Wald is exactly what I was looking for.

ADD REPLYlink written 8 months ago by halo22190
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1458 users visited in the last hour