diff --git a/graphkb/genes.py b/graphkb/genes.py index 7d5792b..afc2f80 100644 --- a/graphkb/genes.py +++ b/graphkb/genes.py @@ -392,7 +392,7 @@ def get_gene_information( Function is originally from pori_ipr_python::annotate.py - Gene flags (categories) are: ['cancerRelated', 'knownFusionPartner', 'knownSmallMutation', + Gene flags (categories) are: ['cancerGene', 'cancerRelated', 'knownFusionPartner', 'knownSmallMutation', 'oncogene', 'therapeuticAssociated', 'tumourSuppressor'] Args: @@ -444,6 +444,8 @@ def get_gene_information( gene_flags["oncogene"] = convert_to_rid_set(get_oncokb_oncogenes(graphkb_conn)) logger.info("fetching tumour supressors list") gene_flags["tumourSuppressor"] = convert_to_rid_set(get_oncokb_tumour_supressors(graphkb_conn)) + logger.info("fetching cancerGene list") + gene_flags["cancerGene"] = convert_to_rid_set(get_cancer_genes(graphkb_conn)) logger.info("fetching therapeutic associated genes lists") gene_flags["therapeuticAssociated"] = convert_to_rid_set( diff --git a/setup.cfg b/setup.cfg index ac8829a..4a8f1d5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -10,7 +10,7 @@ include_trailing_comma = true [metadata] name = graphkb url = https://github.com/bcgsc/pori_graphkb_python -version = 1.13.0 +version = 1.14.0 author_email = graphkb@bcgsc.ca description = python adapter for interacting with the GraphKB API long_description = file: README.md diff --git a/tests/test_genes.py b/tests/test_genes.py index 00e391e..c5a5d96 100644 --- a/tests/test_genes.py +++ b/tests/test_genes.py @@ -23,7 +23,7 @@ CANONICAL_ONCOGENES = ["kras", "nras", "alk"] CANONICAL_TS = ["cdkn2a", "tp53"] -CANONICAL_CG = ["ercc1", "fanci", "h2bc4", "h2bc17", "acvr1b"] +CANONICAL_CG = ["alb"] CANONICAL_FUSION_GENES = ["alk", "ewsr1", "fli1"] CANONICAL_STRUCTURAL_VARIANT_GENES = ["brca1", "dpyd", "pten"] CANNONICAL_THERAPY_GENES = ["erbb2", "brca2", "egfr"] @@ -203,6 +203,7 @@ def test_get_gene_information(conn): conn, CANONICAL_ONCOGENES + CANONICAL_TS + + CANONICAL_CG + CANONICAL_FUSION_GENES + CANONICAL_STRUCTURAL_VARIANT_GENES + CANNONICAL_THERAPY_GENES @@ -247,3 +248,8 @@ def test_get_gene_information(conn): assert gene in [ g["name"] for g in gene_info if g.get("cancerRelated") ], f"Missed cancerRelated {gene}" + + for gene in CANONICAL_CG: + assert gene in [ + g["name"] for g in gene_info if g.get("cancerGene") + ], f"Missed cancerGene {gene}"