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

SDEV-4409 - replace PHARMACOGENOMIC_SOURCE_EXCLUDE_LIST with GSC_PHAR… #6

Merged
merged 3 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion pori_python/graphkb/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@
CANCER_GENE = "cancer gene"
FUSION_NAMES = ["structural variant", "fusion"]

PHARMACOGENOMIC_SOURCE_EXCLUDE_LIST = ["cancer genome interpreter", "civic"]
GSC_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
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
Loading