masigpro: could not find function "negative.binomial"
2
0
Entering edit mode
@nicolasdescostes-13127
Last seen 3.1 years ago

Hi,

After updating to bioconductor 3.8, I have some troubles using p.vector. The command and error are:

> fit <- p.vector(edgeR_cpm_matrix, design, Q = 0.05, MT.adjust = "BH", counts=TRUE, family= negative.binomial(10));
Error in negative.binomial(10) :
  could not find function "negative.binomial"

I can also reproduce the error with (R 3.5.0):

> library(maSigPro)
> negative.binomial(10)
Error in negative.binomial(10) :
  could not find function "negative.binomial"

 

However ?negative.binomial works. Any idea?

Thanks

 

 

masigpro • 1.2k views
ADD COMMENT
0
Entering edit mode

It looks like that function is from the MASS package. You could loading the MASS library before running.

library(MASS) 
> negative.binomial(10) 

Family: Negative Binomial(10) 
Link function: log
ADD REPLY
1
Entering edit mode
@gordon-smyth
Last seen 13 minutes ago
WEHI, Melbourne, Australia

This looks like a bug in the maSigPro package. The maSigPro package imports the MASS package but not in a way that makes the negative.binomial() function available within the p.value() function. So you have to load the MASS package explicitly yourself.

Even if you load MASS though, your code doesn't look right. It isn't correct to use family="negative.binomial" with cpm values. You could try using maSigPro with log-cpm values and the default gaussian family, but I'd suggest instead using the edgeR package itself on the actual counts.

ADD COMMENT
0
Entering edit mode
@nicolasdescostes-13127
Last seen 3.1 years ago

ok it is working now. Thank you for the correction.

ADD COMMENT

Login before adding your answer.

Traffic: 835 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