Skip to content

Commit

Permalink
Add tests for test_cancer_genes()
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieulemieux committed Oct 24, 2023
1 parent cd226f6 commit 5558922
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/test_genes.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

from graphkb import GraphKBConnection
from graphkb.genes import (
get_cancer_genes,
get_cancer_predisposition_info,
get_gene_information,
get_genes_from_variant_types,
Expand All @@ -22,6 +23,7 @@

CANONICAL_ONCOGENES = ["kras", "nras", "alk"]
CANONICAL_TS = ["cdkn2a", "tp53"]
CANONICAL_CG = ["ercc1", "fanci", "h2bc4", "h2bc17", "acvr1b"]
CANONICAL_FUSION_GENES = ["alk", "ewsr1", "fli1"]
CANONICAL_STRUCTURAL_VARIANT_GENES = ["brca1", "dpyd", "pten"]
CANNONICAL_THERAPY_GENES = ["erbb2", "brca2", "egfr"]
Expand Down Expand Up @@ -112,6 +114,8 @@ def test_oncogene(conn):
assert gene in names
for gene in CANONICAL_TS:
assert gene not in names
for gene in CANONICAL_CG:
assert gene not in names


def test_tumour_supressors(conn):
Expand All @@ -121,6 +125,19 @@ def test_tumour_supressors(conn):
assert gene in names
for gene in CANONICAL_ONCOGENES:
assert gene not in names
for gene in CANONICAL_CG:
assert gene not in names


def test_cancer_genes(conn):
result = get_cancer_genes(conn)
names = {row["name"] for row in result}
for gene in CANONICAL_CG:
assert gene in names
for gene in CANONICAL_TS:
assert gene not in names
for gene in CANONICAL_ONCOGENES:
assert gene not in names


def test_get_pharmacogenomic_info(conn):
Expand Down

0 comments on commit 5558922

Please sign in to comment.