-
Notifications
You must be signed in to change notification settings - Fork 3
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
included
/ formerly
refactor
#167
base: develop
Are you sure you want to change the base?
Conversation
- Rename to be in line with what is in Mondo: includedEntryInOMIM
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.
Checked it in mondo, looks correct
omim2obo/main.py
Outdated
@@ -164,7 +164,7 @@ def omim2obo(use_cache: bool = False): | |||
# - Non-OMIM triples | |||
graph.add((URIRef('http://purl.obolibrary.org/obo/mondo/omim.owl'), RDF.type, OWL.Ontology)) | |||
graph.add((URIRef(oboInOwl.hasSynonymType), RDF.type, OWL.AnnotationProperty)) | |||
graph.add((URIRef(MONDONS.omim_included), RDF.type, OWL.AnnotationProperty)) | |||
graph.add((URIRef(MONDONS.includedEntryInOMIM), RDF.type, OWL.AnnotationProperty)) |
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.
Rename
Discussed w/ Nico today. These are not the same.We need to keep both.
- @joeflack4 Rename
omim_included
toomimIncluded
orOMIM_INCLUDED
(see: comment)- Do same for 'formerly'
- @joeflack4 Don't remove
includedEntryInOMIM
Look how clingen_label is formatted I think it's all upper case with underscore, so OMIM_INCLUDED should be as well (always check other examples of the same thing you are adding to determine correct casing) |
omim2obo/main.py
Outdated
@@ -164,7 +164,7 @@ def omim2obo(use_cache: bool = False): | |||
# - Non-OMIM triples | |||
graph.add((URIRef('http://purl.obolibrary.org/obo/mondo/omim.owl'), RDF.type, OWL.Ontology)) | |||
graph.add((URIRef(oboInOwl.hasSynonymType), RDF.type, OWL.AnnotationProperty)) | |||
graph.add((URIRef(MONDONS.omim_included), RDF.type, OWL.AnnotationProperty)) | |||
graph.add((URIRef(MONDONS.includedEntryInOMIM), RDF.type, OWL.AnnotationProperty)) |
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.
Snake or camel case
Look how clingen_label is formatted I think it's all upper case with underscore, so OMIM_INCLUDED should be as well (always check other examples of the same thing you are adding to determine correct casing)
Originally we were doing snake case, but then we 3 met a few weeks ago and coming out of that meeting, determined this and omimFormerly
should be camel case, but I don't remember why.
Edit:
<owl:AnnotationProperty rdf:about="http://purl.obolibrary.org/obo/mondo#CLINGEN_LABEL">
<rdfs:subPropertyOf rdf:resource="http://www.geneontology.org/formats/oboInOwl#SynonymTypeProperty"/>
</owl:AnnotationProperty>
@twhetzel Can make the judgement on this one?
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.
Based on this, I think UPPER_SNAKE_CASE is best.
1ab69db
to
4522ba5
Compare
4522ba5
to
0bd7c5a
Compare
@@ -141,6 +142,19 @@ def add_subclassof_restriction_with_evidence_and_source( | |||
add_axiom_annotations(graph, on, RDFS['subClassOf'], b, annotation_pred_vals) | |||
|
|||
|
|||
def add_included_synonym(graph: Graph, omim_uri: URIRef, synonym: str, is_symbol=False, is_formerly=False): |
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.
Several important changes
Trying to to open threads often. But I felt these were really important changes I should mention here.
Nico though it made sense for OMIM_INCLUDED and OMIM_FORMERLY to be synonym types, and Trish and I have started to discuss at meetings but haven't had time to fully dive in. If these changes are too much, I can undo.
- These are synonym types now
- The spelling/caps are now different
- If they are synonym types, that means I need to be adding synonyms for OMIM_INCLUDED, which we weren't doing before. This is kind of a major change. I chose
hasRelatedSynonym
. owl:deprecated
was being added forOMIM_FORMERLY
now I think does not make sense to add tohasRelatedSynonym
, so I removed it. We could also useMONDO:DEPRECATED
, but I think that maybeOIMIM_FORMERLY
stands on its own for explanation and might not need any additional annotations.
- Update: Made OMIM_INCLUDED & OMIM_FORMERLY synonymType - Update: Renamed these to UPPER_SNAKE_CASE - Update: OMIM_INCUDED is now a type on relatedSynonym rather than its own declaration. This result in addition of new synonyms. - Update: Retained includedEntryInOMIM as annotation property on synonyms - Add: Missing property declarations - Deleted: rdfs:comment related to 'included' - Refactor: Added abstraction: add_included_synonym()
0bd7c5a
to
e806fe2
Compare
- Delete: includedEntryInOMIM stuff just added. I had thought we had previously had this in the codebase, but we had not. This is an xref source value, but the way I was adding it in the last commit anyway was a bit confused; I had been adding it as a synonym source value.
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.
lgtm
Warning
These should be merged at the same time:
included
/formerly
refactor #167Changes
OMIM included & formerly refactor
Related: