Question: genie3 package Error in (function (classes, fdef, mtable)
1
gravatar for Sam
6 weeks ago by
Sam100
Sam100 wrote:

Dear All

I have problem with genie3 package(inferring gene regulatory networks from expression data). Any idea why i am getting this error?

> head(test2)
      Sample1 Sample2 Sample3 Sample4 Sample5
Gene1       1       5       9       5       2
Gene2       3       7       7       2       2
Gene3       6       3       7       8      10
Gene4       5       1       9       9       4
Gene5       9      10       7       7       4
Gene6       3       4       9       5       7
> set.seed(123)
> weightMat <- GENIE3(test2)
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘GENIE3’ for signature ‘"data.frame"’
R genie3 • 123 views
ADD COMMENTlink modified 6 weeks ago by RamRS20k • written 6 weeks ago by Sam100
2
gravatar for RamRS
6 weeks ago by
RamRS20k
Houston, TX
RamRS20k wrote:

In my experience, this error happens when one tries to use an incompatible input type as an input parameter to a function as called from the current session with its loaded Namespaces. Given that GENIE3() is most probably not a function masked by a different namespace, it's probably just that the first parameter being passed to GENIE3() is of an invalid type.

From the manual, GENIE3() is described to accept a matrix, not a data.frame, which is what test2 is. Try using as.matrix(test2) as the input, that might work. You should also try Googling the error message and reading the manual carefully, as most error messages make the problem clear.

P.S.: To understand the "as called from the current session with its loaded Namespaces" part (the phenomenon called "namespace conflicts"), please see this StackOverflow answer.

ADD COMMENTlink modified 6 weeks ago • written 6 weeks ago by RamRS20k
2
gravatar for Santosh Anand
6 weeks ago by
Santosh Anand4.6k
Santosh Anand4.6k wrote:

I guess you need a matrix, whereas you are passing a data.frame. Try

GENIE3(as.matrix(test2))
ADD COMMENTlink written 6 weeks ago by Santosh Anand4.6k

Thanks a lot, it worked

ADD REPLYlink written 6 weeks ago by Sam100
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 2.3.0
Traffic: 1039 users visited in the last hour