carpentries-incubator / snakemake-novice-bioinformatics

Introduction to Snakemake for Bioinformatics
https://carpentries-incubator.github.io/snakemake-novice-bioinformatics
Other
18 stars 9 forks source link

Directories are automatically created for normal rules #45

Closed tbooth closed 1 year ago

tbooth commented 1 year ago

From @jdblischak

In your example that uses directory() for the output, you demonstrate that you need to manually run mkdir. I think it's important to tell the learners that manually running mkdir isn't needed for a standard rule. My old Snakefiles used to be cluttered with mkdir and os.mkdir(), but this is unnecessary because Snakemake automatically creates the subdirectories for you. Below is an example to demonstrate this behavior:

tbooth commented 1 year ago

This is mentioned in ep 02 but only in a solution to an exercise, so it bears repeating.