Skip to content

Commit

Permalink
SDEV-4155 - switch to source.displayName for Pharmacogenomic filterin…
Browse files Browse the repository at this point in the history
…g - so same properties can be used to filter pori_ipr_python kbmatches. Replaced PHARMACOGENOMIC_SOURCE_EXCLUDE_LIST with GSC_PHARMACOGENOMIC_SOURCE_DISPLAYNAME_EXCLUDE_LIST.
  • Loading branch information
dustinbleile committed Feb 16, 2024
1 parent 15180c6 commit 13ee76a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion graphkb/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions graphkb/genes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 13ee76a

Please sign in to comment.