Entering edit mode
3.2 years ago
emmagervide
▴
10
Hello! I have RNA seq data and I need to use combat to remove the batch effects. Somehow when I run it, it isnt actually doing anything.
The code:
dds <- DESeq(dds, betaPrior=TRUE)
normalized_counts <- counts(dds, normalized=TRUE)
log2 = log2(normalized_counts+1)
modcombat = model.matrix(~dex, metadata) - with metadata being a variable containing treatment or control (under dex column) and batch and name of each patient.
com<-ComBat(log2, metadata$Batch, mod = modcombat)
Its supposed to be 4 different batches, but in the com variable I can see that the values have stayed the same as in log2.
What could be wrong? Would appreciate any help!