Hello,
I'm trying to understand how to fix this area with my design. It seems like others have had similar issues, but finding a solution for myself has proved difficult.
I know the issue is in the + design = ~ condition + status line, but I am not entirely sure how to fix it so that both condition and status are taken into effect
Below is the code I have bee trying to run.
> total_counts<-read.table(file="aust_raw_counts.txt",head=TRUE,row.names=1)
> expt_design <- data.frame(rows = colnames(total_counts),
+ condition = c("SocA", "SocA", "SocA", "SocB", "SocB", "SocB", "Sol", "Sol", "Sol", "MB", "MB", "MB"),
+ status = c("Repro", "Repro", "Repro", "UnRepro", "UnRepro", "UnRepro", "Repro", "Repro", "Repro", "UnRepro", "UnRepro", "UnRepro"))
> expt_design
rows condition status
1 Ca01 SocA Repro
2 Ca02 SocA Repro
3 Ca03 SocA Repro
4 Ca04 SocB UnRepro
5 Ca05 SocB UnRepro
6 Ca06 SocB UnRepro
7 Ca07 Sol Repro
8 Ca08 Sol Repro
9 Ca09 Sol Repro
10 Ca10 MB UnRepro
11 Ca11 MB UnRepro
12 Ca12 MB UnRepro
> dds <- DESeqDataSetFromMatrix( countData = total_counts, colData = expt_design,
+ design = ~ condition + status)
Error in checkFullRank(modelMatrix) :
the model matrix is not full rank, so the model cannot be fit as specified.
One or more variables or interaction terms in the design formula are linear
combinations of the others and must be removed.
Please read the vignette section 'Model matrix not full rank':
vignette('DESeq2')
>dds <- estimateSizeFactors(dds)
>dds <- estimateDispersions(dds)
>dds <- nbinomLRT(dds, reduced = ~ 1)
If I can get to this last part here, I think I will have more questions, but until then, thanks for the help.
Mike
So if there no way to control for status?
Mike
I'd recommend you speak with a local statistician to help explain confounding. Status doesn't add information beyond what is given by condition so it is not possible to fit both at the same time.