Question: RNA-seq counts analysis with DESeq
gravatar for iside
5.1 years ago by
European Union
iside10 wrote:

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?


rna-seq deseq • 2.2k views
ADD COMMENTlink modified 5.1 years ago • written 5.1 years ago by iside10

Dear  tharveshliyakatt 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? 


ADD REPLYlink written 5.1 years ago by iside10

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

ADD REPLYlink written 5.1 years ago by Devon Ryan96k

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

ADD REPLYlink written 5.1 years ago by iside10
gravatar for tharveshliyakat
5.1 years ago by
tharveshliyakat60 wrote:

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.

ADD COMMENTlink written 5.1 years ago by tharveshliyakat60

You're correct :)

ADD REPLYlink written 5.1 years ago by Devon Ryan96k
gravatar for Devon Ryan
5.1 years ago by
Devon Ryan96k
Freiburg, Germany
Devon Ryan96k wrote:

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.

ADD COMMENTlink written 5.1 years ago by Devon Ryan96k
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: 1052 users visited in the last hour