Question: DESeq2 plotCount() transform not output log2 transformed results correctly
0
gravatar for zhaojiuh
2.5 years ago by
zhaojiuh0
zhaojiuh0 wrote:

Hi,

I'm running DESeq2 on R version 3.4.0, macOS x86_64-apple-darwin15.6.0 (64-bit). It works very well, thanks to the developers. However I meet a problem when using plotCounts() with "transform". It looks like the output was not log2 transformed. I am not sure my commands are not correct or my DESeq2 was not installed correctly.  DESeq2 works perfectly and output the log2 transformed counts correctly on  R version 3.3.0, linux of my server though.

The folowing are the commads I used, please help to figure it out. Thanks in advance!

ps:

> dds <- makeExampleDESeqDataSet()
> plotCounts(dds, "gene1", returnData = TRUE, transform = TRUE)
             count condition
sample1  25.579639         A
sample2   3.347043         A
sample3   5.309093         A
sample4   6.303014         A
sample5   2.538081         A
sample6   5.407639         A
sample7   6.177319         B
sample8   0.500000         B
sample9  12.232656         B
sample10  4.273695         B
sample11  7.847227         B
sample12 21.088557         B

> plotCounts(dds, "gene1", returnData = TRUE, transform = FALSE)
             count condition
sample1  12.156467         A
sample2  14.043578         A
sample3  23.434808         A
sample4   1.917558         A
sample5   3.878934         A
sample6  34.545140         A
sample7  16.868338         B
sample8   5.617922         B
sample9  18.897058         B
sample10 13.033763         B
sample11 15.313159         B
sample12 25.376756         B

 

Best,

jiuhai

 

deseq2 • 549 views
ADD COMMENTlink modified 2.5 years ago • written 2.5 years ago by zhaojiuh0

Are you using DESeq2 version 1.16? I think I fixed a bug recently related to transform (so it does what users think it should).

ADD REPLYlink written 2.5 years ago by Michael Love26k

Thanks to Michael and tarakaramji's kind reply. The DESeq2 is 1.16.1 version. If I use command as tarakaramji suggested, it still has the problem.

> plotCounts(dds,"gene1",intgroup = c("condition"),returnData = TRUE,transform = TRUE)
             count condition
sample1  12.656467         A
sample2  14.543578         A
sample3  23.934808         A
sample4   2.417558         A
sample5   4.378934         A
sample6  35.045140         A
sample7  17.368338         B
sample8   6.117922         B
sample9  19.397058         B
sample10 13.533763         B
sample11 15.813159         B
sample12 25.876756         B​

 

ADD REPLYlink written 2.5 years ago by zhaojiuh0

Can u put the details of your R script how you defined your samples and conditions?

 

ADD REPLYlink written 2.5 years ago by Bio_Ram0

Ok, now I remember, my change was related to plotting only. transform=TRUE affects only whether the scale of y-axis should be log or not, it doesn't change the counts. So you are getting the normalized counts or the raw counts (plus 0.5 when you specify transform=TRUE) with returnData=TRUE. You can transform them yourself, or you can use a log scale as I do inside plotCounts().

ADD REPLYlink modified 2.5 years ago • written 2.5 years ago by Michael Love26k

Hi Michael and tarakaramji,

Now, I see the point. Thanks!

ADD REPLYlink written 2.5 years ago by zhaojiuh0
Answer: DESeq2 plotCount() transform not output log2 transformed results correctly
0
gravatar for Bio_Ram
2.5 years ago by
Bio_Ram0
Bio_Ram0 wrote:

I think you did not mention the intgroup and so you have some problem. Try this way

plotCounts(dds,"gene",intgroup = c("condition"),returnData = TRUE,transform = TRUE)

ADD COMMENTlink written 2.5 years ago by Bio_Ram0
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 16.09
Traffic: 180 users visited in the last hour