This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to retrieve the full RNA expression matrix from ComBat_seq output

Hi! I'm new to bioinformatics and I have tried to use ComBat_seq in R to remove my batch effects in my RNAseq data. When I look at the output I get lists with numbers which probably refer to the gene, patient ID and the counts. My question is how do I retrieve a data frame that consists of genes as row names and patients as the column names (like my input file). Do I have to put the output into other tools, like Deseq?

Thanks in advance

rnaseq combat_seq

1 answer

Not sure what you're doing because it is straight-forward:

count_matrix <- matrix(rnbinom(400, size=10, prob=0.1), nrow=50, ncol=8)
batch <- c(rep(1, 4), rep(2, 4))
group <- rep(c(0,1), 4)

# that is your adjusted count matrix (raw counts, still needs normalization)
adjusted_counts <- ComBat_seq(count_matrix, batch=batch, group=group)

Log in to answer this question.