I'm running an edgeR analysis on RNAseq data that was run in two seperate batches which I want to control for. Should the variable I'm interested in be first or last in the equation?
ie "design <- model.matrix(~group + batch)"
or
"design <- model.matrix(~batch + group)"?
The edgeR manual says the group should go last, similar to DESEeq2, but I have been told by a collegue that it should go first?
The order makes no difference. Either order will give exactly the same results in edgeR.
What have you read in the edgeR User's Guide that makes you think that
group
should go last? The User's Guide does not actually say that.