edgeR::cpm - Doesn't work on DGEList after update
1
0
Entering edit mode
@nilssonp386-14846
Last seen 5.3 years ago

I have a gene expression data set and want to create a cpm matrix from a DGEList object. Is used to work, but after updating to Bioconductor 3.6, I get the following error message: "unable to find an inherited method for function ‘cpm’ for signature ‘"DGEList". Code provided below.

dgList <- DGEList(counts=fc$counts, genes=row.names(fc$counts))
countsPerMillion <- cpm(dgList)

 

 

 

 

edger • 3.2k views
ADD COMMENT
1
Entering edit mode
@gordon-smyth
Last seen 2 hours ago
WEHI, Melbourne, Australia

No, there's no problem with cpm() in edgeR in Bioconductor 3.6. I just ran example(cpm) with edgeR 3.20.7 and it runs fine.

I am pretty sure it is impossible to get the error message you state from the edgeR package. The error message "Unable to find an inherited method ..." is only for S4 functions, but edgeR::cpm is not an S4 function.

It would appear that you, or one of the packages you have loaded, has defined an S4 function called cpm() that is over-writing the edgeR function. Try typing cpm at the R prompt. If you don't see this:

> cpm
function (y, ...) 
UseMethod("cpm")
<environment: namespace:edgeR>

then you're not using the edgeR cpm function.

ADD COMMENT
0
Entering edit mode

Yes, you are totally right. Typing edgeR::cpm solved the problem.

ADD REPLY

Login before adding your answer.

Traffic: 616 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6