DESeq2 plotCount() transform not output log2 transformed results correctly
1
0
Entering edit mode
zhaojiuh • 0
@zhaojiuh-13257
Last seen 7.4 years ago

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 • 1.7k views
ADD COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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

 

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

Hi Michael and tarakaramji,

Now, I see the point. Thanks!

ADD REPLY
0
Entering edit mode
Bio_Ram • 0
@bio_ram-12851
Last seen 6.1 years ago

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 COMMENT

Login before adding your answer.

Traffic: 640 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6