title: Limma package to find differentially expressed genes
body: <p>I have my matrix designed in the following way which I name as mat1:</p>
  
  <pre><code> Probes  sample1  sample1 sample2 sample2 sample3 sample3 sample4 sample4  
           rep1      rep2    rep1   rep2    rep1    rep2    rep1    rep2
   ------------------------------------------------------------------------
     gene1   5.098   5.076   5.072  4.677  7.450   7.456   8.564   8.555
     gene2   8.906   8.903   6.700  6.653  6.749   6.754   7.546   7.540
     gene3   7.409   7.398   5.392  5.432  6.715   6.724   5.345   5.330
     gene4   4.876   4.869   5.864  5.981  4.280   4.290   4.267   4.255
     gene4   3.567   3.560   3.554  3.425  8.500   8.564   6.345   6.330 
     gene5   2.569   2.560   8.600  8.645  5.225   5.234   7.345   7.333
  </code></pre>
  
  <p>I use the limma package to find the DEG's </p>
  
  <pre><code>Group &lt;- factor(c("p1", "p1", "p2", "p2","p3", "p4","p4")
  design &lt;- model.matrix(~0 + Group)
  colnames(design) &lt;- gsub("Group","", colnames(design))
  fit &lt;- lmFit(mat1[,1:4],design)
  contrast.matrix&lt;-makeContrasts(p1-p2,levels=design)
  fit2&lt;-contrasts.fit(fit,contrast.matrix)
  fit2&lt;-eBayes(fit2)
  sel.diif&lt;-p.adjust(fit2$F.p.value,method="fdr")&lt;0.05
  deg&lt;-mat1[,1:4][sel.diif,]
  </code></pre>
  
  <p>So will "deg" just give me those genes which are significant in sample one versus two. I am interested in those genes which are differentially expressed only in first sample but not in the second sample  and am not sure if this is the right approach. </p>
  
  <p>Or should I try something like this:</p>
  
  <pre><code>contrast.matrix&lt;-makeContrasts(contrasts="p1"-("p2"+"p3"+"p4")/3,levels=design)
  </code></pre>
  
  <p>I am not sure how I should set the contrasts matrix to obtain the DEG's from sample 1 only but not in the other three.</p>