Skip to content

Fix log report for non-bash output #15

@Headonpillow

Description

@Headonpillow

Add proper logging to R scripts.

Summary — approach

  • Tell each script to write its console output (stdout + messages) to the Snakemake log file when run under Snakemake. Use the Snakemake-provided log handle (snakemake@log in R, snakemake.log in Python).

  • Add informative messages (using message() / cat() in R, logging in Python) at important events: samples read, duplicates removed, numbers filtered/retained, ASV counts, files written, any warnings/errors.

  • Keep behavior unchanged when run interactively (the scripts still error if run without Snakemake), but when run by Snakemake the logs will contain the R console output and the specific informative statements.

Keep in mind:
Snakefile already creates log files.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions