You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unlike the other rule that uses a script: key, the use of shell: key shown below means that Snakemake will not track the dependency between this rule and the scr/test-script.R file:
use that Jinja variable in the shell: command, e.g., RScript {input.script} ...
This way, if the script has changes made to it, Snakemake can use them to invalidate any downstream objects that may have used an older version.
At least, that's what I picked up from using that style of integration (custom arguments to the scripts) for a couple years. Personally, I moved on to favor the script: style (using the snakemake object), and find it clearer to maintain.
The text was updated successfully, but these errors were encountered:
Nice example - I came here from the SO answer.
Unlike the other rule that uses a
script:
key, the use ofshell:
key shown below means that Snakemake will not track the dependency between this rule and thescr/test-script.R
file:snakemake-with-R/Snakefile
Lines 18 to 22 in a18f782
I would recommend it as better practice to
input:
shell:
command, e.g.,RScript {input.script} ...
This way, if the script has changes made to it, Snakemake can use them to invalidate any downstream objects that may have used an older version.
At least, that's what I picked up from using that style of integration (custom arguments to the scripts) for a couple years. Personally, I moved on to favor the
script:
style (using thesnakemake
object), and find it clearer to maintain.The text was updated successfully, but these errors were encountered: