I am trying to set up a data set in DESeq2 with DESeqDataSetFromMatrix to perform afterwards a likelihood ratio test in DESeq. In DESeq, I can specify a both a full and a reduced model using the standard R "model.matrix" function in which I can also set the "contrasts" (e.g. "contr.sum", or "contr.Helmert") . However, in DESeqDataSetFromMatrix it is apparently not possible to specify the contrasts.
ddsinputtimeseries <- DESeqDataSetFromMatrix(countdata, coldata,~Level + wi)
I am unsure as to why it is necessary at all to specify a model in DESeqDataSetFromMatrix and whether it will conflict with the full model I specify in DESeq.
An example would be:
ddsinput <- DESeqDataSetFromMatrix(countdata, coldata,~Level + wi) mfull <- model.matrix(~Level+wi,coldata,contrasts=list(wi="contr.sum")) mred <- model.matrix(~Level) ddstimeseries <- DESeq(ddsinput,test="LRT",full=mfull, reduced = mred,betaPrior=F)
Kind regards and thank's for your answer, Florian