phenopackets / phenopacket-reference-implementation

Reference java implementation for phenopackets
BSD 3-Clause "New" or "Revised" License
6 stars 9 forks source link

Consider adding a ClassInstance accessor for inferred_types #44

Open cmungall opened 8 years ago

cmungall commented 8 years ago

The current ClassInstance.types variable is intended for direct types.

We could add an optional inferred_types field that stores the superclasses and equivalence classes. This is useful in architectures where the query engine is ontology-unaware (e.g. most DBMSs). An ontology-aware processor (e.g. part of phenotools) could take a packet P, populate the inferred_types to produce P*. The database engine then loads P* and is able to efficiently return valid and complete phenotype query results.

julesjacobsen commented 8 years ago

Would this only be used in the API, but not exposed in the YAML/JSON?

balhoff commented 8 years ago

I am guessing do expose in the YAML/JSON. Someone can use an ontology-aware tool such as pxftools to populate the inferred_types fields, and then pass the file to another system that can read phenopacket files but doesn't have ontology capabilities.