From f9df653b36fe2950525f44575170d22f9d648cc8 Mon Sep 17 00:00:00 2001 From: Leonardo Schwarz Date: Fri, 7 Jun 2024 12:12:23 +0200 Subject: [PATCH] some small fixes --- .../example_compare/run_compare.py | 2 +- .../workflow/exp/mass_list_preparation.py | 4 ++-- src/depiction_targeted_preproc/workflow/experimental.smk | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/depiction_targeted_preproc/example_compare/run_compare.py b/src/depiction_targeted_preproc/example_compare/run_compare.py index b255ef6..1de19b9 100644 --- a/src/depiction_targeted_preproc/example_compare/run_compare.py +++ b/src/depiction_targeted_preproc/example_compare/run_compare.py @@ -34,7 +34,7 @@ def main() -> None: for imzml in imzmls: requested_files += prepare_tasks(data_raw_dir / imzml, work_dir=work_dir) - SnakemakeInvoke().invoke(work_dir=work_dir, result_files=requested_files, n_cores=2) + SnakemakeInvoke().invoke(work_dir=work_dir, result_files=requested_files, n_cores=4) def get_all_output_files(folders: list[Path]) -> list[Path]: 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 cb2e1d6..8e9369e 100644 --- a/src/depiction_targeted_preproc/workflow/exp/mass_list_preparation.py +++ b/src/depiction_targeted_preproc/workflow/exp/mass_list_preparation.py @@ -21,10 +21,10 @@ def exp_mass_list_preparation( visualization_df = input_df.with_columns(tol=pl.lit(0.25)) # for the calibration remove the CHCA peaks, they have names starting with CHCA - calibration_df = visualization_df.filter(~pl.col("name").str.starts_with("CHCA")) + calibration_df = visualization_df.filter(~pl.col("label").str.starts_with("CHCA")) # for the standards csv only keep the "standard" peaks - standards_df = visualization_df.filter(pl.col("name").str.to_lowercase().contains("standard")) + standards_df = visualization_df.filter(pl.col("label").str.to_lowercase().str.contains("standard")) # write the results calibration_df.write_csv(out_calibration_csv_path) diff --git a/src/depiction_targeted_preproc/workflow/experimental.smk b/src/depiction_targeted_preproc/workflow/experimental.smk index c8deef1..41e3c68 100644 --- a/src/depiction_targeted_preproc/workflow/experimental.smk +++ b/src/depiction_targeted_preproc/workflow/experimental.smk @@ -23,10 +23,10 @@ rule exp_mass_list_preparation: output: calibration_csv="{sample}/mass_list.calibration.csv", standards_csv="{sample}/mass_list.standards.csv", - visualization="{sample}/mass_list.visualization.csv" + visualization_csv="{sample}/mass_list.visualization.csv" shell: "python -m depiction_targeted_preproc.workflow.exp.mass_list_preparation" " --input-csv-path {input.csv}" - " --out-calibration-csv {output.calibration_csv}" - " --out-standards-csv {output.standards_csv}" - " --out-visualization {output.visualization}" \ No newline at end of file + " --out-calibration-csv-path {output.calibration_csv}" + " --out-standards-csv-path {output.standards_csv}" + " --out-visualization-csv-path {output.visualization_csv}" \ No newline at end of file