From 037b5699e85c3159251ed587391ea1394676cad3 Mon Sep 17 00:00:00 2001 From: Leonardo Schwarz Date: Fri, 7 Jun 2024 18:01:52 +0200 Subject: [PATCH] more plots for the poster --- src/depiction_targeted_preproc/example_compare/run_compare.py | 3 +++ .../workflow/exp/mass_list_preparation.py | 2 +- src/depiction_targeted_preproc/workflow/snakemake_invoke.py | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/depiction_targeted_preproc/example_compare/run_compare.py b/src/depiction_targeted_preproc/example_compare/run_compare.py index 3dcb407..ff40cab 100644 --- a/src/depiction_targeted_preproc/example_compare/run_compare.py +++ b/src/depiction_targeted_preproc/example_compare/run_compare.py @@ -36,6 +36,9 @@ def main() -> None: for imzml in imzmls: requested_files += prepare_tasks(data_raw_dir / imzml, work_dir=work_dir) + ## TODO quick hack + #requested_files = [f for f in requested_files if "mini" in str(f)] + SnakemakeInvoke(continue_on_error=True).invoke(work_dir=work_dir, result_files=requested_files, n_cores=4) diff --git a/src/depiction_targeted_preproc/workflow/exp/mass_list_preparation.py b/src/depiction_targeted_preproc/workflow/exp/mass_list_preparation.py index c8b66f0..a957fc2 100644 --- a/src/depiction_targeted_preproc/workflow/exp/mass_list_preparation.py +++ b/src/depiction_targeted_preproc/workflow/exp/mass_list_preparation.py @@ -33,7 +33,7 @@ def exp_mass_list_preparation( visualization_df.write_csv(out_visualization_csv_path) if out_visualization_mini_csv_path: - choices = ["Angiotensin standard", "CD38", "CD20", "Caveolin-1", "VIM", "CD36", "FN1", "Ki67"] + choices = ["Angiotensin standard", "CD38", "CD20", "Caveolin-1", "VIM", "CD36", "FN1", "Ki67", "CD16", "GATA3"] visualization_mini_df = visualization_df.filter(pl.col("label").is_in(choices)) visualization_mini_df.write_csv(out_visualization_mini_csv_path) diff --git a/src/depiction_targeted_preproc/workflow/snakemake_invoke.py b/src/depiction_targeted_preproc/workflow/snakemake_invoke.py index de02ff1..db7dd26 100644 --- a/src/depiction_targeted_preproc/workflow/snakemake_invoke.py +++ b/src/depiction_targeted_preproc/workflow/snakemake_invoke.py @@ -66,6 +66,8 @@ def _invoke_subprocess(self, work_dir: Path, result_files: list[Path], n_cores: str(n_cores), "--snakefile", str(self.snakefile_path), + # TODO configurable + "--rerun-incomplete", *extra_args, *[str(file.relative_to(work_dir)) for file in result_files], ]