Skip to content

Commit

Permalink
add mini variant
Browse files Browse the repository at this point in the history
  • Loading branch information
leoschwarz committed Jun 7, 2024
1 parent c4543e9 commit 8d0600d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def exp_mass_list_preparation(
out_calibration_csv_path: Annotated[Path, Option()],
out_standards_csv_path: Annotated[Path, Option()],
out_visualization_csv_path: Annotated[Path, Option()],
out_visualization_mini_csv_path: Annotated[Path, Option()] = None,
) -> None:
input_df = pl.read_csv(input_csv_path)

Expand All @@ -31,6 +32,11 @@ def exp_mass_list_preparation(
standards_df.write_csv(out_standards_csv_path)
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"]
visualization_mini_df = visualization_df.filter(pl.col("label").is_in(choices))
visualization_mini_df.write_csv(out_visualization_mini_csv_path)


if __name__ == "__main__":
typer.run(exp_mass_list_preparation)
4 changes: 3 additions & 1 deletion src/depiction_targeted_preproc/workflow/experimental.smk
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ rule exp_mass_list_preparation:
output:
calibration_csv="{sample}/mass_list.calibration.csv",
standards_csv="{sample}/mass_list.standards.csv",
visualization_csv="{sample}/mass_list.visualization.csv"
visualization_csv="{sample}/mass_list.visualization.csv",
visualization_mini_csv="{sample}/mass_list.visualization_mini.csv"
shell:
"python -m depiction_targeted_preproc.workflow.exp.mass_list_preparation"
" --input-csv-path {input.csv}"
" --out-calibration-csv-path {output.calibration_csv}"
" --out-standards-csv-path {output.standards_csv}"
" --out-visualization-csv-path {output.visualization_csv}"
" --out-visualization-mini-csv-path {output.visualization_mini_csv}"


rule exp_plot_compare_peak_density:
Expand Down

0 comments on commit 8d0600d

Please sign in to comment.