Skip to content

Latest commit

 

History

History
12 lines (9 loc) · 508 Bytes

README.md

File metadata and controls

12 lines (9 loc) · 508 Bytes

Using Snakemake log files with R scripts

A minimal working example.

See script.R for the R code. It checks whether the snakemake rule includes a log directive by checking the length of the log slot of the snakemake S4 object. If the log file path is given, it writes all messages, warnings, etc to the log file. Otherwise, this output is printed to the console like usual.

The Snakefile includes an example rule with a log and without a log file. Both run without errors.