Skip to content

Commit

Permalink
Add workflow Nallo start (#4112)
Browse files Browse the repository at this point in the history
### Added
- workflow nallo start
  • Loading branch information
peterpru authored Jan 20, 2025
1 parent c954a4b commit f18df85
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion cg/cli/workflow/nallo/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from cg.cli.utils import CLICK_CONTEXT_SETTINGS

from cg.cli.workflow.nf_analysis import config_case, run
from cg.cli.workflow.nf_analysis import config_case, run, start

from cg.constants.constants import MetaApis
from cg.meta.workflow.analysis import AnalysisAPI
Expand All @@ -25,3 +25,4 @@ def nallo(context: click.Context) -> None:

nallo.add_command(config_case)
nallo.add_command(run)
nallo.add_command(start)
7 changes: 5 additions & 2 deletions cg/cli/workflow/nf_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@

from cg.cli.workflow.commands import ARGUMENT_CASE_ID
from cg.cli.workflow.utils import validate_force_store_option
from cg.constants import EXIT_FAIL, EXIT_SUCCESS
from cg.constants import EXIT_FAIL, EXIT_SUCCESS, Workflow
from cg.constants.cli_options import DRY_RUN, FORCE, COMMENT
from cg.constants.constants import MetaApis
from cg.exc import AnalysisNotReadyError, CgError, HousekeeperStoreError
from cg.meta.workflow.nf_analysis import NfAnalysisAPI

from cg.models.cg_config import CGConfig
from cg.store.models import Case

LOG = logging.getLogger(__name__)

Expand Down Expand Up @@ -186,7 +187,9 @@ def start(
analysis_api: NfAnalysisAPI = context.meta_apis[MetaApis.ANALYSIS_API]
try:
analysis_api.status_db.verify_case_exists(case_internal_id=case_id)
analysis_api.prepare_fastq_files(case_id=case_id, dry_run=dry_run)
case: Case = analysis_api.status_db.get_case_by_internal_id(case_id)
if case.data_analysis != Workflow.NALLO:
analysis_api.prepare_fastq_files(case_id=case_id, dry_run=dry_run)
analysis_api.config_case(case_id=case_id, dry_run=dry_run)
analysis_api.run_nextflow_analysis(
case_id=case_id,
Expand Down
1 change: 1 addition & 0 deletions cg/services/sequencing_qc_service/quality_checks/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def get_sequencing_quality_check_for_case(case: Case) -> Callable:
Workflow.BALSAMIC_UMI,
Workflow.MIP_DNA,
Workflow.MIP_RNA,
Workflow.NALLO,
Workflow.RAREDISEASE,
Workflow.RNAFUSION,
Workflow.TOMTE,
Expand Down
2 changes: 1 addition & 1 deletion tests/cli/workflow/nf_analysis/test_cli_start.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

@pytest.mark.parametrize(
"workflow",
NEXTFLOW_WORKFLOWS,
NEXTFLOW_WORKFLOWS + [Workflow.NALLO],
)
def test_start(
cli_runner: CliRunner,
Expand Down

0 comments on commit f18df85

Please sign in to comment.