text: user4595: I have 3 tumour samples from 3 patients from an experiment, I also downloaded 10 normal samples from TCGA. My design is like this 
  > mycols
                 condition batch
  normal1           normal     1
  normal2           normal     1
  normal3           normal     1
  normal4           normal     1
  normal5           normal     1
  normal6           normal     1
  normal7           normal     1
  normal8           normal     1
  normal9           normal     1
  normal10          normal     1
  OESO_036_a_RNA    cancer     2
  OESO_013_a_RNA    cancer     2
  OESO_005_a_RNA    cancer     2
  >
  
  But DESeq2 returns error when trying for differential expression analysis
  > dds <- DESeqDataSetFromMatrix(countData=counts, colData=mycols, design=~batch+condition)
  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')
  In addition: Warning message:
  In DESeqDataSet(se, design = design, ignoreRank) :
    some variables in design formula are characters, converting to factors
  
  Then how I could extract deferentially expressed genes between tumour and normal samples while they are coming from two different batches?
  Any help please?
  
  user2388: llrs is right.  "Matrix Model not full rank" means that two of your conditions are confounded.  You can't get your normals from one place and your experimentals from another
  And no, there generally is no clever way out of this.  For all you know, any differences you see between your normals and your cancers are 100% due to being sequenced somewhere else, and have nothing to do with real biology.
  If you want to run this through DESeq, drop batch effect.  But tell whoever you are reporting the results to that batch is hopelessly confounded with cancer state, and you can't tell which differences are due to what.
  
original_text: 4595: <p>I have 3 tumour samples from 3 patients from an experiment, I also downloaded 10 normal samples from TCGA. My design is like this </p>
  
  <pre><code>&gt; mycols
                 condition batch
  normal1           normal     1
  normal2           normal     1
  normal3           normal     1
  normal4           normal     1
  normal5           normal     1
  normal6           normal     1
  normal7           normal     1
  normal8           normal     1
  normal9           normal     1
  normal10          normal     1
  OESO_036_a_RNA    cancer     2
  OESO_013_a_RNA    cancer     2
  OESO_005_a_RNA    cancer     2
  &gt;
  </code></pre>
  
  <p>But DESeq2 returns error when trying for differential expression analysis</p>
  
  <pre><code>&gt; dds &lt;- DESeqDataSetFromMatrix(countData=counts, colData=mycols, design=~batch+condition)
  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')
  In addition: Warning message:
  In DESeqDataSet(se, design = design, ignoreRank) :
    some variables in design formula are characters, converting to factors
  </code></pre>
  
  <p>Then how I could extract deferentially expressed genes between tumour and normal samples while they are coming from two different batches?</p>
  
  <p>Any help please?</p>
   2388: <p>llrs is right.  "Matrix Model not full rank" means that two of your conditions are confounded.  You can't get your normals from one place and your experimentals from another</p>
  
  <p>And no, there generally is no clever way out of this.  For all you know, <strong>any</strong> differences you see between your normals and your cancers are 100% due to being sequenced somewhere else, and have nothing to do with real biology.</p>
  
  <p>If you want to run this through DESeq, drop batch effect.  But tell whoever you are reporting the results to that batch is hopelessly confounded with cancer state, and you can't tell which differences are due to what.</p>
  