This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How will you perform batch correction in DESeq2 when you don't have any group information?

I have 500 tumor samples collected at 5 batches. My samples don't have any groups. How will I do the batch correction. Is the step below correct?

#Expression data
counts = read.table("tumor.unstranded.txt", sep="\t", header = T, row.names = 1)

#Sample information
factors = read.table("target_batch.txt", sep="\t", row.names=1, header = T)

#create dds object
dds = DESeqDataSetFromMatrix(countData=counts,
                              colData=factors,
                              design = ~1 + Batch)
#Perform DESeq2
dds <- DESeq(dds)
#VST analysis
vsd <- vst(dds, blind=FALSE)
mat <- assay(vsd)
#remove batch
mat <- limma::removeBatchEffect(mat, vsd$Batch)
assay(vsd) <- mat
counts_batch_corrected <- assay(vsd)
batch-correction deseq2

1 answer

You do an exploratory analysis, be it PCA to identity drivers of unwanted variation, or try something like svaseq or RUVseq to estimate them. Once you have factors (or batches, or any other covariate) you add them into the design together with the main group information that you want to test. The DESeq2 vignette covers that.

Log in to answer this question.