From 1d05cdd87ed8716f282013b99b6267ebbb4c5a76 Mon Sep 17 00:00:00 2001 From: mathieulemieux Date: Tue, 26 May 2026 11:23:14 -0700 Subject: [PATCH 1/3] Add to enum values to hrd kbCategory specs --- pori_python/ipr/content.spec.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pori_python/ipr/content.spec.json b/pori_python/ipr/content.spec.json index c994ba6f..f74b807d 100644 --- a/pori_python/ipr/content.spec.json +++ b/pori_python/ipr/content.spec.json @@ -564,6 +564,10 @@ "hrd": { "properties": { "kbCategory": { + "enum": [ + "homologous recombination deficiency strong signature", + "homologous recombination deficiency moderate signature" + ], "type": "string" }, "score": { From 4107b2477e6913c87fe90ba8639250fe12553870 Mon Sep 17 00:00:00 2001 From: mathieulemieux Date: Tue, 26 May 2026 11:26:09 -0700 Subject: [PATCH 2/3] Add hrd tests for annotate_signature_variants() --- tests/test_ipr/test_annotate.py | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/tests/test_ipr/test_annotate.py b/tests/test_ipr/test_annotate.py index 43de4216..79eb54c7 100644 --- a/tests/test_ipr/test_annotate.py +++ b/tests/test_ipr/test_annotate.py @@ -6,6 +6,7 @@ from pori_python.ipr.constants import ( COSMIC_SIGNATURE_VARIANT_TYPE, HLA_SIGNATURE_VARIANT_TYPE, + HRD_MAPPING, MSI_MAPPING, TMB_SIGNATURE, TMB_SIGNATURE_VARIANT_TYPE, @@ -13,7 +14,7 @@ from pori_python.ipr.inputs import preprocess_signature_variants from pori_python.types import IprSmallMutationVariant -from .test_ipr import DISEASE_RIDS +from .test_ipr import DISEASE_RIDS # dummy RIDs; will always result in matchedCancer == false EXCLUDE_BCGSC_TESTS = os.environ.get('EXCLUDE_BCGSC_TESTS') == '1' @@ -203,6 +204,29 @@ def test_annotate_signature_variants_msi(self, graphkb_conn): ) assert len(msi) != 0 + def test_annotate_signature_variants_hrd_strong(self, graphkb_conn): + """Test HRD strong signature""" + hrd = annotate_signature_variants( + graphkb_conn, + DISEASE_RIDS, + preprocess_signature_variants( + [HRD_MAPPING['homologous recombination deficiency strong signature']] + ), + ) + assert len(hrd) != 0 + + @pytest.mark.skip(reason='no GKB statement for HRD moderate Signature CVs yet') + def test_annotate_signature_variants_hrd_moderate(self, graphkb_conn): + """Test HRD moderate signature""" + hrd = annotate_signature_variants( + graphkb_conn, + DISEASE_RIDS, + preprocess_signature_variants( + [HRD_MAPPING['homologous recombination deficiency moderate signature']] + ), + ) + assert len(hrd) != 0 + def test_annotate_structural_variants_tp53(self, graphkb_conn): """Verify alternate TP53 variants match.""" ref_key = 'prot_only' From bb9c6aed837b973aa498b0c40785080c869bfa57 Mon Sep 17 00:00:00 2001 From: mathieulemieux Date: Tue, 26 May 2026 13:06:35 -0700 Subject: [PATCH 3/3] Change enum values into examples for hrd kbCategory specs --- pori_python/ipr/content.spec.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pori_python/ipr/content.spec.json b/pori_python/ipr/content.spec.json index f74b807d..f35b15bc 100644 --- a/pori_python/ipr/content.spec.json +++ b/pori_python/ipr/content.spec.json @@ -564,7 +564,7 @@ "hrd": { "properties": { "kbCategory": { - "enum": [ + "examples": [ "homologous recombination deficiency strong signature", "homologous recombination deficiency moderate signature" ],