Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "target_for" edges from loadPHAROS.py #256

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading