I am creating DeSeqDataSet
and I am unsure whether I need to include the number of mice into the design formula. Basically, the samples look like this:
I have 4 different groups: GF
, B6
, ET
and Wld
. It is obvious that these should go into the design formula, but I am not sure about the mice number. Basically for each group, e.g. GF
, there are 4 experiments with 1
, 2
, 3
and 4
mice each. When I am trying to use both Groups
and Mouse
columns as a design formula, R
is telling that I need to convert Mouse
to factor
:
I am a bit confused about two things here: first, as I told already, should I include this Mouse
column at all in the design formula of DeSeqDataSet
and second, if I do need it, how to convert it to factor? Any suggestions would be greatly appreciated.
Update
It turned out that I was wrong in my initial assumptions: Mouse#
really was an ‘id’ which I did not include in the design formula. There were 4 groups of 16 mice in each for 4 trials.
What concerns me also is that if I specify design formula as ~ Groups + Mouse
, the DeSeq() function starts comparing the Mouse
but not the Groups
which is the most interesting for me.