MOZI-AI / annotation-scheme

Human Gene annotation service backend
GNU General Public License v3.0
3 stars 4 forks source link

Crash in gene-pathway-annotation when namespace is set. #91

Closed linas closed 4 years ago

linas commented 4 years ago

Loading the current datasets, and running this:

(gene-pathway-annotation gene-list
      "my-path-results"
      #:pathway "reactome smpdb"
      #:namespace "biological_process molecular_function cellular_component"
      #:parents 0))

results in a crash:

Backtrace:
In ice-9/boot-9.scm:
   260:13 19 (for-each #<procedure 7f22f81a39b0 at annotation/gene-pathway.…> …)
   260:13 18 (for-each #<procedure 7f22f81a3000 at annotation/gene-pathway.…> …)
In annotation/gene-pathway.scm:\n    44:10 17 (_ _)
   109:24 16 (reactome \"NDUFAF7\" \"True\" \"True\" _ # 1)
In ice-9/boot-9.scm:
   222:17 15 (map1 (#))
In annotation/gene-pathway.scm:
   115:32 14 (_ _)
In annotation/functions.scm:
   301:22 13 (find-pathway-genes _ _)
In unknown file:
          12 (opencog-extension cog-execute! (#))
In ice-9/boot-9.scm:
  1722:10 11 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In unknown file:
          10 (apply-smob/0 #<thunk 7f22ea068b60>)
In ice-9/boot-9.scm:
  1722:10  9 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In unknown file:
           8 (apply-smob/0 #<thunk 7f22ea068b20>)
In annotation/functions.scm:
  339:124  7 (add-pathway-genes _ _ _)
    125:2  6 (find-go-term \"ECSIT\" (\"biological_process\" \"molecular_func…\" …) …)
     71:6  5 (find-memberln \"ECSIT\" (\"biological_process\" \"molecular_func…\" …))
In srfi/srfi-1.scm:
    634:9  4 (for-each #<procedure 7f22ea06a020 at annotation/functions.scm…> …)
In annotation/functions.scm:
    76:14  3 (_ \"biological_process\")
In unknown file:
           2 (cog-new-link 81 \"ECSIT\" (VariableNode \"$a\")
)
In ice-9/boot-9.scm:
  1655:16  1 (raise-exception _ #:continuable? _)
In unknown file:
           0 (apply-smob/1 #<exception-handler 7f22ea068b00> #<&compound-exc…>)

ERROR: In procedure apply-smob/1:
In procedure cog-new-link: Wrong type argument in position 2 (expecting opencog atom): \"ECSIT\"
ABORT: wrong-type-arg
 (/home/ubuntu/src/atomspace/opencog/guile/SchemeEval.cc:1066)
Function args:
((BindLink
   (VariableList
      (TypedVariableLink
         (VariableNode \"$p\")
         (TypeNode \"MoleculeNode\")
      )
      (TypedVariableLink
         (VariableNode \"$g\")
         (TypeNode \"GeneNode\")
      )
   )
   (AndLink
      (MemberLink
         (VariableNode \"$p\")
         (ConceptNode \"R-HSA-6799198\")
      )      (EvaluationLink
         (PredicateNode \"expresses\")
         (ListLink
            (VariableNode \"$g\")
            (VariableNode \"$p\")
         )
      )
   )
   (ExecutionOutputLink
      (GroundedSchemaNode \"scm: add-pathway-genes\")
      (ListLink
         (ConceptNode \"R-HSA-6799198\")
         (VariableNode \"$g\")
         (ListLink
            (ConceptNode \"biological_process molecular_function cellular_component\")
            (NumberNode \"0\")
         )
      )
   )
)
)")'.
linas commented 4 years ago

I'll bet that this is a manirestation of #83 where sometimes strings arre passed around, and sometimes atoms.

linas commented 4 years ago

Note also: there is no crash when running with the default empty string for #:namespace

Habush commented 4 years ago

@tanksha wasn't gene ECSIT one of the two genes (the other being SKAP2) that were giving us issues? I thought you fixed the issue. Please check again

tanksha commented 4 years ago

@Habush this is not for ECSIT only, but there is a problem with cross-annotating GO from pathways. As there is no crash when running with empty string for #:namespace. I am checking where

tanksha commented 4 years ago

@linas I have fixed this issue. check the latest push

linas commented 4 years ago

Closing, I assume this is fixed in pull req #102 (I will test later) Note however, that #83 where this first shows up, still remains unaddressed.