I have several different RNAseq dataframes that I have merged together; they are from different studies and are raw counts. I want to correct the merged dataframe for study batch effects without getting negative values (I have already tried the "remove batch effect" function from Limma, which gave some negative values).
I have read that I can use Deseq2 to avoid this, and I have therefore used design = ~ studyID + condition in the DESeqDataSetFromMatrix function in order to batch correct for the different studies the RNAseq data comes from.
I am going to use the batch corrected dataframe in another analyse (a pipeline that normalize the data from 0-1) and I need to retrieve the batch corrected data frame from the output from deseq. How do I do this, do I just call counts(deseq, normalized = TRUE) as they do in this post: How to recover treated/control count from DESeq2 output , is this the batch corrected version of the data frame or is there another function?
Ideally I want to retrieve the raw data counts with batch correction, so that I can normalize it later with values between 0 and 1.
Thanks in advance
1 answer
DESeq2 does not return batch-corrected data. These information are used internally as offsets only. For downstream you will need to correct for batch effects externally, e.g. removeBatchEffect or other tools. I personally like ComBat-Seq from sva as it preserves the integer nature of the data and avoids the infmous negative counts.
Log in to answer this question.