-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add apomorphy-based phyloref #72
Conversation
9af3e17
to
1b3ccd9
Compare
This is so that phylorefs with no successes or failures are treated as test successes.
4b63d30
to
f102381
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So a UBERON term cannot be an exact match with an instance of a phenotype. This needs to be fixed. You could say that the phenotype
ro:inheres_in some obo:UBERON_0008271
(in OWL Manchester, not n-triples RDF, but you get the idea).
Second, we're extending the testcase
ontology, which strikes me as a non-starter too. Either we do need an ontology/vocabulary property for this (in which case the Phyloreferencing Ontology was made for precisely this purpose), or we don't. What you say is conflicting on this question.
@hlapp yes that's correct. Although in the KB we wrap that in 'has part', like |
Thanks for the input, @balhoff! Okay, so it sounds like I need to make three or four changes here:
|
|
Also modified PhyxWrapper to support this and added additional ontologies in testudinata_phylonym.json.
Thanks for the feedback, both of you! I've made some changes to the code, so that this how the apomorphy now looks like in Phyx: "apomorphy": {
"phenotype": "http://purl.obolibrary.org/obo/UBERON_0008271",
"phenotypicQuality": "http://purl.obolibrary.org/obo/PATO_0000467",
"definition": "A 'complete turtle shell' is herein defined as a composite structure consisting of a carapace with interlocking costals, neurals, peripherals, and a nuchal, together with the plastron comprising interlocking epi-, hyo-, meso- (lost in Testudo graeca), hypo-, xiphiplastra and an entoplastron. These are articulated with one another along a bridge. Additional elements may be present as well."
} Translated into Turtle/OWL, it now looks like this (as translated from the N-Quads file): phyloref:apomorphy [ a owl:Class ;
obo:IAO_0000115 "A 'complete turtle shell' is herein defined as a composite structure consisting of a carapace with interlocking costals, neurals, peripherals, and a nuchal, together with the plastron comprising interlocking epi-, hyo-, meso- (lost in Testudo graeca), hypo-, xiphiplastra and an entoplastron. These are articulated with one another along a bridge. Additional elements may be present as well." ;
rdfs:subClassOf <https://semanticscience.org/resource/SIO_010056> ;
owl:equivalentClass [ a owl:Class ;
owl:intersectionOf ( obo:PATO_0000467 [ a owl:Restriction ;
owl:onProperty obo:RO_0000052 ;
owl:someValuesFrom obo:UBERON_0008271 ] ) ] ] ; Does that look right? It doesn't quite work in Protege yet, but I think that's because the apomorphy itself isn't a named class -- it's currently an anonymous class. We could mandate that the user provide an Alternatively, I could just shelve the idea of translating the apomorphy into any kind of logical expression for now. I think we've identified the three Phyx fields we would need to express a phenotype in OWL ( |
Right, you can't really make an anonymous class that isn't some kind of expression (like the nested intersection blank node). And you can't use a class expression as the subject of an annotation property. 😕 |
@gaurav note that in the Turtle/OWL both the As for generating the logical expression, I agree this should be out of scope for now. We could do so for a default case (presence of some anatomical entity; or even a little more generally, a single non-relational quality inhering in a single entity), but as they go phenotypes can get very complex, and so can their logical expressions. Capturing that should be the subject of a future grant. |
Hi everybody!
Yeah. I guess we could have turned
I like "apomorphy": {
"phenotypeBearer": "http://purl.obolibrary.org/obo/UBERON_0008271",
"phenotypicQuality": "http://purl.obolibrary.org/obo/PATO_0000467",
"definition": "A 'complete turtle shell' is herein defined as a composite structure consisting of a carapace with interlocking costals, neurals, peripherals, and a nuchal, together with the plastron comprising interlocking epi-, hyo-, meso- (lost in Testudo graeca), hypo-, xiphiplastra and an entoplastron. These are articulated with one another along a bridge. Additional elements may be present as well."
} I've also added a bit of logic so that the phenotypeQuality in the OWL output will default to
Sounds good! I've taken that logic out. The OWL representation is pretty simple now: phyloref:apomorphy [
obo:IAO_0000115 "A 'complete turtle shell' is herein defined as ... elements may be present as well."
] ; Unless we want to include |
Sounds risky to me. What if the apomorphy is loss of a trait, and the curator forgets to change the default?
Shouldn't we add a type (subclass of SIO_010056)? |
Sounds good! I've fixed those in a663d94 and 5fe258a. I've updated the JSON and OWL representations in the description of this PR. Note that I used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So some issues pointed out earlier are starting to re-appear, which concerns me. Are we rushing and losing attention to detail?
Co-authored-by: Hilmar Lapp <hlapp@drycafe.net>
Co-authored-by: Hilmar Lapp <hlapp@drycafe.net>
I hope not, although I took a few days away from the project to clear my head just in case. To my mind, most of our earlier discussion was to do with how the apomorphy was being represented in Phyx and OWL/JSON-LD, which you didn't comment on in this set of feedback. So hopefully that is decided for now! Most of the issues you point to are either related to how we document these new fields or on other details relating to OWL imports and test suite structure, all of which were very useful. I think once we figure out the JSON Schema definition of |
This allows us to set `additionalProperties`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally 👍🏻
This PR adds an apomorphy-based phyloreference for testing "Testudinata". It also adds support for the "apomorphy" field in phyloreferences, makes an apomorphy-based phyloreference (i.e. one containing an apomorphy and a single internal specifier) valid, provides instructions on generating the correct JSON-LD for those and modifies the tests so that apomorphy-based phyloreferences can pass testing. In adding these features, I found three bugs, which I also fix in this PR:
test/example.js
script was only testing the Brochu 2003 test file. It now tests all JSON files in thetest/examples/correct
directory.name
field be provided for each author. It can now generate a name from a combination oflastname
,firstname
andmiddlename
fields.Based on the format we laid out in the manuscript, the phyloreference Testudinata looks like this in JSON:
And like this in Turtle (based on the NQ file, which can be opened in Protege):
If modeling apomorphies like this makes sense, we will need an additional class in phyloref.owl (
phyloref:PhyloreferenceUsingApomorphy
). Once this PR has been reviewed, I'll open an issue to add that. We could also include anapomorphy
RDF property in phyloref.owl (phyloref:apormophy
), but since this is not used for reasoning or in the Phyx format, I don't think it's necessary.Closes #28.