Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add QC criteria for lymphoma_MRD #1479

Merged
merged 8 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion BALSAMIC/assets/scripts/collect_qc_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions BALSAMIC/constants/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}},
},
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}},
Expand Down
6 changes: 3 additions & 3 deletions tests/scripts/test_collect_qc_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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 = {
Expand Down
Loading