diff --git a/src/depiction_targeted_preproc/app_interface/process_chunk.py b/src/depiction_targeted_preproc/app_interface/process_chunk.py index d371fb6..00b4de6 100644 --- a/src/depiction_targeted_preproc/app_interface/process_chunk.py +++ b/src/depiction_targeted_preproc/app_interface/process_chunk.py @@ -1,10 +1,10 @@ -import zipfile -from pathlib import Path - import cyclopts import yaml +import zipfile from depiction_targeted_preproc.pipeline.prepare_params import Params from depiction_targeted_preproc.pipeline_config.artifacts_mapping import get_result_files_new +from pathlib import Path +from snakemake_invoke.config import SnakemakeInvokeConfig from snakemake_invoke.snakemake_invoke import SnakemakeInvoke app = cyclopts.App() @@ -19,8 +19,11 @@ def process_chunk(chunk_dir: Path) -> Path: result_files = get_result_files_new(requested_artifacts=params.requested_artifacts, sample_dir=chunk_dir) # invoke snakemake - # TODO note report file is deactivated because it's currently broken due to dependencies (jinja2) - SnakemakeInvoke(report_file=None).invoke(work_dir=chunk_dir.parent, result_files=result_files) + # TODO should we generate the report_file again? before it was broken due to jinja2 update + snakemake_config = SnakemakeInvokeConfig( + snakefile_path=Path(__file__).parents[1] / "workflow" / "Snakefile", + ) + SnakemakeInvoke(snakemake_config).invoke(work_dir=chunk_dir.parent, result_files=result_files) # zip the results sample_name = chunk_dir.name diff --git a/src/snakemake_invoke/config.py b/src/snakemake_invoke/config.py index c8d2a4a..1646cb1 100644 --- a/src/snakemake_invoke/config.py +++ b/src/snakemake_invoke/config.py @@ -13,6 +13,6 @@ class SnakemakeInvokeConfig(BaseModel): snakefile_path: Path = Path("Snakefile").absolute() execution_model: ExecutionModel = ExecutionModel.SUBPROCESS continue_on_error: bool = False - report_file: str | None = "report.html" + report_file: str | None = None n_cores: int = 1 env_variables: dict[str, str] | None = None