Question: masigpro: could not find function "negative.binomial"
0
gravatar for nicolas.descostes
10 months ago by
nicolas.descostes20 wrote:

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 • 208 views
ADD COMMENTlink modified 10 months ago • written 10 months ago by nicolas.descostes20

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 REPLYlink modified 10 months ago • written 10 months ago by shepherl ♦♦ 1.5k
Answer: masigpro: could not find function "negative.binomial"
1
gravatar for Gordon Smyth
10 months ago by
Gordon Smyth38k
Walter and Eliza Hall Institute of Medical Research, Melbourne, Australia
Gordon Smyth38k wrote:

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 COMMENTlink modified 10 months ago • written 10 months ago by Gordon Smyth38k
Answer: masigpro: could not find function "negative.binomial"
0
gravatar for nicolas.descostes
10 months ago by
nicolas.descostes20 wrote:

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

ADD COMMENTlink written 10 months ago by nicolas.descostes20
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 214 users visited in the last hour