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
• 917 views
•
link
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)
• 0 views
•
link
Log in to answer this question.