Skip to content

Commit

Permalink
Disease-Gene Exclusions
Browse files Browse the repository at this point in the history
- Update: Added Sabrina's ORCID to exclusions file.
- Bug fix: Was still not filtering exlcusions correctly; was missing a logical condition.
- Bug fix?: Added RO:0003302 entries to disease-gene-relationships (.sparql / .tsv). I think these were previously left out by mistake.
- Update: A comment to be more clear
  • Loading branch information
joeflack4 committed Dec 14, 2024
1 parent 8b41b67 commit 1be4a68
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 23 deletions.
14 changes: 7 additions & 7 deletions data/exclusions-disease-gene.tsv
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
omim_id mondo_id mondo_label orcid exclusion_reason_comment
OMIM:603956 MONDO:0002974 cervical cancer' evidence of various genes involved
OMIM:619151 MONDO:0030894 AMED syndrome, digenic' digenic
OMIM:158901 MONDO:0008031 digenic
OMIM:108770 MONDO:0007171 atrial standstill 1' digenic
OMIM:620040 MONDO:0031057 dyskeratosis congenita, digenic' digenic
OMIM:619478 MONDO:0030355 facioscapulohumeral muscular dystrophy 4, digenic' digenic
OMIM:300818 MONDO:0010438 paroxysmal nocturnal hemoglobinuria 1 disease caused by a somatic mutation, therefore a gene association stating this is due to a germline mutation should not be added
OMIM:603956 MONDO:0002974 cervical cancer' https://orcid.org/0000-0002-4142-7153 evidence of various genes involved
OMIM:619151 MONDO:0030894 "AMED syndrome, digenic'" https://orcid.org/0000-0002-4142-7153 digenic
OMIM:158901 MONDO:0008031 https://orcid.org/0000-0002-4142-7153 digenic
OMIM:108770 MONDO:0007171 atrial standstill 1' https://orcid.org/0000-0002-4142-7153 digenic
OMIM:620040 MONDO:0031057 "dyskeratosis congenita, digenic'" https://orcid.org/0000-0002-4142-7153 digenic
OMIM:619478 MONDO:0030355 "facioscapulohumeral muscular dystrophy 4, digenic'" https://orcid.org/0000-0002-4142-7153 digenic
OMIM:300818 MONDO:0010438 paroxysmal nocturnal hemoglobinuria 1 https://orcid.org/0000-0002-4142-7153 "disease caused by a somatic mutation, therefore a gene association stating this is due to a germline mutation should not be added"
20 changes: 4 additions & 16 deletions omim2obo/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,20 +132,6 @@ def add_subclassof_restriction_with_evidence_and_source(
# Add restriction on MIM class
b: BNode = add_subclassof_restriction(graph, predicate, some_values_from, on)
# Add axiom to restriction
# TODO temp: remove comments when verified in OFN that there is no diff
# b2 = BNode()
# graph.add((b2, RDF['type'], OWL['Axiom']))
# graph.add((b2, OWL['annotatedSource'], on))
# graph.add((b2, OWL['annotatedProperty'], RDFS['subClassOf']))
# graph.add((b2, OWL['annotatedTarget'], b))

# axiom = BNode()
# graph.add((axiom, RDF.type, OWL.Axiom))
# graph.add((axiom, OWL.annotatedProperty, prop))
# graph.add((axiom, OWL.annotatedTarget, target))

# graph.add((b2, BIOLINK['has_evidence'], evidence))
# graph.add((b2, RDFS['comment'], evidence))
annotation_pred_vals = [
(BIOLINK['has_evidence'], evidence),
(RDFS['comment'], evidence)
Expand Down Expand Up @@ -394,11 +380,13 @@ def omim2obo(use_cache: bool = False):
if not p_mim or p_map_key == '1':
continue

# Add restrictions: Gene->Disease non-causal (disease-defining) relationships
# Add restrictions: Gene->Disease non-causal / non-disease-defining relationships
# - RO:0003302 docs: see MORBIDMAP_PHENOTYPE_MAPPING_KEY_PREDICATES
# - Mapping key 3 = 'causal' (disease-defining). Handled separately below.
if p_map_key != '3' or p_mim_excluded:
g2d_pred = MORBIDMAP_PHENOTYPE_MAPPING_KEY_PREDICATES[p_map_key] if len(assocs) == 1 else RO['0003302']
g2d_pred = MORBIDMAP_PHENOTYPE_MAPPING_KEY_PREDICATES[p_map_key] \
if len(assocs) == 1 and not p_mim_excluded \
else RO['0003302']
orcid: Optional[URIRef] = exclusions_p_mim_orcid_map[p_mim] if p_mim_excluded else None
add_subclassof_restriction_with_evidence_and_source(
graph, g2d_pred, OMIM[p_mim], OMIM[gene_mim], evidence, orcid)
Expand Down
1 change: 1 addition & 0 deletions sparql/disease-gene-relationships.sparql
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ WHERE {

FILTER(
?PredUri IN (
<http://purl.obolibrary.org/obo/RO_0003302>,
<http://purl.obolibrary.org/obo/RO_0003303>,
<http://purl.obolibrary.org/obo/RO_0003304>,
<http://purl.obolibrary.org/obo/RO_0004013>,
Expand Down

0 comments on commit 1be4a68

Please sign in to comment.