Skip to content

Commit

Permalink
adding Clinical Connections, cleaning up
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanDietzMorris committed Oct 28, 2024
1 parent 5c42ff8 commit 7005505
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
6 changes: 4 additions & 2 deletions Common/data_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
CTD = 'CTD'
DRUG_CENTRAL = 'DrugCentral'
DRUGMECHDB = 'DrugMechDB'
EHRMAYTREAT = 'EHRMayTreat'
EHRCLINICALCONNECTIONS = 'EHRClinicalConnections'
# FOODB = 'FooDB' # this is on hold, data needs review after latest release of data.
GENOME_ALLIANCE_ORTHOLOGS = 'GenomeAllianceOrthologs'
GTEX = 'GTEx'
Expand All @@ -23,7 +25,6 @@
LITCOIN_SAPBERT = 'LitCoinSapBERT'
LITCOIN_ENTITY_EXTRACTOR = 'LitCoinEntityExtractor'
KINACE = 'KinAce'
MAYTREATKP = 'EHRMayTreatKP'
MOLEPRO = 'MolePro'
MONARCH_KG = 'MonarchKG'
MONDO_PROPS = 'MONDOProps'
Expand Down Expand Up @@ -72,7 +73,8 @@
LITCOIN_ENTITY_EXTRACTOR: ("parsers.LitCoin.src.loadLitCoin", "LitCoinEntityExtractorLoader"),
LITCOIN_SAPBERT: ("parsers.LitCoin.src.loadLitCoin", "LitCoinSapBERTLoader"),
KINACE: ("parsers.KinAce.src.loadKinAce", "KinAceLoader"),
MAYTREATKP: ("parsers.ehr.src.loadEHR", "EHRMayTreatLoader"),
EHRMAYTREAT: ("parsers.ehr.src.loadEHR", "EHRMayTreatLoader"),
EHRCLINICALCONNECTIONS: ("parsers.ehr.src.loadEHR", "EHRClinicalConnectionsLoader"),
MOLEPRO: ("parsers.molepro.src.loadMolePro", "MoleProLoader"),
MONARCH_KG: ("parsers.monarchkg.src.loadMonarchKG", "MonarchKGLoader"),
MONDO_PROPS: ("parsers.MONDOProperties.src.loadMP", "MPLoader"),
Expand Down
25 changes: 23 additions & 2 deletions parsers/ehr/src/loadEHR.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ def __init__(self, test_mode: bool = False, source_data_dir: str = None):
"""
super().__init__(test_mode=test_mode, source_data_dir=source_data_dir)

self.data_url: str = 'https://stars.renci.org/var/data_services/ehrmaytreatkp/'
self.edge_file_name: str = 'edges.csv'
self.data_url: str = 'https://raw.githubusercontent.com/Hadlock-Lab/EHRMLA_KPs/main/May%20Treat/csvs/'
self.edge_file_name: str = 'May_Treat_KP_edges_latest_deploy.csv'
self.data_file = self.edge_file_name
self.version_file = 'ehr-may-treat-kp.yaml'

Expand Down Expand Up @@ -86,3 +86,24 @@ def parse_data(self) -> dict:
'unusable_source_lines': skipped_record_counter}
return load_metadata


class EHRClinicalConnectionsLoader(EHRMayTreatLoader):
source_id: str = "EHRClinicalConnectionsKP"
provenance_id: str = "infores:isb-EHRMLA-clinicalconnections"
description = "Multiomics EHRMLA Clinical Connections KP."
source_data_url = "https://github.com/NCATSTranslator/Translator-All/wiki/Multiomics-EHRMLA-May-Treat-KP"
license = "https://github.com/NCATSTranslator/Translator-All/wiki/Multiomics-EHRMLA-May-Treat-KP"
attribution = "https://github.com/NCATSTranslator/Translator-All/wiki/Multiomics-EHRMLA-May-Treat-KP"
parsing_version = "1.0"

def __init__(self, test_mode: bool = False, source_data_dir: str = None):
"""
:param test_mode - sets the run into test mode
:param source_data_dir - the specific storage directory to save files in
"""
super().__init__(test_mode=test_mode, source_data_dir=source_data_dir)

self.data_url: str = 'https://raw.githubusercontent.com/Hadlock-Lab/EHRMLA_KPs/main/Clinical%20Connections/csvs/'
self.edge_file_name: str = 'ClinicalConnections_KP_edges_latest_deploy.csv'
self.data_file = self.edge_file_name
self.version_file = 'ehr-clinical-connections-kp.yaml'

0 comments on commit 7005505

Please sign in to comment.