Search
Question: DESeq2 PCA plot: paired analysis
0
gravatar for g.atla
2.8 years ago by
g.atla0
g.atla0 wrote:

I am using DESeq2 to analysis rna-seq data with 8 biological replicates, which are paired samples. These samples are of primary cells, where variation between samples is expected. As this is a paired analysis, I am not removing batch effects.

 When I plot PCA, I could do not see that the samples are separated in to two groups.

Here is my code:

x <- read.table("filt_counts.txt", header=T, row.names=1)

subjects=factor(c(rep(1:8, each=2)))
treat <- as.factor(rep(c("High","Low"),8))

colData <- data.frame(colnames(x),subjects=subjects, treat=treat, row.names=1)
dds <- DESeqDataSetFromMatrix(countData = x, colData = colData, design = ~ subjects + treat)
design(dds) <- formula(~ subjects + treat)
dds <- DESeq(dds)

rld <- rlog(dds)
data <- plotPCA(rld, intgroup=c("treat", "subjects"), returnData=TRUE)
percentVar <- round(100 * attr(data, "percentVar"))

ggplot(data, aes(PC1, PC2, color=treat)) +
        geom_point(size=3) +
        xlab(paste0("PC1: ",percentVar[1],"% variance")) +
        ylab(paste0("PC2: ",percentVar[2],"% variance")) 

Should I trust the results despite having a PCA plot like above ? 
ADD COMMENTlink modified 2.8 years ago • written 2.8 years ago by g.atla0
1
gravatar for Michael Love
2.8 years ago by
Michael Love20k
United States
Michael Love20k wrote:

This just means that the subject effect is larger than the treatment effect. But you can still perform inference on the treatment effects using the ~subject + treat design. If you want, you can look at the results for significant genes using plotCounts, to see how treatment effects within subjects look.

ADD COMMENTlink written 2.8 years ago by Michael Love20k

Thanks Michael. 

ADD REPLYlink modified 2.8 years ago • written 2.8 years ago by g.atla0

What if I need to select few samples for further assays ? What would be the best approach ?

ADD REPLYlink written 2.8 years ago by g.atla0
I don't have a good answer for this. Remember, the observed data for samples and so their distances depends on underlying biology and also on technical factors like library preparation.
ADD REPLYlink written 2.8 years ago by Michael Love20k
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 2.2.0
Traffic: 315 users visited in the last hour