Some GOs are not in any of the three namespaces (Molecular Function, Cellular Component, Biological Process)
To print out the list of GOs with their namespace missing in Guile:
(use-modules (opencog) (opencog exec) (opencog bioscience))
; change the below paths as needed
(primitive-load "GO_2020-04-01.scm")
(primitive-load "GO_annotation_gene-level_2020-04-01.scm")
(primitive-load "Go-Plus-GO_2020-05-04.scm")
(for-each
(lambda (go)
(if (null? (cog-outgoing-set
(cog-execute!
(Get
(TypedVariable (Variable "$x") (Type "ConceptNode"))
(Evaluation (Predicate "GO_namespace") (List go (Variable "$x")))))))
(format #t "~a\n" (cog-name go))))
(filter
(lambda (c)
(string-prefix? "GO:" (cog-name c)))
(cog-get-atoms 'ConceptNode)))
Some GOs are not in any of the three namespaces (Molecular Function, Cellular Component, Biological Process)
To print out the list of GOs with their namespace missing in Guile: