Hello, I am trying to use DESeq2 to analyze RNA-seq data for a project on sex-change but I keep getting a 'Model matrix not full rank' ERROR. In this study I have three different species, three different sexes and two different tissue types. I am trying to determine genes differentially expressed between species, between sexes of the same species and between tissues of the same species. Here is a portion of my sampling design (I have a total of 40 samples ESC01-ESC39):
SampleName Species Sex Tissue
ESC39 CSTR Female Gonad
ESC38 CSTR Female Gonad
ESC37 CSTR Female Gonad
ESC32 SSUB Herm Gonad
ESC31 SSUB Herm Gonad
ESC30 SSUB Herm Gonad
ESC29 SSUB Herm Brain
ESC28 SSUB Herm Brain
ESC27 SSUB Herm Brain
ESC24 DFOR Herm Gonad
ESC23 DFOR Herm Gonad
ESC21 DFOR Herm Gonad
ESC20 DFOR Herm Brain
ESC19 DFOR Herm Brain
ESC18 DFOR Herm Brain
ESC15 CSTR Female Brain
ESC14 CSTR Female Brain
ESC13 CSTR Female Brain
ESC10 CSTR Male Gonad
ESC09 CSTR Male Gonad
ESC08 CSTR Male Gonad
ESC05 CSTR Male Brain
ESC04 CSTR Male Brain
ESC03 CSTR Male Brain
I previously tried "design = ~ Species + Species:Sex + Species:Tissue" but am unsure how to properly format my model matrix. Any help would be appreciated!
I have read through the vignette and explored the examples available, but am unsure which of my variables need to be nested with which and wether or not I have to make an additional column.
I'd recommend discussing with a statistician about how you may want to approach this data. There isn't one single "correct" design but in fact many depending on your scientific assumptions, and whether you assume certain factors modify the effects of other factors. It's more of a conversation to have with a statistical collaborator, as opposed to a question about how to run DESeq2. As the other Answerer pointed out, you can't have a sex specific effect for each species, because some species only have one sex.