From ba6d790bec534dac8381fb10b4c7d7e78440e50b Mon Sep 17 00:00:00 2001 From: Leonardo Schwarz Date: Wed, 7 Aug 2024 15:30:20 +0200 Subject: [PATCH] make it more reusable --- src/depiction_targeted_preproc/pipeline/setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/depiction_targeted_preproc/pipeline/setup.py b/src/depiction_targeted_preproc/pipeline/setup.py index 8a4b954..f920873 100644 --- a/src/depiction_targeted_preproc/pipeline/setup.py +++ b/src/depiction_targeted_preproc/pipeline/setup.py @@ -48,8 +48,12 @@ def setup_workdir(params: PipelineParameters, input_imzml_file: Path, input_pane def copy_standardized_table(input_csv: Path, output_csv: Path): - # TODO this is a total hack for a quick setup input_df = pl.read_csv(input_csv) + write_standardized_table(input_df, output_csv) + + +def write_standardized_table(input_df: pl.DataFrame, output_csv: Path) -> None: + # TODO this is a total hack for a quick setup mapping = {} for column in input_df.columns: if column.lower() in ["marker", "label"]: