Turn off the functions of estimating dispersions and gene-wise dispersion estimates
1
0
Entering edit mode
Nicola • 0
@nicola-19912
Last seen 5.7 years ago

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 • 1.3k views
ADD COMMENT
2
Entering edit mode
@mikelove
Last seen 5 days ago
United States

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 COMMENT
0
Entering edit mode

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 REPLY
1
Entering edit mode

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 REPLY
0
Entering edit mode

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

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

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

Thank you for your kind answer,Micheal

last question, would transformed counts fit negative binomial distribution?

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

We don't have anything for that.

ADD REPLY

Login before adding your answer.

Traffic: 405 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6