Skip to content

Commit

Permalink
SDEV-4409 - GSC_PHARMACOGENOMIC_SOURCE_EXCLUDE_LIST and GSC_PHARMACOG…
Browse files Browse the repository at this point in the history
…ENOMIC_SOURCE_DISPLAYNAME_EXCLUDE_LIST
  • Loading branch information
dustinbleile committed Jul 9, 2024
1 parent 43b35ef commit 76ec0f0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
1 change: 1 addition & 0 deletions pori_python/graphkb/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
CANCER_GENE = "cancer gene"
FUSION_NAMES = ["structural variant", "fusion"]

GSC_PHARMACOGENOMIC_SOURCE_EXCLUDE_LIST = ["cancer genome interpreter", "civic"]
GSC_PHARMACOGENOMIC_SOURCE_DISPLAYNAME_EXCLUDE_LIST = ["CGI", "CIViC"]

BASE_THERAPEUTIC_TERMS = ["therapeutic efficacy", "eligibility"]
Expand Down
17 changes: 6 additions & 11 deletions pori_python/graphkb/genes.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
CHROMOSOMES,
FAILED_REVIEW_STATUS,
GENE_RETURN_PROPERTIES,
GSC_PHARMACOGENOMIC_SOURCE_EXCLUDE_LIST,
ONCOGENE,
ONCOKB_SOURCE_NAME,
PHARMACOGENOMIC_SOURCE_EXCLUDE_LIST,
PREFERRED_GENE_SOURCE,
RELEVANCE_BASE_TERMS,
TSO500_SOURCE_NAME,
Expand All @@ -24,10 +24,7 @@


def _get_tumourigenesis_genes_list(
conn: GraphKBConnection,
relevance: str,
sources: List[str],
ignore_cache: bool = False,
conn: GraphKBConnection, relevance: str, sources: List[str], ignore_cache: bool = False
) -> List[Ontology]:
statements = cast(
List[Statement],
Expand Down Expand Up @@ -274,12 +271,10 @@ def get_gene_linked_cancer_predisposition_info(
"evidence": {
"target": "Source",
"filters": {"@rid": get_rid(conn, "Source", "CGL")},
},
},
{
"relevance": {"target": "Vocabulary", "filters": {"@rid": relevance_rids}},
}
},
],
{"relevance": {"target": "Vocabulary", "filters": {"@rid": relevance_rids}}},
]
},
"returnProperties": [
"conditions.@class",
Expand Down Expand Up @@ -380,7 +375,7 @@ def get_gene_linked_pharmacogenomic_info(
ignore_cache=False,
):
if record["source"]: # type: ignore
if record["source"]["name"].lower() in PHARMACOGENOMIC_SOURCE_EXCLUDE_LIST: # type: ignore
if record["source"]["name"].lower() in GSC_PHARMACOGENOMIC_SOURCE_EXCLUDE_LIST: # type: ignore
continue

for condition in record["conditions"]: # type: ignore
Expand Down

0 comments on commit 76ec0f0

Please sign in to comment.