Body: <p>Saw this answer <a href="https://www.biostars.org/p/472591/" rel="nofollow noreferrer">biostar</a>. Tried to make my metadata as such but still the</p>
  <pre><code>&quot;Error in checkFullRank(modelMatrix) : &quot;
  </code></pre>
  <p>This is my coldata</p>
  <pre><code>dput(coldata)
  structure(list(Group = structure(c(2L, 2L, 2L, 2L, 2L, 2L, 2L, 
  2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
  3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 1L, 
  1L, 1L, 1L, 1L, 1L, 1L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 6L, 6L, 
  6L, 6L, 6L, 6L), .Label = c(&quot;HSC&quot;, &quot;Blast&quot;, &quot;CMP&quot;, &quot;GMP&quot;, &quot;LSC&quot;, 
  &quot;Mono&quot;), class = &quot;factor&quot;), Mutation = structure(c(10L, 4L, 3L, 
  5L, 2L, 3L, 9L, 11L, 1L, 1L, 7L, 7L, 10L, 7L, 8L, 2L, 10L, 10L, 
  10L, 10L, 2L, 2L, 7L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 
  6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 2L, 2L, 5L, 2L, 
  9L, 1L, 1L, 8L, 6L, 6L, 6L, 6L, 6L, 6L), .Label = c(&quot;DNMT3A-R882H&quot;, 
  &quot;FLT3-ITD&quot;, &quot;IDH2-R140Q&quot;, &quot;KRAS-G13D&quot;, &quot;MAU2-Q98H&quot;, &quot;No&quot;, &quot;NPM1-L287ins(TCTG)&quot;, 
  &quot;NRAS-G13D&quot;, &quot;STAG2-R614&quot;, &quot;TET2-E1357&quot;, &quot;TET2-R550&quot;), class = &quot;factor&quot;), 
      Satus = structure(c(2L, 5L, 4L, 6L, 3L, 4L, 9L, 10L, 1L, 
      1L, 7L, 7L, 2L, 7L, 8L, 3L, 2L, 2L, 2L, 2L, 3L, 3L, 7L, 16L, 
      16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 
      16L, 16L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 12L, 12L, 13L, 
      12L, 9L, 11L, 11L, 14L, 15L, 15L, 15L, 15L, 15L, 15L), .Label = c(&quot;Blast-DNMT3A-R882H&quot;, 
      &quot;Blast-E1357&quot;, &quot;Blast-FLT-ITD&quot;, &quot;Blast-IDH2-R140Q&quot;, &quot;Blast-KRAS-G13D&quot;, 
      &quot;Blast-MAU2-Q98H&quot;, &quot;Blast-NPM1-L287ins(TCTG)&quot;, &quot;Blast-NRAS-G13D&quot;, 
      &quot;Blast-STAG2-R614&quot;, &quot;Blast-TET2-R550&quot;, &quot;LSC-FLT-DNMT3A-R882H&quot;, 
      &quot;LSC-FLT-ITD&quot;, &quot;LSC-MAU2-Q98H&quot;, &quot;LSC-NRAS-G13D&quot;, &quot;Mature-Normal&quot;, 
      &quot;Progenitor-Normal&quot;, &quot;Stem-Normal&quot;), class = &quot;factor&quot;)), row.names = c(&quot;Blast1&quot;, 
  &quot;Blast10&quot;, &quot;Blast11&quot;, &quot;Blast12&quot;, &quot;Blast13&quot;, &quot;Blast14&quot;, &quot;Blast15&quot;, 
  &quot;Blast16&quot;, &quot;Blast17&quot;, &quot;Blast18&quot;, &quot;Blast19&quot;, &quot;Blast20&quot;, &quot;Blast2&quot;, 
  &quot;Blast21&quot;, &quot;Blast22&quot;, &quot;Blast23&quot;, &quot;Blast3&quot;, &quot;Blast4&quot;, &quot;Blast5&quot;, 
  &quot;Blast6&quot;, &quot;Blast7&quot;, &quot;Blast8&quot;, &quot;Blast9&quot;, &quot;CMP1&quot;, &quot;CMP2&quot;, &quot;CMP3&quot;, 
  &quot;CMP4&quot;, &quot;CMP5&quot;, &quot;CMP6&quot;, &quot;CMP7&quot;, &quot;CMP8&quot;, &quot;GMP1&quot;, &quot;GMP2&quot;, &quot;GMP3&quot;, 
  &quot;GMP4&quot;, &quot;GMP5&quot;, &quot;GMP6&quot;, &quot;GMP7&quot;, &quot;HSC1&quot;, &quot;HSC2&quot;, &quot;HSC3&quot;, &quot;HSC4&quot;, 
  &quot;HSC5&quot;, &quot;HSC6&quot;, &quot;HSC7&quot;, &quot;LSC1&quot;, &quot;LSC2&quot;, &quot;LSC3&quot;, &quot;LSC4&quot;, &quot;LSC5&quot;, 
  &quot;LSC6&quot;, &quot;LSC7&quot;, &quot;LSC8&quot;, &quot;Mono1&quot;, &quot;Mono2&quot;, &quot;Mono3&quot;, &quot;Mono4&quot;, &quot;Mono5&quot;, 
  &quot;Mono6&quot;), class = &quot;data.frame&quot;)
  
  dds &lt;- DESeqDataSetFromMatrix(countData=df2, colData=coldata, design= ~ Group + Mutation)
  </code></pre>
  <p>This is the design I'm trying to incorporate. What i get is my design is nested in one of the column by looking at numerous example.</p>
  <p>What i would like to do is I'm trying to run a LRT test on this dataset which works fine if i give &quot;<code>Group</code>&quot; as my design and then i run this</p>
  <pre><code>dds_lrt &lt;- DESeq(dds, test=&quot;LRT&quot;, reduced = ~ 1)
  </code></pre>
  <p>which gives me diffrenitaly expressed across multiple groups. Now there are two question</p>
  <ol>
  <li>Is it possible to include interaction such as in my case <code>Group+Mutation</code> and do the lrt test?</li>
  <li>Or the above is conceptually wrong to do ?</li>
  </ol>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-18T13:13:01.980Z
