From f2b6f10674c20cbe8954b45f32b328e1c35d1196 Mon Sep 17 00:00:00 2001 From: Leonardo Schwarz Date: Thu, 14 Nov 2024 08:34:48 +0100 Subject: [PATCH] define rule to create visualization table with "tol" column --- .../workflow/rules/rules_panel.smk | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/depiction_targeted_preproc/workflow/rules/rules_panel.smk b/src/depiction_targeted_preproc/workflow/rules/rules_panel.smk index 91cbbca..f758a36 100644 --- a/src/depiction_targeted_preproc/workflow/rules/rules_panel.smk +++ b/src/depiction_targeted_preproc/workflow/rules/rules_panel.smk @@ -15,6 +15,20 @@ rule panel_standardized_full: "--output-panel-path {output.csv}" +# TODO use this in the visualization steps everywhere +rule panel_visualize_full: + input: + csv="{sample}/panels/full.csv", + output: + csv="{sample}/panels/full_visualize.csv", + run: + import polars as pl + + # TODO this absolutely needs to be configurable too + df = pl.read_csv(input.csv).with_columns(tol=pl.lit(0.25)).drop("type") + df.write_csv(output.csv) + + rule panel_filter_calibration: input: csv="{sample}/panels/full.csv",