From c637d41dd24acbac344b4199e769f77a813c4235 Mon Sep 17 00:00:00 2001 From: Eleanor Lewis Date: Tue, 9 Dec 2025 14:34:37 -0800 Subject: [PATCH 01/11] remove default urls and rid --- pori_python/graphkb/__init__.py | 1 - pori_python/graphkb/constants.py | 5 ----- pori_python/graphkb/genes.py | 5 ++--- pori_python/graphkb/util.py | 4 ++-- pori_python/ipr/connection.py | 3 +-- pori_python/ipr/constants.py | 1 - pori_python/ipr/inputs.py | 3 +-- pori_python/ipr/main.py | 6 +++--- tests/test_graphkb/test_genes.py | 5 +++-- 9 files changed, 12 insertions(+), 21 deletions(-) diff --git a/pori_python/graphkb/__init__.py b/pori_python/graphkb/__init__.py index a6fdd663..acce57aa 100644 --- a/pori_python/graphkb/__init__.py +++ b/pori_python/graphkb/__init__.py @@ -1,2 +1 @@ -from .constants import DEFAULT_URL # noqa: F401 from .util import GraphKBConnection, logger # noqa: F401 diff --git a/pori_python/graphkb/constants.py b/pori_python/graphkb/constants.py index 4861d70c..b068fdfc 100644 --- a/pori_python/graphkb/constants.py +++ b/pori_python/graphkb/constants.py @@ -4,12 +4,7 @@ from pori_python.types import CategoryBaseTermMapping DEFAULT_LIMIT = 1000 -GKB_BASE_URL = "https://graphkb-api.bcgsc.ca/api" -GKB_STAGING_URL = "https://graphkbstaging-api.bcgsc.ca/api" -GKB_DEV_URL = "https://graphkbdev-api.bcgsc.ca/api" -DEFAULT_URL = GKB_BASE_URL -PREFERRED_GENE_SOURCE = "#39:5" # HGNC PREFERRED_GENE_SOURCE_NAME = "HGNC" BASE_RETURN_PROPERTIES = ["@rid", "@class"] diff --git a/pori_python/graphkb/genes.py b/pori_python/graphkb/genes.py index e61e3cf5..d619c0ed 100644 --- a/pori_python/graphkb/genes.py +++ b/pori_python/graphkb/genes.py @@ -17,7 +17,6 @@ GSC_PHARMACOGENOMIC_SOURCE_EXCLUDE_LIST, ONCOGENE, ONCOKB_SOURCE_NAME, - PREFERRED_GENE_SOURCE, PREFERRED_GENE_SOURCE_NAME, RELEVANCE_BASE_TERMS, TSO500_SOURCE_NAME, @@ -267,7 +266,7 @@ def get_cancer_predisposition_info( def get_gene_linked_cancer_predisposition_info( - conn: GraphKBConnection, source: str = PREFERRED_GENE_SOURCE + conn: GraphKBConnection, source: str ) -> Tuple[List[str], Dict[str, Tuple[str, List[str]]]]: """ Return two lists from GraphKB, one of cancer predisposition genes and one of associated variants. @@ -372,7 +371,7 @@ def get_pharmacogenomic_info( def get_gene_linked_pharmacogenomic_info( - conn: GraphKBConnection, source: str = PREFERRED_GENE_SOURCE + conn: GraphKBConnection, source: str ) -> Tuple[List[str], Dict[str, Tuple[str, List[str]]]]: """ Return two lists from GraphKB, one of pharmacogenomic genes and one of associated variants. diff --git a/pori_python/graphkb/util.py b/pori_python/graphkb/util.py index 2ff8620c..bbc67766 100644 --- a/pori_python/graphkb/util.py +++ b/pori_python/graphkb/util.py @@ -14,7 +14,7 @@ from pori_python.types import ParsedVariant, PositionalVariant, Record -from .constants import DEFAULT_LIMIT, DEFAULT_URL, TYPES_TO_NOTATION, AA_3to1_MAPPING +from .constants import DEFAULT_LIMIT, TYPES_TO_NOTATION, AA_3to1_MAPPING QUERY_CACHE: Dict[Any, Any] = {} @@ -98,7 +98,7 @@ def cache_key(request_body) -> str: class GraphKBConnection: def __init__( self, - url: str = os.environ.get("GRAPHKB_URL", DEFAULT_URL), + url: str = os.environ.get("GRAPHKB_URL"), username: str = "", password: str = "", use_global_cache: bool = True, diff --git a/pori_python/ipr/connection.py b/pori_python/ipr/connection.py index f2652fdd..dca4687d 100644 --- a/pori_python/ipr/connection.py +++ b/pori_python/ipr/connection.py @@ -6,7 +6,6 @@ import zlib from typing import Dict, List -from .constants import DEFAULT_URL from .util import logger IMAGE_MAX = 20 # cannot upload more than 20 images at a time @@ -17,7 +16,7 @@ def __init__( self, username: str, password: str, - url: str = os.environ.get("IPR_URL", DEFAULT_URL), + url: str = os.environ.get("IPR_URL"), ): self.token = None self.url = url diff --git a/pori_python/ipr/constants.py b/pori_python/ipr/constants.py index 2ed2a3f2..dd8718aa 100644 --- a/pori_python/ipr/constants.py +++ b/pori_python/ipr/constants.py @@ -1,4 +1,3 @@ -DEFAULT_URL = "https://iprstaging-api.bcgsc.ca/api" GERMLINE_BASE_TERMS = ("pharmacogenomic", "cancer predisposition") # based on graphkb.constants VARIANT_CLASSES = {"Variant", "CategoryVariant", "PositionalVariant", "CatalogueVariant"} diff --git a/pori_python/ipr/inputs.py b/pori_python/ipr/inputs.py index 1089539f..3cfe526c 100644 --- a/pori_python/ipr/inputs.py +++ b/pori_python/ipr/inputs.py @@ -25,7 +25,6 @@ from .constants import ( COSMIC_SIGNATURE_VARIANT_TYPE, - DEFAULT_URL, HLA_SIGNATURE_VARIANT_TYPE, MSI_MAPPING, HRD_MAPPING, @@ -39,7 +38,7 @@ SPECIFICATION = os.path.join(os.path.dirname(__file__), "content.spec.json") # content in the local specification should match the values in IPR_API_SPEC_JSON_URL -IPR_API_SPEC_JSON_URL = f'{os.environ.get("IPR_URL", DEFAULT_URL)}/spec.json' +IPR_API_SPEC_JSON_URL = f'{os.environ.get("IPR_URL")}/spec.json' # TODO: GERO-307 - use SPECIFICATION json to derive the variant required and optional details defined below diff --git a/pori_python/ipr/main.py b/pori_python/ipr/main.py index fe740ae4..b7cd761d 100644 --- a/pori_python/ipr/main.py +++ b/pori_python/ipr/main.py @@ -23,7 +23,7 @@ from .annotate import annotate_variants from .connection import IprConnection -from .constants import DEFAULT_URL, TMB_SIGNATURE_HIGH_THRESHOLD +from .constants import TMB_SIGNATURE_HIGH_THRESHOLD from .inputs import ( check_comparators, check_variant_links, @@ -86,7 +86,7 @@ def command_interface() -> None: "-c", "--content", required=True, type=file_path, help="Report Content as JSON" ) - parser.add_argument("--ipr_url", default=os.environ.get("IPR_URL", DEFAULT_URL)) + parser.add_argument("--ipr_url", default=os.environ.get("IPR_URL")) parser.add_argument( "--graphkb_username", help="username to use connecting to graphkb if different from ipr", @@ -294,7 +294,7 @@ def ipr_report( username: str, password: str, content: Dict, - ipr_url: str = DEFAULT_URL, + ipr_url: str, log_level: str = "info", output_json_path: str = "", always_write_output_json: bool = False, diff --git a/tests/test_graphkb/test_genes.py b/tests/test_graphkb/test_genes.py index fd97ffcd..84d86c0e 100644 --- a/tests/test_graphkb/test_genes.py +++ b/tests/test_graphkb/test_genes.py @@ -18,6 +18,7 @@ get_pharmacogenomic_info, get_preferred_gene_name, get_therapeutic_associated_genes, + PREFERRED_GENE_SOURCE_NAME ) from pori_python.graphkb.util import get_rid @@ -171,7 +172,7 @@ def test_get_pharmacogenomic_info(conn): EXCLUDE_BCGSC_TESTS, reason="excluding BCGSC-specific tests (requires CGL loader))" ) def test_get_gene_linked_pharmacogenomic_info(conn): - genes, matches = get_gene_linked_pharmacogenomic_info(conn) + genes, matches = get_gene_linked_pharmacogenomic_info(conn, PREFERRED_GENE_SOURCE_NAME) for gene in PHARMACOGENOMIC_INITIAL_GENES: assert gene in genes, f"{gene} not found in get_pharmacogenomic_info" for rid, variant_info in matches.items(): @@ -197,7 +198,7 @@ def test_get_cancer_predisposition_info(conn): EXCLUDE_BCGSC_TESTS, reason="excluding BCGSC-specific tests (requires CGL loader))" ) def test_get_gene_linked_cancer_predisposition_info(conn): - genes, matches = get_gene_linked_cancer_predisposition_info(conn) + genes, matches = get_gene_linked_cancer_predisposition_info(conn, PREFERRED_GENE_SOURCE_NAME) for gene in CANCER_PREDISP_INITIAL_GENES: assert gene in genes, f"{gene} not found in get_cancer_predisposition_info" From b0bb3ae25f9a433916861d7942f5bbad77cf85a6 Mon Sep 17 00:00:00 2001 From: Eleanor Lewis Date: Tue, 9 Dec 2025 14:37:38 -0800 Subject: [PATCH 02/11] lint with black --- tests/test_graphkb/test_genes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_graphkb/test_genes.py b/tests/test_graphkb/test_genes.py index 84d86c0e..1c2862fa 100644 --- a/tests/test_graphkb/test_genes.py +++ b/tests/test_graphkb/test_genes.py @@ -18,7 +18,7 @@ get_pharmacogenomic_info, get_preferred_gene_name, get_therapeutic_associated_genes, - PREFERRED_GENE_SOURCE_NAME + PREFERRED_GENE_SOURCE_NAME, ) from pori_python.graphkb.util import get_rid From 9463238d67f8333d40447e9f45265daea811eb96 Mon Sep 17 00:00:00 2001 From: Eleanor Lewis Date: Tue, 9 Dec 2025 14:51:15 -0800 Subject: [PATCH 03/11] add gkb test url to test workflows --- .github/workflows/pytest.yml | 1 + .github/workflows/quick-pytest.yml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 607c0c6e..866a822f 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -46,6 +46,7 @@ jobs: IPR_PASS: ${{ secrets.IPR_TEST_PASSWORD }} GRAPHKB_USER: ${{ secrets.GKB_TEST_USER }} GRAPHKB_PASS: ${{ secrets.GKB_TEST_PASS }} + GRAPHKB_URL: ${{ secrets.GKB_TEST_URL }} # SDEV-3381 - Turn off integration tests temporarily, till efficiency is increased # turn on integration tests for one python version only EXCLUDE_INTEGRATION_TESTS: ${{ matrix.python-version != '3.11' }} diff --git a/.github/workflows/quick-pytest.yml b/.github/workflows/quick-pytest.yml index d4f70223..97868378 100644 --- a/.github/workflows/quick-pytest.yml +++ b/.github/workflows/quick-pytest.yml @@ -41,6 +41,7 @@ jobs: IPR_PASS: ${{ secrets.IPR_TEST_PASSWORD }} GRAPHKB_USER: ${{ secrets.GKB_TEST_USER }} GRAPHKB_PASS: ${{ secrets.GKB_TEST_PASS }} + GRAPHKB_URL: ${{ secrets.GRAPHKB_TEST_URL }} EXCLUDE_INTEGRATION_TESTS: 1 # EXCLUDE_INTEGRATION_TESTS: ${{ matrix.python-version != '3.11' }} - if: github.event_name != 'pull_request' \ No newline at end of file + if: github.event_name != 'pull_request' From bbd1358f9fc9484015972eadb572590b35bd6b1d Mon Sep 17 00:00:00 2001 From: Eleanor Lewis Date: Tue, 9 Dec 2025 15:01:21 -0800 Subject: [PATCH 04/11] fix url --- .github/workflows/quick-pytest.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/quick-pytest.yml b/.github/workflows/quick-pytest.yml index 97868378..9c5318ac 100644 --- a/.github/workflows/quick-pytest.yml +++ b/.github/workflows/quick-pytest.yml @@ -39,9 +39,10 @@ jobs: env: IPR_USER: ${{ secrets.IPR_TEST_USER }} IPR_PASS: ${{ secrets.IPR_TEST_PASSWORD }} + IPR_URL: ${{ secrets.IPR_TEST_URL }} GRAPHKB_USER: ${{ secrets.GKB_TEST_USER }} GRAPHKB_PASS: ${{ secrets.GKB_TEST_PASS }} - GRAPHKB_URL: ${{ secrets.GRAPHKB_TEST_URL }} + GRAPHKB_URL: ${{ secrets.GKB_TEST_URL }} EXCLUDE_INTEGRATION_TESTS: 1 # EXCLUDE_INTEGRATION_TESTS: ${{ matrix.python-version != '3.11' }} if: github.event_name != 'pull_request' From 5957ab8b87bfac3d6c2b99108ac49b40cbac54d4 Mon Sep 17 00:00:00 2001 From: Eleanor Lewis Date: Wed, 10 Dec 2025 16:14:16 -0800 Subject: [PATCH 05/11] add default source name --- pori_python/graphkb/genes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pori_python/graphkb/genes.py b/pori_python/graphkb/genes.py index d619c0ed..67ac566b 100644 --- a/pori_python/graphkb/genes.py +++ b/pori_python/graphkb/genes.py @@ -266,7 +266,7 @@ def get_cancer_predisposition_info( def get_gene_linked_cancer_predisposition_info( - conn: GraphKBConnection, source: str + conn: GraphKBConnection, source: str = PREFERRED_GENE_SOURCE_NAME ) -> Tuple[List[str], Dict[str, Tuple[str, List[str]]]]: """ Return two lists from GraphKB, one of cancer predisposition genes and one of associated variants. From 7df2a3be7a4176b92c32edda4d7cb589e0c8d3e8 Mon Sep 17 00:00:00 2001 From: Eleanor Lewis Date: Wed, 10 Dec 2025 16:19:09 -0800 Subject: [PATCH 06/11] explain source use in function comment --- pori_python/graphkb/genes.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pori_python/graphkb/genes.py b/pori_python/graphkb/genes.py index 67ac566b..14d06b64 100644 --- a/pori_python/graphkb/genes.py +++ b/pori_python/graphkb/genes.py @@ -274,16 +274,15 @@ def get_gene_linked_cancer_predisposition_info( GERO-272 - criteria for what counts as a "cancer predisposition" variant In short: - * Statement 'source' is 'CGL' + * Statement 'source' is 'CGL' (not related to the preferred gene source) * Statement 'relevance' is 'pathogenic' * gene is gotten from any associated 'PositionalVariant' records Example: https://graphkb.bcgsc.ca/view/Statement/155:11616 - - Returns: genes: list of cancer predisposition genes + (using names from the source specified in this function's arguments) variants: dictionary mapping pharmacogenomic variant IDs to variant display names """ genes = set() From ddbe68462e0dd5b79f0582b7a57b0865586425bc Mon Sep 17 00:00:00 2001 From: Eleanor Lewis Date: Tue, 30 Dec 2025 13:01:46 -0800 Subject: [PATCH 07/11] handle case where there is no ipr use --- pori_python/ipr/main.py | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/pori_python/ipr/main.py b/pori_python/ipr/main.py index f59954e3..f84d3807 100644 --- a/pori_python/ipr/main.py +++ b/pori_python/ipr/main.py @@ -294,7 +294,7 @@ def ipr_report( username: str, password: str, content: Dict, - ipr_url: str, + ipr_url: str = '', log_level: str = "info", output_json_path: str = "", always_write_output_json: bool = False, @@ -324,7 +324,7 @@ def ipr_report( Args: username: the username for connecting to GraphKB and IPR password: the password for connecting to GraphKB and IPR - ipr_url: base URL to use in connecting to IPR + ipr_url: base URL to use in connecting to IPR (eg. https://ipr-api.bcgsc.ca/api) log_level: the logging level content: report content output_json_path: path to a JSON file to output the report upload body. @@ -358,13 +358,22 @@ def ipr_report( ) # IPR CONNECTION - ipr_conn = IprConnection(username, password, ipr_url) + ipr_url = ipr_url if ipr_url else os.environ.get("IPR_URL", "") + ipr_conn = None + if ipr_url: + ipr_conn = IprConnection(username, password, ipr_url) + else: + logger.warning("No ipr_url given") if validate_json: + if not ipr_conn: + raise ValueError("ipr_url required to validate_json") ipr_result = ipr_conn.validate_json(content) return ipr_result if upload_json: + if not ipr_conn: + raise ValueError("ipr_url required to upload_json") ipr_result = ipr_conn.upload_report( content, mins_to_wait, async_upload, ignore_extra_fields ) @@ -492,6 +501,8 @@ def ipr_report( comments_list.append(graphkb_comments) if include_ipr_variant_text: + if not ipr_conn: + raise ValueError("ipr_url required to upload_json") ipr_comments = get_ipr_analyst_comments( ipr_conn, gkb_matches, @@ -556,13 +567,16 @@ def ipr_report( output['hrdScore'] = output['hrd']['score'] output.pop('hrd') # kbmatches have already been made - ipr_spec = ipr_conn.get_spec() - output = clean_unsupported_content(output, ipr_spec) ipr_result = {} upload_error = None # UPLOAD TO IPR + if ipr_upload: + if not ipr_conn: + raise ValueError("ipr_url required to upload_report") + ipr_spec = ipr_conn.get_spec() + output = clean_unsupported_content(output, ipr_spec) try: logger.info(f"Uploading to IPR {ipr_conn.url}") ipr_result = ipr_conn.upload_report( From d5beb1c001666c8fe8e054b5a9dbf4c8a6dd8fc9 Mon Sep 17 00:00:00 2001 From: Eleanor Lewis Date: Wed, 31 Dec 2025 11:22:25 -0800 Subject: [PATCH 08/11] minor fixes --- pori_python/ipr/main.py | 8 ++++---- tests/test_graphkb/test_genes.py | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/pori_python/ipr/main.py b/pori_python/ipr/main.py index d8d960ab..3194779a 100644 --- a/pori_python/ipr/main.py +++ b/pori_python/ipr/main.py @@ -367,13 +367,13 @@ def ipr_report( if validate_json: if not ipr_conn: - raise ValueError("ipr_url required to validate_json") + raise ValueError("ipr_url required to validate json") ipr_result = ipr_conn.validate_json(content) return ipr_result if upload_json: if not ipr_conn: - raise ValueError("ipr_url required to upload_json") + raise ValueError("ipr_url required to upload json") ipr_result = ipr_conn.upload_report( content, mins_to_wait, async_upload, ignore_extra_fields ) @@ -502,7 +502,7 @@ def ipr_report( if include_ipr_variant_text: if not ipr_conn: - raise ValueError("ipr_url required to upload_json") + raise ValueError("ipr_url required to to include ipr variant text") ipr_comments = get_ipr_analyst_comments( ipr_conn, gkb_matches, @@ -575,7 +575,7 @@ def ipr_report( if ipr_upload: if not ipr_conn: - raise ValueError("ipr_url required to upload_report") + raise ValueError("ipr_url required to upload report") ipr_spec = ipr_conn.get_spec() output = clean_unsupported_content(output, ipr_spec) try: diff --git a/tests/test_graphkb/test_genes.py b/tests/test_graphkb/test_genes.py index 1c2862fa..930be2cc 100644 --- a/tests/test_graphkb/test_genes.py +++ b/tests/test_graphkb/test_genes.py @@ -18,7 +18,6 @@ get_pharmacogenomic_info, get_preferred_gene_name, get_therapeutic_associated_genes, - PREFERRED_GENE_SOURCE_NAME, ) from pori_python.graphkb.util import get_rid @@ -198,7 +197,7 @@ def test_get_cancer_predisposition_info(conn): EXCLUDE_BCGSC_TESTS, reason="excluding BCGSC-specific tests (requires CGL loader))" ) def test_get_gene_linked_cancer_predisposition_info(conn): - genes, matches = get_gene_linked_cancer_predisposition_info(conn, PREFERRED_GENE_SOURCE_NAME) + genes, matches = get_gene_linked_cancer_predisposition_info(conn) for gene in CANCER_PREDISP_INITIAL_GENES: assert gene in genes, f"{gene} not found in get_cancer_predisposition_info" From 366eb9a99c850c3ec50f3e79631ef61896ab95ab Mon Sep 17 00:00:00 2001 From: Eleanor Lewis Date: Wed, 31 Dec 2025 11:50:09 -0800 Subject: [PATCH 09/11] minor fix to test --- tests/test_graphkb/test_genes.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_graphkb/test_genes.py b/tests/test_graphkb/test_genes.py index 930be2cc..e1fb9e46 100644 --- a/tests/test_graphkb/test_genes.py +++ b/tests/test_graphkb/test_genes.py @@ -18,6 +18,7 @@ get_pharmacogenomic_info, get_preferred_gene_name, get_therapeutic_associated_genes, + PREFERRED_GENE_SOURCE_NAME ) from pori_python.graphkb.util import get_rid From 01cdde6e561cac3b48b26fb1326f269d35e20677 Mon Sep 17 00:00:00 2001 From: Eleanor Lewis Date: Wed, 31 Dec 2025 12:00:54 -0800 Subject: [PATCH 10/11] lint --- tests/test_graphkb/test_genes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_graphkb/test_genes.py b/tests/test_graphkb/test_genes.py index e1fb9e46..d9c21a51 100644 --- a/tests/test_graphkb/test_genes.py +++ b/tests/test_graphkb/test_genes.py @@ -18,7 +18,7 @@ get_pharmacogenomic_info, get_preferred_gene_name, get_therapeutic_associated_genes, - PREFERRED_GENE_SOURCE_NAME + PREFERRED_GENE_SOURCE_NAME, ) from pori_python.graphkb.util import get_rid From e290da6f6ccabe044b979d123fc8b917eba4e3f8 Mon Sep 17 00:00:00 2001 From: Eleanor Lewis Date: Tue, 6 Jan 2026 14:46:53 -0800 Subject: [PATCH 11/11] provide string default in pharm info func --- pori_python/graphkb/genes.py | 2 +- tests/test_graphkb/test_genes.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pori_python/graphkb/genes.py b/pori_python/graphkb/genes.py index 14d06b64..3d3111ec 100644 --- a/pori_python/graphkb/genes.py +++ b/pori_python/graphkb/genes.py @@ -370,7 +370,7 @@ def get_pharmacogenomic_info( def get_gene_linked_pharmacogenomic_info( - conn: GraphKBConnection, source: str + conn: GraphKBConnection, source: str = PREFERRED_GENE_SOURCE_NAME ) -> Tuple[List[str], Dict[str, Tuple[str, List[str]]]]: """ Return two lists from GraphKB, one of pharmacogenomic genes and one of associated variants. diff --git a/tests/test_graphkb/test_genes.py b/tests/test_graphkb/test_genes.py index d9c21a51..fd97ffcd 100644 --- a/tests/test_graphkb/test_genes.py +++ b/tests/test_graphkb/test_genes.py @@ -18,7 +18,6 @@ get_pharmacogenomic_info, get_preferred_gene_name, get_therapeutic_associated_genes, - PREFERRED_GENE_SOURCE_NAME, ) from pori_python.graphkb.util import get_rid @@ -172,7 +171,7 @@ def test_get_pharmacogenomic_info(conn): EXCLUDE_BCGSC_TESTS, reason="excluding BCGSC-specific tests (requires CGL loader))" ) def test_get_gene_linked_pharmacogenomic_info(conn): - genes, matches = get_gene_linked_pharmacogenomic_info(conn, PREFERRED_GENE_SOURCE_NAME) + genes, matches = get_gene_linked_pharmacogenomic_info(conn) for gene in PHARMACOGENOMIC_INITIAL_GENES: assert gene in genes, f"{gene} not found in get_pharmacogenomic_info" for rid, variant_info in matches.items():