Comments.Text: what is the hypothesis you are trying to test?
Comments.UserDisplayName: StupidWolf
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-18T13:16:53.053Z
Comments.Text: I would like to know how these specific mutation affect gene expression across the cell types with respect to reference which is my "HSC" as its a stem cell . But from @ATpoint answer it seems I need to subset the data more over what i tired above perhaps is a wrong approach if i get it as there are multiple types of mutation. It would be more useful if i do pairwise comparison for specific cell types i guess
Comments.UserDisplayName: kcm
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-18T13:20:35.200Z
Comments.Text: @StupidWolf for example I would like to see what set of genes which changes or are significant when i traverse from HSC to down the lineage tree such as CMP,GMP,Monocyte, but I have also included LSC(Leukemic stem cells) and Blast. But not sure if this is right comparison, i did normalize and took the data for clustering that is fine ,but hypothesis testing across heterogeneous group which are diseased with mutation would that be correct?
Comments.UserDisplayName: kcm
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-18T14:25:59.983Z
Comments.Text: @StupidWolf this answer let me go through again https://bioinformatics.stackexchange.com/questions/13627/how-to-design-deseq2-lrt-model-with-individuals-nested-in-2-levels
Comments.UserDisplayName: kcm
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-19T01:04:48.100Z
Comments.Text: Looking at your design with ATpoint's table, there's a major issue. some of your mutations have n=1 in some of the interactions, for example TET2-R550 or NRAS-G13D. or NPM1-L287ins(TCTG) is exclusive for blast. So it's hard for you to make these comparisons say HSC.. when it is so incomplete
Comments.UserDisplayName: StupidWolf
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-19T01:05:36.603Z
Comments.Text: I think you basically need to think about how to design this
Comments.UserDisplayName: StupidWolf
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-19T05:51:40.180Z
Comments.Text: "there's a major issue. some of your mutations have n=1 in some of the interactions, for example TET2-R550 or NRAS-G13D. or NPM1-L287ins(TCTG) is exclusive for blast. So it's hard for you to make these comparisons say HSC" now i get it at least i need a replicate ..may be i can make another categorical variable
Comments.UserDisplayName: kcm
Tags: <r><deseq2><design>
Title: the model matrix is not full rank : This is a classic question which a biologist face without clear understanding of the model design
ThreadText: # the model matrix is not full rank : This is a classic question which a biologist face without clear understanding of the model design
  
  (Asked by: username_0 on 2020-12-18)
  
  Saw this answer [biostar](https://www.biostars.org/p/472591/). Tried to make my metadata as such but still the
  
  ```
  "Error in checkFullRank(modelMatrix) : "
  
  ```
  
  This is my coldata
  
  ```
  dput(coldata)
  structure(list(Group = structure(c(2L, 2L, 2L, 2L, 2L, 2L, 2L, 
  2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
  3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 1L, 
  1L, 1L, 1L, 1L, 1L, 1L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 6L, 6L, 
  6L, 6L, 6L, 6L), .Label = c("HSC", "Blast", "CMP", "GMP", "LSC", 
  "Mono"), class = "factor"), Mutation = structure(c(10L, 4L, 3L, 
  5L, 2L, 3L, 9L, 11L, 1L, 1L, 7L, 7L, 10L, 7L, 8L, 2L, 10L, 10L, 
  10L, 10L, 2L, 2L, 7L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 
  6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 2L, 2L, 5L, 2L, 
  9L, 1L, 1L, 8L, 6L, 6L, 6L, 6L, 6L, 6L), .Label = c("DNMT3A-R882H", 
  "FLT3-ITD", "IDH2-R140Q", "KRAS-G13D", "MAU2-Q98H", "No", "NPM1-L287ins(TCTG)", 
  "NRAS-G13D", "STAG2-R614", "TET2-E1357", "TET2-R550"), class = "factor"), 
      Satus = structure(c(2L, 5L, 4L, 6L, 3L, 4L, 9L, 10L, 1L, 
      1L, 7L, 7L, 2L, 7L, 8L, 3L, 2L, 2L, 2L, 2L, 3L, 3L, 7L, 16L, 
      16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 
      16L, 16L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 12L, 12L, 13L, 
      12L, 9L, 11L, 11L, 14L, 15L, 15L, 15L, 15L, 15L, 15L), .Label = c("Blast-DNMT3A-R882H", 
      "Blast-E1357", "Blast-FLT-ITD", "Blast-IDH2-R140Q", "Blast-KRAS-G13D", 
      "Blast-MAU2-Q98H", "Blast-NPM1-L287ins(TCTG)", "Blast-NRAS-G13D", 
      "Blast-STAG2-R614", "Blast-TET2-R550", "LSC-FLT-DNMT3A-R882H", 
      "LSC-FLT-ITD", "LSC-MAU2-Q98H", "LSC-NRAS-G13D", "Mature-Normal", 
      "Progenitor-Normal", "Stem-Normal"), class = "factor")), row.names = c("Blast1", 
  "Blast10", "Blast11", "Blast12", "Blast13", "Blast14", "Blast15", 
  "Blast16", "Blast17", "Blast18", "Blast19", "Blast20", "Blast2", 
  "Blast21", "Blast22", "Blast23", "Blast3", "Blast4", "Blast5", 
  "Blast6", "Blast7", "Blast8", "Blast9", "CMP1", "CMP2", "CMP3", 
  "CMP4", "CMP5", "CMP6", "CMP7", "CMP8", "GMP1", "GMP2", "GMP3", 
  "GMP4", "GMP5", "GMP6", "GMP7", "HSC1", "HSC2", "HSC3", "HSC4", 
  "HSC5", "HSC6", "HSC7", "LSC1", "LSC2", "LSC3", "LSC4", "LSC5", 
  "LSC6", "LSC7", "LSC8", "Mono1", "Mono2", "Mono3", "Mono4", "Mono5", 
  "Mono6"), class = "data.frame")
  
  dds <- DESeqDataSetFromMatrix(countData=df2, colData=coldata, design= ~ Group + Mutation)
  
  ```
  
  This is the design I'm trying to incorporate. What i get is my design is nested in one of the column by looking at numerous example.
  
  What i would like to do is I'm trying to run a LRT test on this dataset which works fine if i give "`Group`" as my design and then i run this
  
  ```
  dds_lrt <- DESeq(dds, test="LRT", reduced = ~ 1)
  
  ```
  
  which gives me diffrenitaly expressed across multiple groups. Now there are two question
  
  1. Is it possible to include interaction such as in my case `Group+Mutation` and do the lrt test?
  2. Or the above is conceptually wrong to do ?
  
  **Tags:** r, deseq2, design
  
  > **Comments:**
  > **username_1**: what is the hypothesis you are trying to test?  
  > **username_0**: I would like to know how these specific mutation affect gene expression across the cell types with respect to reference which is my "HSC" as its a stem cell . But from @ATpoint answer it seems I need to subset the data more over what i tired above perhaps is a wrong approach if i get it as there are multiple types of mutation. It would be more useful if i do pairwise comparison for specific cell types i guess  
  > **username_0**: @username_1 for example I would like to see what set of genes which changes or are significant when i traverse from HSC to down the lineage tree such as CMP,GMP,Monocyte, but I have also included LSC(Leukemic stem cells) and Blast. But not sure if this is right comparison, i did normalize and took the data for clustering that is fine ,but hypothesis testing across heterogeneous group which are diseased with mutation would that be correct?  
  > **username_0**: @username_1 this answer let me go through again https://bioinformatics.stackexchange.com/questions/13627/how-to-design-deseq2-lrt-model-with-individuals-nested-in-2-levels  
  > **username_1**: Looking at your design with ATpoint's table, there's a major issue. some of your mutations have n=1 in some of the interactions, for example TET2-R550 or NRAS-G13D. or NPM1-L287ins(TCTG) is exclusive for blast. So it's hard for you to make these comparisons say HSC.. when it is so incomplete  
  > **username_1**: I think you basically need to think about how to design this  
  > **username_0**: "there's a major issue. some of your mutations have n=1 in some of the interactions, for example TET2-R550 or NRAS-G13D. or NPM1-L287ins(TCTG) is exclusive for blast. So it's hard for you to make these comparisons say HSC" now i get it at least i need a replicate ..may be i can make another categorical variable  
  
  ---
  
  ## 0 answers
  
  