Hi all, 

I am performing a differential expression analysis with DESeq2, with these data:

 - control, 2 replicates
 - treatment, 2 replicates

So far there is still one obscure part of the manual for me: the *design* variable that you can set in many commands. I grasped the concept behind it but I am still struggling to understand how to use it properly. At the moment, I am using: 

    design = ~ condition

How would you set it, and why? Could someone write a couple of lines on how should I use that variable properly? 

Any help appreciated! 
In your case I would simply use the folowing, because the expression depends on only one factor which is the condition (either control or treatment).

    condition = as.factor(c("control","treatment")
    design = ~ condition


but if your replicates were not processed together, I would also take the batch effect into account.

    batch = as.factor(c("rep1", "rep2")
    design = ~ condition + batch

More examples on[ this tutorial][1].


  [1]: http://www.bioconductor.org/help/workflows/rnaseqGene/#the-deseqdataset-sample-information-and-the-design-formula