Replies: 4 comments 2 replies
-
Re: Can we use $input or similar in the command? Yes! Here is an example of how that would work -- Our rule:
Modified to use
|
Beta Was this translation helpful? Give feedback.
-
Re: Could you insert a regular expression here for extensions in defining inputs or outputs? Yes! Alternatively, you can use pattern expansion and matching functions:
Our rule:
Modified to use the
|
Beta Was this translation helpful? Give feedback.
-
Re: Related question - can you put an entire folder in {input} if you have many similar files? This can get complicated to keep track of - i.e., you need to make sure that the directory is generated in the snakemake workflow so it can be linked properly across rules and be re-created if the workflow is rerun. An alternative is to look at using wildcards to define multiple inputs with similar file name patterns. On a slightly related note, here is snakemake documentation on using directories as outputs. |
Beta Was this translation helpful? Give feedback.
-
Re:
Snakemake does check whether an input already exists as long as the input/output blocks are specified in the rule. You should see this message from snakemake if the rule's outputs already exist when you try to run it again:
Snakemake does not interpret input/output names in the |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
All reactions