From 73f583e8bbc40079d3c98751653503f868da1561 Mon Sep 17 00:00:00 2001 From: Leonardo Schwarz Date: Tue, 23 Jul 2024 14:35:15 +0200 Subject: [PATCH] helper script to run the workflow --- .../run_cluster_sandbox.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/depiction_cluster_sandbox/run_cluster_sandbox.py b/src/depiction_cluster_sandbox/run_cluster_sandbox.py index cd9ac48..5cc9feb 100644 --- a/src/depiction_cluster_sandbox/run_cluster_sandbox.py +++ b/src/depiction_cluster_sandbox/run_cluster_sandbox.py @@ -1,5 +1,21 @@ +from pathlib import Path + +from depiction_targeted_preproc.workflow.snakemake_invoke import SnakemakeInvoke + +work_dir = Path(__file__).parent / "data-sandbox" + + +def available_samples() -> list[str]: + return [p.name for p in (work_dir / "raw").glob("*")] + + def main(): - pass + samples = available_samples() + snakefile_path = Path(__file__).parent / "workflow" / "Snakefile" + snakemake = SnakemakeInvoke(continue_on_error=False, snakefile_name=snakefile_path) + snakemake.invoke( + work_dir=work_dir, result_files=[work_dir / sample / "cluster_kmeans_default.hdf5" for sample in samples] + ) if __name__ == "__main__":