@@ -375,19 +375,23 @@ def omim2obo(use_cache: bool = False):
375375
376376 # - Add relations (subclass restrictions)
377377 exclusions_p_mim_orcid_map : Dict [str , Optional [URIRef ]] = get_d2g_exclusions_by_curator ()
378- digenic_protection_gene_pheno_orcids : Dict [Tuple [str , str ], Optional [URIRef ]] = get_d2g_digenic_protections ()
378+ protections_gene_pheno__hgnc_orcid_map : Dict [Tuple [str , str ], Tuple [str , Optional [URIRef ]]] = \
379+ get_d2g_digenic_protections ()
379380 for p_mim , assocs in phenotype_genes .items ():
380381 for assoc in assocs :
381382 gene_mim , p_lab , p_map_key , p_map_lab = assoc ['gene_id' ], assoc ['phenotype_label' ], \
382383 assoc ['mapping_key' ], assoc ['mapping_label' ]
383384 evidence = f'Evidence: ({ p_map_key } ) { p_map_lab } '
384385 p_mim_excluded = p_mim in exclusions_p_mim_orcid_map
385386 protected_digenic_key = (p_mim , gene_mim )
386- protected_digenic_assoc : bool = protected_digenic_key in digenic_protection_gene_pheno_orcids
387387
388+ protected_digenic_assoc : bool = protected_digenic_key in protections_gene_pheno__hgnc_orcid_map
388389 if protected_digenic_assoc :
389- orcid : Optional [URIRef ] = digenic_protection_gene_pheno_orcids [protected_digenic_key ]
390- add_gene_disease_associations (graph , gene_mim , p_mim , evidence , orcid )
390+ hgnc_id_protected : str
391+ orcid_protected : Optional [URIRef ]
392+ hgnc_id_protected , orcid_protected = protections_gene_pheno__hgnc_orcid_map [protected_digenic_key ]
393+ add_gene_disease_associations (graph , gene_mim , p_mim , evidence , orcid_protected )
394+ graph .add ((OMIM [gene_mim ], SKOS .exactMatch , HGNC [hgnc_id_protected ]))
391395 continue
392396
393397 # Skip: No phenotype or unknown defect
0 commit comments