From 13ee76a7ea2fdfc94772650203fe276e95c163da Mon Sep 17 00:00:00 2001 From: Dustin Bleile Date: Fri, 16 Feb 2024 10:55:57 -0800 Subject: [PATCH] SDEV-4155 - switch to source.displayName for Pharmacogenomic filtering - so same properties can be used to filter pori_ipr_python kbmatches. Replaced PHARMACOGENOMIC_SOURCE_EXCLUDE_LIST with GSC_PHARMACOGENOMIC_SOURCE_DISPLAYNAME_EXCLUDE_LIST. --- graphkb/constants.py | 2 +- graphkb/genes.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/graphkb/constants.py b/graphkb/constants.py index d8fd66e..82a1af1 100644 --- a/graphkb/constants.py +++ b/graphkb/constants.py @@ -66,7 +66,7 @@ CANCER_GENE = "cancer gene" FUSION_NAMES = ["structural variant", "fusion"] -PHARMACOGENOMIC_SOURCE_EXCLUDE_LIST = ["cancer genome interpreter", "civic"] +GSC_PHARMACOGENOMIC_SOURCE_DISPLAYNAME_EXCLUDE_LIST = ["CGI", "CIViC"] BASE_THERAPEUTIC_TERMS = ["therapeutic efficacy", "eligibility"] # the order here is the order these are applied, the first category matched is returned diff --git a/graphkb/genes.py b/graphkb/genes.py index b6e06b5..502577b 100644 --- a/graphkb/genes.py +++ b/graphkb/genes.py @@ -10,7 +10,7 @@ GENE_RETURN_PROPERTIES, ONCOGENE, ONCOKB_SOURCE_NAME, - PHARMACOGENOMIC_SOURCE_EXCLUDE_LIST, + GSC_PHARMACOGENOMIC_SOURCE_DISPLAYNAME_EXCLUDE_LIST, PREFERRED_GENE_SOURCE, RELEVANCE_BASE_TERMS, TSO500_SOURCE_NAME, @@ -349,12 +349,13 @@ def get_pharmacogenomic_info( "conditions.reference2.biotype", "conditions.reference2.displayName", "source.name", + "source.displayName", ], }, ignore_cache=False, ): if record["source"]: # type: ignore - if record["source"]["name"].lower() in PHARMACOGENOMIC_SOURCE_EXCLUDE_LIST: # type: ignore + if record["source"]["displayName"] in GSC_PHARMACOGENOMIC_SOURCE_DISPLAYNAME_EXCLUDE_LIST: # type: ignore continue for condition in record["conditions"]: # type: ignore