Question: Turn off the functions of estimating dispersions and gene-wise dispersion estimates
0
gravatar for Nicola
6 months ago by
Nicola0
Nicola0 wrote:

I have RNA-Seq data from two batches and know there is significant batch effect in the data.And I just want to get the normalized data without batch effect,and the data still fits a negative binomial distribution.

I run code like this :

counts.spikein = as.matrix(CountSet2, colnames = FALSE, row.names = FALSE) ddsHTSeq1<- DESeqDataSetFromMatrix(counts.spikein, colData, design =~batch+condition) dds1<-DESeq(ddsHTSeq1,full=~ batch + condition, reduced=~batch, test="LRT") estimating size factors estimating dispersions gene-wise dispersion estimates mean-dispersion relationship final dispersion estimates fitting model and testing

I need only to perform estimating size factors in the function DESeq,and needn't perform estimating dispersions,gene-wise dispersion estimates,mean-dispersion relationship,final dispersion estimates,fitting model and testing. And are there options to turn off the functions of estimating dispersions,gene-wise dispersion estimates,mean-dispersion relationship,final dispersion estimates,fitting model and testing?

Thanks in advance!

deseq2 • 160 views
ADD COMMENTlink modified 6 months ago by Michael Love25k • written 6 months ago by Nicola0
Answer: Turn off the functions of estimating dispersions and gene-wise dispersion estima
2
gravatar for Michael Love
6 months ago by
Michael Love25k
United States
Michael Love25k wrote:

See the help page for the main function, ?DESeq, which lists and has links to the sub functions that are called, you can easily call only the size factor estimation function.

ADD COMMENTlink modified 6 months ago • written 6 months ago by Michael Love25k

Thank you! Micheal ! I know I can call the sub functions size factor estimation,But the sub functions size factor estimation can't remove the batch effect

ADD REPLYlink written 6 months ago by Nicola0
1

You could use limma’a removeBatchEffect, but I recommend this on the transformed counts (VST). I don’t have a recommendation for removing batch from (normalized) counts really.

ADD REPLYlink written 6 months ago by Michael Love25k

Why could't remove batch from (normalized) counts ?

And what's a better manner to get the normalized data without batch effect?

ADD REPLYlink written 6 months ago by Nicola0

If I run this code, how would I modify it better?

idx1<-which(rowMeans(Countset)>1) CountSet2<-Countset[idx1,] counts.spikein = as.matrix(CountSet2, colnames = FALSE, row.names = FALSE) ddsHTSeq1<- DESeqDataSetFromMatrix(counts.spikein, colData, design =~batch+condition) dds<-estimateSizeFactors(ddsHTSeq1) data_remove<-limma::removeBatchEffect(counts(dds, normalized = TRUE),colData$batch)

ADD REPLYlink written 6 months ago by Nicola0

Again, I would not remove batch effects from counts, but from transformed counts.

ADD REPLYlink written 6 months ago by Michael Love25k

Thank you for your kind answer,Micheal

last question, would transformed counts fit negative binomial distribution?

ADD REPLYlink written 6 months ago by Nicola0

No, they are log scale. Take a look at the vignette and the workflow, both have sections on the transformations.

ADD REPLYlink written 6 months ago by Michael Love25k

We don't have anything for that.

ADD REPLYlink written 6 months ago by Michael Love25k
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: 303 users visited in the last hour