Skip to content

Commit

Permalink
add rules for new panel processing
Browse files Browse the repository at this point in the history
  • Loading branch information
leoschwarz committed Nov 12, 2024
1 parent fb0b26d commit f96520b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/depiction_targeted_preproc/workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ version: "3"


include: "rules/rules_prepare_pipeline.smk"
include: "rules/rules_panel.smk"
include: "rules/rules_proc.smk"
include: "rules/rules_vis.smk"
include: "rules/rules_qc.smk"
Expand Down
26 changes: 26 additions & 0 deletions src/depiction_targeted_preproc/workflow/rules/rules_panel.smk
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
"""This file bundles all panel manipulation rules needed throughout the pipeline.
To keep things tidy, each file will be in the same directory `{sample}/panels/`.
Initially before the workflow is started a file `mass_list.raw.csv` has to be created.
"""


rule panel_standardized_full:
input:
csv="{sample}/panels/unstandardized_full.csv",
output:
csv="{sample}/panels/full.csv",
shell:
"python -m depiction_targeted_preproc.workflow.panel.standardize_panel "
"--input-panel-path {input.csv} --config-name standardize_main_config.yml "
"--output-panel-path {output.csv}"


rule panel_filter_calibration:
input:
csv="{sample}/panels/full.csv",
output:
csv="{sample}/panels/calibration.csv",
run:
import polars as pl

pl.read_csv(input.csv).filter(type="target").write_csv(output.csv)

0 comments on commit f96520b

Please sign in to comment.