I am new to R and transcriptomics so please be patient with me. I am having problem creating my DESeq object. It returns an error about modelMatrix. Attached also is my metadata (with FT1 as the control). Can someone help me with this?
You've made dpi a factor. That for sure means that you will get that error, because group C has only '0' as a dpi value, and that value is not shared in any of the other groups.
See if it will work if you keep dpi a number, not a factor. That's probably what you want, anyway. I don't think you want dpi to be four named groups.
The terms "model matrix" and "rank" originate from linear algebra. In simple terms, when a model matrix does not have full rank, it means that some rows or columns are repetitive or dependent on each other. This lack of unique information makes it impossible to fully separate or distinguish certain variables or effects. For example, if there is no difference between your R and S samples, and doubling the DPI of the R sample also doubles the DPI of the S sample, it indicates that R is a linear combination of S (or vice versa). In such cases, it becomes impossible to differentiate between R and S or calculate differential expressions involving them. To resolve this issue, you could remove one of the offending samples from the data. Also note that newer version of DESeq2 requires at least two replicates for dispersion estimation and will not function without them.
Have you read the section of the vignette titled 'Model matrix not full rank'?
Can you share the code that you are trying to run and provide some more information on what you are doing?
Hi, I am currently reading it.
Here's my code.