The support.bioconductor.org editor has been updated to markdown! Please see more info at: Tutorial: Updated Support Site Editor

Question: DESeq2: Including known contaminant in the design model does not change PCA plot
0
gravatar for nilssonp386
25 days ago by
nilssonp3860 wrote:

I have a data set of 51 samples over 4 different conditions, and I want to visualise the similarity between the groups. I have already identified a known blood contamination which affects 7 of the samples, and have added a column named "contamination", with the labels "yes" or "no".

However, when I include this term in the design matrix, it does not affect the appearance of the PCA plot. It looks the same as without the term, and the 7 samples are outliers in reference to the other samples of the same condition.

Code:

d.deseq <- DESeqDataSetFromMatrix(countData = raw_counts,
                                  colData = sample_data,
                                  design = ~ contamination + condition)

vsd <- vst(d.deseq, blind=FALSE)

pcaData <- plotPCA(vsd, intgroup=c("condition"), returnData = TRUE)
percentVar <- round(100 * attr(pcaData, "percentVar"))

p <- ggplot(pcaData, ...)

Thanks a lot for help with troubleshooting and/or other suggestion how to deal with the contamination.

deseq2 • 59 views
ADD COMMENTlink modified 25 days ago by Michael Love21k • written 25 days ago by nilssonp3860
Answer: DESeq2: Including known contaminant in the design model does not change PCA plot
0
gravatar for Michael Love
25 days ago by
Michael Love21k
United States
Michael Love21k wrote:

A "frequently asked question":

https://bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#why-after-vst-are-there-still-batches-in-the-pca-plot

ADD COMMENTlink written 25 days ago by Michael Love21k

Thank you, sorry I've missed that. Does this take the treatment condition into account when correcting the batch effects, or does the design have to be provided to the ┬┤removeBatchEffect┬┤ function? I've looked in to the limma documentation but they use other input objects to start with.

ADD REPLYlink written 24 days ago by nilssonp3860

You would just provide the batch variable to that function, not the full design.

ADD REPLYlink written 24 days ago by Michael Love21k
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: 238 users visited in the last hour