Skip to content

Commit

Permalink
Add "target_for" edges from loadPHAROS.py
Browse files Browse the repository at this point in the history
  • Loading branch information
beasleyjonm committed Aug 23, 2024
1 parent b124dfb commit f4e4003
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion parsers/PHAROS/src/loadPHAROS.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def __init__(self, test_mode: bool = False, source_data_dir: str = None):
self.source_db = 'Target Central Resource Database'
self.pharos_db = None
self.genetic_association_predicate = 'WIKIDATA_PROPERTY:P2293'
self.target_for_predicate = "biolink:target_for"

def get_latest_source_version(self) -> str:
"""
Expand Down Expand Up @@ -216,9 +217,13 @@ def parse_gene_to_disease(self) -> (int, int):
self.output_file_writer.write_kgx_node(gene_node)

if edge_provenance:
if edge_provenance == "infores:drugcentral":
assigned_predicate = self.target_for_predicate
else:
assigned_predicate = self.genetic_association_predicate
gene_to_disease_edge = kgxedge(subject_id=gene_id,
object_id=disease_id,
predicate=self.genetic_association_predicate,
predicate=assigned_predicate,
edgeprops=edge_properties,
primary_knowledge_source=edge_provenance,
aggregator_knowledge_sources=[self.provenance_id])
Expand Down

0 comments on commit f4e4003

Please sign in to comment.