In the counts documentation (https://www.rdocumentation.org/packages/DESeq2/versions/1.12.3/topics/counts) there is a line which implies the count matrix of a deseq object can be edited:
## S4 replacement method for signature 'DESeqDataSet,matrix' counts(object) <- value
However, when I try this, I get the following error:
Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘counts<-’ for signature ‘"DESeqDataSet", "data.frame"’
Does anyone know how to solve this?
P.S. I am using the tximport function of DESeq2, so I can't plug in a custom count matrix, unlike the 'import from Matrix' function.