How to get TPM / FPKM after batch correction with DESeq2?
1
0
Entering edit mode
vk • 0
@cfe7a460
Last seen 20 months ago
Europe

I'm trying to adjust batch effect using deseq2 limma::removeBatchEffect like below:

###### Batch Correction with limma removeBatchEffect #######

dds <- DESeqDataSetFromMatrix(countData = data,
                              colData = coldata,
                              design = ~ Samplebatch + cond)

dds <- DESeq(dds)
dds

dds$batch <- as.numeric(dds$Samplebatch)
dds$cond
dds$batch

## vst after adding batch information
vsd_abc <- vst(dds, blind = FALSE)
vsd_abc$Samplebatch
vsd_abc$batch

design0 <- model.matrix(~cond, colData(vsd_abc))
assay(vsd_abc) <- limma::removeBatchEffect(assay(vsd_abc), vsd_abc$batch, design=design0) ### Batch Correction

After batch effect correction I would like to get TPM / FPKM for performing ssGSEA and various other analyses which are normalized for the length of the gene.

Is it possible to get TPM / FPKM after batch effect removal using limma:removeBatchEffect?

Any help is appreciated. Thank you !!

DESeq2 BatchEffect tpm fpkm • 2.0k views
ADD COMMENT
1
Entering edit mode
ATpoint ★ 4.6k
@atpoint-13662
Last seen 8 hours ago
Germany

Use DESeq2::fpkm(), convert to log2 and correct these values with limma. Or correct any other normalized counts on log2 scale as you like.

ADD COMMENT
0
Entering edit mode

thank you for your reply. So, first I can convert uncorrected counts to FPKM and then log2 scale and use it for Batch correction with limma::removeBatchEffect? Can I use any log2 scaled expression instead of FPKM like CPM or TPM?

ADD REPLY
1
Entering edit mode

Yes to all.

ADD REPLY
0
Entering edit mode

Thank you very much !!

ADD REPLY

Login before adding your answer.

Traffic: 480 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