Hi, I am doing differential expression analysis using a count matrix with four samples and two groups using the function:
DESeqDataSetFromMatrix(countMatrix, colData = colData, design = ~groups.
I set the corresponding rows in my colData$groups to c("ctl", "ctl", "trt", "trt"), and I get one result, same as if I set colData$groups to c(0,0,1,1). But if I set it to c(0,0,2,2), I get a different result. However, if I set colData$groups to factor(c(0,0,2,2)) I get the same results as 0,0,1,1.
What is DESeqDataSetFromMatrix doing to give the different results for colData$groups 0,0,2,2?
Thank you
Thanks for your answer. Do you know what DESeq2 is doing when given numbers?
I believe it will try to make a linear correlation between the logs of the counts and your numerical colData. But it's hard to know without seeing the rest of your code.