RNA-seq counts analysis with DESeq
2
1
Entering edit mode
7.6 years ago
iside ▴ 20

Dear all,

I am going to run a differential expression analysis on raw count RNA-seq data with DESeq.

I now that with the following piece of code I can produce a normalised counts dataset,

cds <- newCountDataSet(counts, condition)
cds <- estimateSizeFactors(cds)
sizeFactors <- sizeFactors(cds)
normal_counts <- counts(cds, normalized=TRUE)


but I need to introduce a condition. So what I am wandering is: does the normalisation depend on the condition? What if I change it?

I would like to produce a normalised dataset that I can afterwards use in different analysis, analysing differential expression according to different conditions. Is it possible?

Another thing I would like to know is if I can use principal components rather than batches in my analysis, do Deseq/Deseq2 allow it?

Thanks

RNA-Seq DESeq • 2.8k views
0
Entering edit mode

Dear tharveshliyakat and Devon,

Thank you very much for your replies.

1. I have already calculated the PC for my data set, and I was wandering if I can use them in the model:

ddd<-DESeqDataSetFromMatrix(countData = countData, colData = colData, design = ~ PC1 +PC2 + condition)


I have had several problems with the batch effects, so maybe the PCs will be more helpful!

2. I was using DESeq rather than DESeq2 for these first steps only because it allows me to get directly a matrix of normalised counts, that I would like to use afterwards in different analysis (like LMM analysis). I see anyway that I can retrieve the Size factors from deseq2, so I can probably use them to normalise the countData. Would it be correct? Both normalising the counts from deseq2 and using them in other analyses?

Thanks

2
Entering edit mode

The counts() accessor works the same in DESeq2. BTW, you might want to read through this example of using SVA with DESeq2.

0
Entering edit mode

Yes, it seems what I need! I will try with SVA, thank you.

2
Entering edit mode
7.6 years ago

Regarding principal component, What I think is:

DESeq2 has a function called plotPCA(), you could use returnData argument to get PC1 and PC2 data, which you can append to your metadata and use it for model matrix.

Please correct me if I am wrong.

0
Entering edit mode

You're correct :)

1
Entering edit mode
7.6 years ago

Normalization is independent of condition, so you can use anything you want there. You can use any continuous covariates you want, including principal components. Note that you'll need to use the GLM commands for this. You should also use DESeq2 rather than DESeq.