owlcollab / owltools

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

GAF inference are incomplete because of incorrect mapping for part_of #238

Open cmungall opened 6 years ago

cmungall commented 6 years ago

Given this test GAF

!gaf-version: 2.1
PomBase SPCC1902.01 gaf1        GO:0001078  PMID:22900017   IDA     F   transcription factor Gaf1   SPCC417.01c protein taxon:4896  20170728    PomBase directly_negatively_regulates(PomBase:SPBC32C12.02),part_of(GO:0010515) 

this command

owltools target/go-gaf.owl --gaf test.gaf  --gaf-fold-inferences > results.txt

yields

Prediction=GO:0010515 'negative regulation of induction of conjugation with cellular fusion' // PomBase SPCC1902.01     gaf1            GO:0010515      PMID:22900017   IC      GO:0001078      F       transcription factor Gaf1       SPCC417.01c     protein taxon:4896      20170728        GOC-OWL directly_negatively_regulates(PomBase:SPBC32C12.02),part_of(GO:0010515)         

which is what we expect

However, this is not recapitulated when we run a different command, which should be using the same underlying machinery

owltools target/go-gaf.owl --gaf test.gaf --createReport  --gaf-prediction-file z  --gaf-report-file zz --gaf-run-checks

however, this is only the case for newer editions of the ontology. i.e. --gaf-fold-inferences works on old and new. However, --createReport works on only on old. Very odd...

cmungall commented 6 years ago

Additional docs on the procedure being used here: https://github.com/owlcollab/owltools/wiki/Annotation-Extension-Folding

cmungall commented 6 years ago

https://github.com/owlcollab/owltools/issues/238

the two contexts:

https://github.com/owlcollab/owltools/blob/41e1f585d7a8135081c3f2e56c4aa6590901227b/OWLTools-Annotation/src/main/java/owltools/gaf/rules/go/GoAnnotationPredictionRule.java#L105

https://github.com/owlcollab/owltools/blob/22c5a33e5f446ae08e3331e89a399a014c215d30/OWLTools-Runner/src/main/java/owltools/cli/GafCommandRunner.java#L285

cmungall commented 6 years ago

I think I've found it - the part_of in the c16 expression is somehow being mapped onto http://purl.obolibrary.org/obo/so#part_of

                            String extRelString = ext.getRelation();
                            OWLClass extCls = f.getOWLClass(g.getIRIByIdentifier(extClsString));
                            OWLObjectProperty extRel = g.getOWLObjectPropertyByIdentifier(extRelString);
cmungall commented 6 years ago

I think I've found it - the part_of in the c16 expression is somehow being mapped onto http://purl.obolibrary.org/obo/so#part_of

                            String extRelString = ext.getRelation();
                            OWLClass extCls = f.getOWLClass(g.getIRIByIdentifier(extClsString));
                            OWLObjectProperty extRel = g.getOWLObjectPropertyByIdentifier(extRelString);
cmungall commented 6 years ago

Also here BasicAnnotationPropagator.getDirectLinkedClasses