Question: Individual genes plots after batch correction with Deseq2
gravatar for Eugene A
4 months ago by
Eugene A0
Eugene A0 wrote:

Hi everyone, I'm performing analysis of some RNAseq samples, and currently trying to cope with batch effect.plotting PCA of vsd transformed data, I can clearly see two batches which are differ fromt the others.

plotPCA(vsd, intgroup = c('batch'),ntop= 34085)


If I'm not mistaken, then for DE expression analysis I could use design formula of dds function, to reduce batch effect:

dds <- DESeqDataSetFromMatrix(countData = counts, colData = coldata, design =~ batch + type)
dds <- DESeq(dds)
vsd <- varianceStabilizingTransformation(dds, blind = TRUE)

But I also would like to visualise results of batch correction. For PCA plot I could simply follow the DESeq2 manual and just perform limma batch effect removal:

mat <- assay(vsd)
mat <- limma::removeBatchEffect(mat, vsd$batch)
assay(vsd) <- mat
plotPCA(vsd, intgroup = c('batch'),ntop= 34085)

Which gives me a nice results: batch corrected PCA

But now I'd like to visualise expression of individual genes of interest. I could use vsd transforemd data, but these numbers mask the actual count numbers, therefore laking info on actual level of gene expression, which I'd like to preserve. expression of gene X fo given conditions, vsd transformed data, limma correction

So what would be the better solution here? Could I use limma removeBatchEffect() on normalised count table, maybe?


rna-seq deseq2 R • 304 views
ADD COMMENTlink modified 4 months ago • written 4 months ago by Eugene A0

Please see How to add images to a Biostars post to add your images properly. You need the direct link to the image, not the link to the webpage that has the image embedded (which is what you have used here)

ADD REPLYlink written 4 months ago by RamRS24k

What do you mean by but these numbers mask the actual count numbers?

ADD REPLYlink written 4 months ago by ATpoint23k

Hi! I meant that after vsd transformation, genes with let say 1000 and 10 reads will be at the same scale. Nevertheless, the gene with 1000 reads was, probably, detected with higher accuracy, so I'd like to preserve such info. May be for this I should somehow switch to TPMs, but I'd like to avoid it for analysis transparence.


ADD REPLYlink written 4 months ago by Eugene A0
gravatar for ATpoint
4 months ago by
ATpoint23k wrote:

vst transforms to approximately log2-scale, that is simply a data transformation to allow a wide range of counts to fit on a narrow scale rather than having counts spread between 0 and numbers in the hundreds-of- thousands.

ADD COMMENTlink modified 4 months ago • written 4 months ago by ATpoint23k

Thanks for the answer!! Shame but it did not occur to me that vst is indeed that much close to the log transformation. Best, Eugene

PS I'd mark your comment as an answer, if I could

ADD REPLYlink modified 4 months ago • written 4 months ago by Eugene A0
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: 574 users visited in the last hour