Skip to content

Commit

Permalink
Updated to include edges that link biolink:Disease nodes to GO Terms …
Browse files Browse the repository at this point in the history
…and Pathways.
  • Loading branch information
beaslejt committed Oct 11, 2023
1 parent 7d15da1 commit 88b3b7e
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions parsers/biolink/src/loadBL.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,43 @@ def passes_qc_filter(line: list):
'biolink:treats'
}

PREDICATES_WITH_DISEASE_SUBJECT = {
'biolink:disrupts',
'biolink:caused_by',
'biolink:causes',
'biolink:has_participant'
}

ALLOWABLE_DISEASE_PHENOTYPE_PREFIXES = {
'MONDO:',
'UMLS:',
'OMIA:',
'OMIM:',
'OMIMPS:',
'MESH:',
'KEGG-ds:',
'HP:',
'DOID:',
'HGNC:',
'GeneReviews:',
'ORPHA:',
'EFO:',
'MP:'
}


def get_bl_edge_predicate(line: list):
predicate = line[EDGESDATACOLS.PREDICATE.value]
if predicate == 'biolink:biomarker_for' and not passes_qc_filter(line):
return None
elif predicate in PREDICATES_WITH_DISEASE_SUBJECT:
subject = line[EDGESDATACOLS.SUBJECT.value]
for prefix in ALLOWABLE_DISEASE_PHENOTYPE_PREFIXES:
if prefix in subject:
return predicate
else:
continue
return None
else:
return predicate if predicate in DESIRED_BL_PREDICATES else None

Expand Down

0 comments on commit 88b3b7e

Please sign in to comment.