Skip to content

Commit

Permalink
feat(balsamic-qc): Remove (#128)(major)
Browse files Browse the repository at this point in the history
Remove BalsamicQC

---------

Co-authored-by: Sebastian Diaz <[email protected]>
  • Loading branch information
henrikstranneheim and diitaz93 authored Feb 11, 2025
1 parent fa8747c commit 75661d3
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 139 deletions.
3 changes: 0 additions & 3 deletions cg_hermes/cli/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

from cg_hermes.cli.common import get_deliverables
from cg_hermes.config.balsamic import BALSAMIC_TAGS
from cg_hermes.config.balsamic_qc import BALSAMIC_QC_TAGS
from cg_hermes.config.balsamic_umi import BALSAMIC_UMI_TAGS
from cg_hermes.config.fluffy import FLUFFY_COMMON_TAGS
from cg_hermes.config.mip_dna import MIP_DNA_TAGS
Expand Down Expand Up @@ -70,8 +69,6 @@ def validate_tags_cmd(workflow: Workflow) -> None:
tag_map = BALSAMIC_TAGS
elif workflow == Workflow.BALSAMIC_UMI:
tag_map = BALSAMIC_UMI_TAGS
elif workflow == Workflow.BALSAMIC_QC:
tag_map = BALSAMIC_QC_TAGS
elif workflow == Workflow.FLUFFY:
tag_map = FLUFFY_COMMON_TAGS
elif workflow == Workflow.MUTANT:
Expand Down
46 changes: 0 additions & 46 deletions cg_hermes/config/balsamic_qc.py

This file was deleted.

1 change: 0 additions & 1 deletion cg_hermes/constants/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
class Workflow(StrEnum):
BALSAMIC: str = "balsamic"
BALSAMIC_PON: str = "balsamic-pon"
BALSAMIC_QC: str = "balsamic-qc"
BALSAMIC_UMI: str = "balsamic-umi"
DEMULTIPLEX: str = "demultiplex"
FASTQ: str = "fastq"
Expand Down
11 changes: 0 additions & 11 deletions cg_hermes/deliverables.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@
TUMOR_ONLY_PANEL_TAGS,
TUMOR_ONLY_WGS_TAGS,
)
from cg_hermes.config.balsamic_qc import (
BALSAMIC_QC_TAGS,
QC_TUMOR_NORMAL_PANEL_TAGS,
QC_TUMOR_NORMAL_WGS_TAGS,
)
from cg_hermes.config.balsamic_umi import (
BALSAMIC_UMI_TAGS,
UMI_TUMOR_NORMAL_PANEL_TAGS,
Expand Down Expand Up @@ -184,12 +179,6 @@ def get_balsamic_analysis_configs(self) -> dict[FrozenSet[str], dict]:
tag_set = TUMOR_ONLY_PANEL_TAGS
else:
tag_set = TUMOR_NORMAL_PANEL_TAGS
elif self.workflow == Workflow.BALSAMIC_QC:
BALSAMIC_COMMON_TAGS = BALSAMIC_QC_TAGS
if self.analysis_type == CancerAnalysisType.TUMOR_NORMAL_WGS:
tag_set = QC_TUMOR_NORMAL_WGS_TAGS
elif self.analysis_type == CancerAnalysisType.TUMOR_NORMAL_PANEL:
tag_set = QC_TUMOR_NORMAL_PANEL_TAGS
elif self.workflow == Workflow.BALSAMIC_UMI:
BALSAMIC_COMMON_TAGS = BALSAMIC_UMI_TAGS
if self.analysis_type == CancerAnalysisType.TUMOR_PANEL:
Expand Down
44 changes: 0 additions & 44 deletions tests/cli/test_convert_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,50 +210,6 @@ def test_convert_balsamic_umi_t_only_deliverables(
assert result.exit_code == 0


def test_convert_balsamic_qc_tn_panel_deliverables(
cli_runner: CliRunner, balsamic_tn_panel_deliverables: Path
):
# GIVEN the path to a balsamic deliverables file with TN data
assert balsamic_tn_panel_deliverables.exists()

# WHEN converting the deliverables to CG format
result = cli_runner.invoke(
app,
[
str(balsamic_tn_panel_deliverables),
"--workflow",
"balsamic-qc",
"--analysis-type",
"tumor_normal_panel",
],
)

# THEN assert that the program exits with success
assert result.exit_code == 0


def test_convert_balsamic_qc_tn_wgs_deliverables(
cli_runner: CliRunner, balsamic_tn_wgs_deliverables: Path
):
# GIVEN the path to a balsamic deliverables file
assert balsamic_tn_wgs_deliverables.exists()

# WHEN converting the deliverables to CG format
result = cli_runner.invoke(
app,
[
str(balsamic_tn_wgs_deliverables),
"--workflow",
"balsamic-qc",
"--analysis-type",
"tumor_normal_wgs",
],
)

# THEN assert that the program exits with success
assert result.exit_code == 0


@pytest.mark.parametrize(
"workflow",
Workflow.get_nf_workflows(),
Expand Down
25 changes: 1 addition & 24 deletions tests/cli/test_validate_deliverables_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,30 +79,7 @@ def test_validate_balsamic_umi_deliverables_file(
],
)

# THEN assert it exits without problem
assert result.exit_code == 0


def test_validate_balsamic_qc_deliverables_file(
cli_runner: CliRunner, balsamic_tn_panel_deliverables: Path
):
# GIVEN a existing balsamic deliverables file and a CLI runner
assert balsamic_tn_panel_deliverables.exists()

# WHEN running the validate deliverables command
result = cli_runner.invoke(
app,
[
"deliverables",
str(balsamic_tn_panel_deliverables),
"--workflow",
"balsamic-qc",
"--analysis-type",
"tumor_normal_panel",
],
)

# THEN assert it exits without problem
# THEN assert it exits without a problem
assert result.exit_code == 0


Expand Down
10 changes: 0 additions & 10 deletions tests/cli/test_validate_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,6 @@ def test_cli_validate_balsamic_umi_tags(cli_runner: CliRunner):
assert result.exit_code == 0


def test_cli_validate_balsamic_qc_tags(cli_runner: CliRunner):
# GIVEN a CLI runner

# WHEN testing to validate the common tags from the CLI
result = cli_runner.invoke(app, ["tags", "balsamic-qc"])

# THEN assert that the validation was successful
assert result.exit_code == 0


def test_cli_validate_fluffy_tags(cli_runner: CliRunner):
# GIVEN a CLI runner

Expand Down

0 comments on commit 75661d3

Please sign in to comment.