diff --git a/BALSAMIC/assets/scripts/collect_qc_metrics.py b/BALSAMIC/assets/scripts/collect_qc_metrics.py index 61dfffdf7..c11cb616e 100755 --- a/BALSAMIC/assets/scripts/collect_qc_metrics.py +++ b/BALSAMIC/assets/scripts/collect_qc_metrics.py @@ -144,7 +144,14 @@ def get_qc_supported_capture_kit(capture_kit, metrics: List[str]) -> str: if k != "default": available_panel_beds.append(k) - return next((i for i in available_panel_beds if i in capture_kit), None) + return next( + ( + i + for i in available_panel_beds + if re.search(rf"{re.escape(i)}(?=_\d)", capture_kit) + ), + None, + ) def get_requested_metrics(config: dict, metrics: dict) -> dict: diff --git a/BALSAMIC/constants/metrics.py b/BALSAMIC/constants/metrics.py index 0e4ae6a81..eec6c6fb2 100644 --- a/BALSAMIC/constants/metrics.py +++ b/BALSAMIC/constants/metrics.py @@ -54,6 +54,9 @@ "lymphomatic": { "PCT_TARGET_BASES_500X": {"condition": {"norm": "gt", "threshold": 0.90}}, }, + "lymphoma_MRD": { + "PCT_TARGET_BASES_1000X": {"condition": {"norm": "gt", "threshold": 0.95}}, + }, "probio": { "PCT_TARGET_BASES_250X": {"condition": {"norm": "gt", "threshold": 0.95}}, }, diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ffffbc396..f0034cac9 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,8 @@ Added: ^^^^^^ * MSIsensor-pro container https://github.com/Clinical-Genomics/BALSAMIC/pull/1444 * MSI analysis to the tumor-normal workflow https://github.com/Clinical-Genomics/BALSAMIC/pull/1454 +* Sentieon install directory path to case config arguments https://github.com/Clinical-Genomics/BALSAMIC/pull/1461 +* QC threshold for lymphoma_MRD panel https://github.com/Clinical-Genomics/BALSAMIC/pull/1479 * Sentieon install directory path to case config arguments https://giithub.com/Clinical-Genomics/BALSAMIC/pull/1461 * MSI tumor-normal analysis to housekeeper storage https://github.com/Clinical-Genomics/BALSAMIC/pull/1483 diff --git a/tests/conftest.py b/tests/conftest.py index e50ea436f..c92e23be3 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1909,10 +1909,10 @@ def qc_requested_metrics(): "METRIC_1": {"condition": None}, "METRIC_2": {"condition": {"norm": "gt", "threshold": 2}}, }, - "panel_1": { + "panelA": { "METRIC_3": {"condition": {"norm": "gt", "threshold": 3}}, }, - "panel_2": { + "panelB": { "METRIC_1": {"condition": {"norm": "gt", "threshold": 1}}, "METRIC_2": {"condition": {"norm": "gt", "threshold": 22}}, "METRIC_4": {"condition": {"norm": "gt", "threshold": 4}}, diff --git a/tests/scripts/test_collect_qc_metrics.py b/tests/scripts/test_collect_qc_metrics.py index 789c0064c..bc66661fc 100644 --- a/tests/scripts/test_collect_qc_metrics.py +++ b/tests/scripts/test_collect_qc_metrics.py @@ -23,10 +23,10 @@ def test_get_qc_supported_capture_kit(qc_requested_metrics): """test extraction of the capture kit name available for analysis""" # GIVEN a capture kit - capture_kit = "panel_1_v1.0_hg19_design.bed" + capture_kit = "panelA_1.0_hg19_design.bed" # GIVEN an expected output - expected_output = "panel_1" + expected_output = "panelA" # WHEN calling the function supported_capture_kit = get_qc_supported_capture_kit( @@ -42,7 +42,7 @@ def test_get_requested_metrics_targeted(config_dict, qc_requested_metrics): # GIVEN a config_dict config = copy.deepcopy(config_dict) - config["panel"]["capture_kit"] = "tests/panel/panel_2_v1.0_hg19_design.bed" + config["panel"]["capture_kit"] = "tests/panel/panelB_1.0_hg19_design.bed" # GIVEN the expected output expected_output = {