Hello, I am using DESeq2 to perform differential expression analysis. I have forty samples, gender and age are the variables in my colData. However, when I ran the code, it gave me the error that " the model matrix is not full rank". Initially, I thought it is because there's a sample that has a missing value in colData, so I removed that sample from dds and colData, but the error still exists. I read the vignette section of "Model Matrix not Full Rank", and I think the problem I am having probably matches the "levels without samples" condition (Like there's no certain age in the Female or Male group), but I am not really sure. Could you please help me check my design and see if I need to remove the columns of 0 manually from the model matrix?
dds= DESeqDataSetFromMatrix(countData = cts,
colData = colData,
design = ~ Sex + Age
)
as.data.frame(colData)
Age Sex
<fctr>. <fctr>
sample_01 17 F
sample_02 16.1 M
sample_03 10.4 M
sample_04 15.3 F
sample_05 14.5 F
sample_06 18.1 M
sample_07 14 F
sample_08 15.6 F
sample_09 11.1 F
sample_10 9.5 -