owlcollab / owltools

OWLTools
BSD 3-Clause "New" or "Revised" License
107 stars 33 forks source link

GAF 2.2 relations are not properly emitted during GOlr loading #312

Open kltm opened 3 years ago

kltm commented 3 years ago

Loading GAF 2.2-centric files into owltools, then looking at the produced index, for annotation, the only qualifiers listed were:

(38043) | contributes_to
(11469) | not
(11363) | colocalizes_with

The two issues with this are 1) since all annotations now have a "qualifier", the total should add to 7813808 in our case and 2) the list of qualifiers should be a broad range from http://geneontology.org/docs/go-annotation-file-gaf-format-2.2/#qualifier-column-4 . These are mostly likely the same issue with no non-GAF 2.1 qualifier being emitted.

Looking at the source code with: grep -r colocalizes_with | grep -v test | grep -v Binary| grep -v GOBO We get:

OWLTools-Annotation/src/main/java/owltools/gaf/parser/GpadGpiObjectsBuilder.java:           relation = "colocalizes_with";
OWLTools-Annotation/src/main/java/owltools/gaf/parser/BuilderTools.java:    colocalizesWith("colocalizes_with", "colocali[zs]es[_ ]with"),
OWLTools-Annotation/src/main/java/owltools/gaf/parser/BuilderTools.java:    sb.append("colocalizes_with");
OWLTools-Annotation/src/main/java/owltools/gaf/parser/BuilderTools.java:    qualifiers.add("colocalizes_with");
OWLTools-Annotation/src/main/java/owltools/gaf/parser/GafObjectsBuilder.java:   relation = "colocalizes_with";
OWLTools-Solr/src/main/java/owltools/solrj/GafSolrDocumentLoader.java:      comb_aqual = comb_aqual + "colocalizes_with";
OWLTools-Solr/src/main/java/owltools/solrj/GafSolrDocumentLoader.java:      annotation_doc.addField("qualifier", "colocalizes_with");
Golr-Client/src/main/java/org/bbop/golr/java/RetrieveGolrAnnotations.java:  else if ("colocalizes_with".equalsIgnoreCase(qualifier)) {

Looking at some of the code in there, it seems pretty hardwired. Considering the schedule we're on, should we just hardwire in the new GAF 2.2 set, or is there a better way of getting at this besides a refactor?

Tagging @cmungall @balhoff