Combat and dds Object
1
1
Entering edit mode
Bine ▴ 20
@bine-23912
Last seen 5 days ago
Spain

Dear all,

I want to correct my dataset for batch instead of including batch in the formula. The reason is that it seems that my data is not coming for certain sub-analysis from all batches and therefore I get a "Full Rank"-Error. The Bioinformatics Core therefore suggested to run Combat (not Limma) to correct for the batch.

Now I am struggling a bit how to do it.. I have my data - colData and cts which I want to run after with

dds <- DESeqDataSetFromMatrix(countData = cts,
colData = colData,
design = ~SEX + DIAGNOSIS


How do I run combat with my colData and cts? I need to build a matrix?! But I need colData and cts seperate after to build the dds object?

I am a bit confused right now...

Thank you for any hint!

Bine

DESeq2 combat • 182 views
1
Entering edit mode
@kevin
Last seen 11 minutes ago
Republic of Ireland

Hi Bine,

If you wish to correct for batch in this way, then I would do this using ComBat-seq on the raw counts, prior to using any DESeq2 function. Then, when you use DESeq2, technically, you can ignore batch (although I would still check for batch effects via PCA and regression).

ComBat-seq information is here: https://github.com/zhangyuqing/ComBat-seq

Kevin

0
Entering edit mode

Hi Kevin,

Thank you. I have been on that page and I find it very difficult to understand. The remove batch effect function of Limma was three lines of code (unfortunately I was told to use combat not Limma if I do Deseq2 after)...

mat <- assay(vsd)
mat <- limma::removeBatchEffect(mat, vsd$batch) assay(vsd) <- mat  I have my raw counts (already quality control done and removed samples) in cts and my metadata in colData (colData$BATCH having my three batches).. any chance you can direct me to the part of the code relevant for me?

1
Entering edit mode

Can you show the colData? If DESeq2 refuses it due to linear combinations with other covariates then odds are good then any other regression-based approach will do the same.

1
Entering edit mode

Hi Bine, you have 2 choices in relation to batch adjustment:

# Choice 1

1. ComBat-seq on raw counts
2. DESeq2 with ~ condition
3. rld / vst

# Choice 2

1. DESeq2 with ~ condition + batch
2. rld / vst with limma::removeBatchEffect()