From 1838e7e0fbc8b497ed4232e2fbaa12c7bf896943 Mon Sep 17 00:00:00 2001 From: Joe Flack Date: Mon, 4 Nov 2024 17:13:07 -0500 Subject: [PATCH] Bug fix: Gene-Disease relationships - Bug fix: Removed accidental "causal" G2D restrictions being added when the corresponding D2G was not found to be definitively causal. --- omim2obo/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/omim2obo/main.py b/omim2obo/main.py index f8259fd..af29ebb 100644 --- a/omim2obo/main.py +++ b/omim2obo/main.py @@ -319,8 +319,9 @@ def omim2obo(use_cache: bool = False): # Gene->Disease non-causal relationships # - RO:0003302 docs: see MORBIDMAP_PHENOTYPE_MAPPING_KEY_PREDICATES - g2d_pred = MORBIDMAP_PHENOTYPE_MAPPING_KEY_PREDICATES[p_map_key] if len(assocs) == 1 else RO['0003302'] - add_subclassof_restriction_with_evidence(graph, g2d_pred, OMIM[p_mim], OMIM[gene_mim], evidence) + if p_map_key != 3: # 3 = 'causal'. Handled separately below. + g2d_pred = MORBIDMAP_PHENOTYPE_MAPPING_KEY_PREDICATES[p_map_key] if len(assocs) == 1 else RO['0003302'] + add_subclassof_restriction_with_evidence(graph, g2d_pred, OMIM[p_mim], OMIM[gene_mim], evidence) # Disease->Gene & Gene->Disease: Causal relationships # - Skip non-causal cases