[BioC] DESeq Variance Stabilizing Transformation (now with non-embedded images)
Hickman, R.J. (Richard)
R.J.Hickman at uu.nl
Mon May 27 17:11:22 CEST 2013
Dear Wolfgang and Michael,
Thank you both for your comments.
I applied the rlog transformation to our data and when I plot the per-gene standard deviation against the rank of the
mean (see attached figure DESeq_count_transformations.png), it appears to perform better than the other two transformations:
shifted logarithm log2 (n + 1) (left)
rLog (middle)
variance stabilizing transformation (right)
When I plot the expression of specific genes using the rLog transformation, however, I notice two things:
1) For genes that are weakly expressed the transformation performs, at least how I would expect (and like), in that the fold changes between treated and untreated conditions are moderated/better estimates (given the noise associated with low counts)- see attached figure "DESeq_transformations_timeseries_weakExpression.png" (middle plot), where treated = blue, untreated = green, error bars = SE of the mean. Log2+1 transformed expression values are shown in the top plot, rLog transformed expression values shown in the middle plot and VSD transformed expression values are shown in the bottom plot.
2) For genes that are strongly expressed, the rLog transformation does not perform how I would expect, in that it seems to boost the values of the untreated samples and reduce the values of the treated samples (see attached figure "DESeq_transformations_timeseries_strongExpression.png"), meaning that the fold changes resulting from the transformed data are greatly reduced. As these expression levels are what I would class as "high", then I would have thought that these values should remain relatively unchanged by the transformation.
Over time many genes will vary in expression quite a lot, so if this could affect the transformations then we are likely to see it with our data.
If you have any thoughts on these results then please let me know.
Best wishes,
Richard
________________________________________
From: Wolfgang Huber [whuber at embl.de]
Sent: 15 May 2013 21:58
To: Hickman, R.J. (Richard)
Cc: Michael Love; bioconductor at r-project.org
Subject: Re: [BioC] DESeq Variance Stabilizing Transformation
Dear Richard
something to keep in mind (and I am not sure this is the issue here) is data quality (i.e. are there outliers?) and data comparability (are there drastic changes during the time?). Looking at all pairwise MA-plots (or MA-plot of each sample against an average reference (pseudo-)sample) might be enlightening. You could use the 'arrayQualityMetrics' package for that.
At best, the VST is approximate, and it may be thrown off the rails if the data's behaviour is quite different from the (negative binomial) error model.
Let us know how it goes.
Best wishes
Wolfgang
On May 14, 2013, at 11:47 am, "Hickman, R.J. (Richard)" <R.J.Hickman at uu.nl> wrote:
> Hi Michael,
>
> For the plots attached to the previous message I used the following code:
>
> dds <- estimateSizeFactors(dds)
> dds <- estimateDispersions(dds)
> vsd <- varianceStabilizingTransformation(dds)
>
> I attach a new plot "timeseriesBlindVST.png" which was generated using the "blind" method:
>
> ddsBlind <- dds
> design(ddsBlind) <- formula(~ 1)
> ddsBlind <- estimateDispersions(ddsBlind)
> vsd <- varianceStabilizingTransformation(ddsBlind)
>
> So even when performed using the "blind" method, the transform does not make a difference.
>
> I think the problem is the variance across time points (there are 10 in total). My initial idea for a potential solution was to perform the VST using only samples at each time point (i.e, creating a DDS using the samples for each time point), however, looking at the manual it states: "Limitations: In order to preserve normalization, the same transformation has to be used for all
> samples". I have performed between sample normalization with estimateSizeFactors() using all samples and so I guess then applying the VST using only samples at each individual time point may not be appropriate?
>
> Bests,
>
> Richard
>
>> sessionInfo()
> R version 3.0.0 (2013-04-03)
> Platform: x86_64-apple-darwin10.8.0 (64-bit)
>
> locale:
> [1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8
>
> attached base packages:
> [1] parallel grid stats graphics grDevices utils datasets methods base
>
> other attached packages:
> [1] vsn_3.28.0 DESeq2_1.0.9 RcppArmadillo_0.3.810.2 Rcpp_0.10.3 lattice_0.20-15
> [6] Biobase_2.20.0 GenomicRanges_1.12.2 IRanges_1.18.0 BiocGenerics_0.6.0 ggplot2_0.9.3.1
>
>
>
> On 13 May 2013, at 11:31, Michael Love wrote:
>
> hi Richard,
>
>
> On Mon, May 13, 2013 at 11:06 AM, Hickman, R.J. (Richard)
> <R.J.Hickman at uu.nl> wrote:
>
>
> Dear All,
>
>
>
> I am looking for some feedback regarding the use of the variance-stabilization (VST) methods found in the DESeq2 package. For me, the purpose for applying this transformation is to be able to generate moderated fold changes for clustering of genes (not samples
> as described in the DESeq vignette).
>
>
>
> My data consists of a time series, where for each time point there is a "treated" sample and a "control" sample. Each sample (timepoint) consists of 4 biological replicates.
>
>
>
> I performed the VST on the entire set of data
>
>
>
>
>
>
>
> Could you share the code (and sessionInfo()) you used to create the object which you applied the transformation to? For example, in the vignette, in order to perform unsupervised clustering,
> we estimate the dispersions in a manner which is blind to the experimental design.
>
>
>
>
>
> ddsBlind <- dds
>
> design(ddsBlind) <- formula(~ 1)
>
> ddsBlind <- estimateDispersions(ddsBlind)
>
> vsd <- varianceStabilizingTransformation(ddsBlind)
>
>
>
>
>
>
>
> I would guess you are observing variance across the timepoints. If you are not using the "blind" method from the vignette, the design is used by estimateDispersions() which
> might result in rows with smaller dispersion estimates when the variance is due to different timepoints, but not used by rowVars() so you observe large row variance.
>
>
>
>
> best,
>
>
>
>
>
> Mike
>
>
>
>
>
>
>
>
>
>
> <timeseriesBlindVST.png>_______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DESeq_transformations_timeseries_strongExpression.png
Type: image/png
Size: 119991 bytes
Desc: DESeq_transformations_timeseries_strongExpression.png
URL: <https://stat.ethz.ch/pipermail/bioconductor/attachments/20130527/0547954a/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DESeq_transformations_timeseries_weakExpression.png
Type: image/png
Size: 114907 bytes
Desc: DESeq_transformations_timeseries_weakExpression.png
URL: <https://stat.ethz.ch/pipermail/bioconductor/attachments/20130527/0547954a/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DESeq_count_transformations.png
Type: image/png
Size: 341619 bytes
Desc: DESeq_count_transformations.png
URL: <https://stat.ethz.ch/pipermail/bioconductor/attachments/20130527/0547954a/attachment-0002.png>
More information about the Bioconductor
mailing list