levels of factors in the design have non-unique level names after make.names() is applied When I try to import the data using DESeq2 package:

dds &lt;- DESeqDataSetFromTximport(txi, sampleTable, ~Group + Cre)


I am getting the error:


  Error in validObject(.Object) : 
    invalid class “DESeqDataSet” object: levels of factors in the design have non-unique level names after make.names() is applied.
    best to only uobject letters and numbers for levels of factors in the design


Here is how my sampleTable looks like:

    ID      Group Cre
1  Bla_36   IL4   -
2  Bla_38   IL4   -
3  Bla_11   IL4   -
4  Bla_17   IL4   -
5  Bla_20   IL4   +
6  Bla_21   IL4   +
7   Bla_8   IL4   +
8  Bla_22   IL4   +
9   Bla_7   IL4   +
10 Bla_35   PBS   -
11 Bla_37   PBS   -
12 Bla_13   PBS   -
13  Bla_1   PBS   -
14  Bla_9   PBS   +
15 Bla_23   PBS   +
16 Bla_19   PBS   +
17 Bla_24   PBS   +


What am I doing wrong here? And how to make it working?
There's a good reason to not allow + and - in the columns. It's because once you do that you get coefficients that can then start with a + or -, which is illegal in R and most other languages. In R, legal variable names consist of:


  A syntactically valid name consists of letters, numbers and the
       dot or underline characters and starts with a letter or the dot
       not followed by a number.


That doesn't really explain the error message you saw, of course. That can be solved by thinking about what R does to invalid character in names. Namely, it replaces them by a dot. So + and - get converted to X. and X., which are of course identical and are what's really leading to the error message your saw. If you had used +cre and - it would have worked.

As an aside, you'll want to think in terms of positive and negative Cre if you talk to a biologist, since that's the appropriate terminology for it.