Skip to content

Commit

Permalink
some small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
leoschwarz committed Jun 7, 2024
1 parent 4284537 commit f9df653
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions src/depiction_targeted_preproc/workflow/experimental.smk
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
" --out-calibration-csv-path {output.calibration_csv}"
" --out-standards-csv-path {output.standards_csv}"
" --out-visualization-csv-path {output.visualization_csv}"

0 comments on commit f9df653

Please sign in to comment.