Search
Question: deseq2 zeros in all treatments, fold change
0
gravatar for mary.cho753
4 weeks ago by
mary.cho7530 wrote:

Suppose you have 4 treated and 4 untreated samples.

On avg if all 8 columns are zero Deseq2 will output NA across the results for, baseMean log2FoldChange lfcSE stat pvalue.

However, in a few cases I can see numbers for baseMean log2FoldChange lfcSE stat pvalue (though padj will be NA) when all 8 columns are zero.

Is this possible?

 

Thanks.

       

 

 

ADD COMMENTlink modified 4 weeks ago by Michael Love19k • written 4 weeks ago by mary.cho7530
0
gravatar for Michael Love
4 weeks ago by
Michael Love19k
United States
Michael Love19k wrote:

Can you show this happening? The base mean is the mean of normalized counts so equal to zero if the counts are zero for the whole row (gene). These genes are not used in computation of LFC or pvalues.

ADD COMMENTlink written 4 weeks ago by Michael Love19k

Thanks for your reply. I figured out at least what has happened.

If I have 16 samples and I normalize them together. (At least I think I am normalizing them together)

Then when I contrast samples ac (1,2,3,4)  and an (5,6,7,8)

If some rows have zeros for raw counts 0,0,0,0,0,0,0,0 - I expected NA for  baseMean log2FoldChange lfcSE stat pvalue. This is true the majority of the time.

However, if sample 15 has a normalized value of 3.6 (example 0,0,0,0,0,0,0,0,0,0,0,0,0,3.6,0, then I will get values for baseMean log2FoldChange lfcSE stat pvalue even

when comparing ac and an with the contrast function. Here I thought I was comparing (0,0,0,0,0,0,0,0) and not (0,0,0,0,0,0,0,0,0,0,0,0,0,0,3.6,0) Please see code below. Please let me know if I was not clear of what happened. Is there a mistake in my code or design table? or is this just something that I ignore.  Thanks for your quick reply. 

 

Design table

id condition
cor1 ac
cor2 ac
cor3 ac
cor4 ac
cor5 an
cor6 an
cor7 an
cor8 an
cor9 zc
cor10 zc
cor11 zc
cor12 zc
cor13 zn
cor14 zn
cor15 zn
cor16 zn

 

 

####################################################################
library( "DESeq2" )
setwd ("C:/dseq/data")
getwd()

countData <-read.table("C:/dseq/data/my_data.csv",header=T,sep=",")
head(countData)

 

colData1 <-read.table("C:/dseq/data/cond.csv",header=T,sep=",")
head (colData1)

colData<-data.frame(colData1)[,c("id","condition")]

 

dds<-DESeqDataSetFromMatrix(countData= countData,colData= colData,design=~condition)

 

dds$condition<-factor(dds$condition,levels=c("ac","an","zc","zn"))

ddsresults<-DESeq(dds)

test <- results(ddsresults, contrast=c("condition","an","ac"))
plotMA(test,main="DESeq2",ylim=c(-6,6))
write.csv (test, "results_ac_vs_an.csv")

 

ADD REPLYlink written 29 days ago by mary.cho7530

I think you can safely ignore this. Unless the counts are all zero then DESeq2 does compute statistics and the mean is not equal to zero. You can filter these genes out manually if you like.

ADD REPLYlink written 29 days ago by Michael Love19k
Please log in to add an answer.

Help
Access

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