Skip to content
Permalink
Browse files
docs: add sentence about workflow template to docs (#1369)
* add sentence about workflow template to docs

This commit also includes some minor text editing.

* docs: add sentence about workflow template to docs

dummy commit to make release-please happy

* style: format according to black requirement
  • Loading branch information
dlaehnemann committed Feb 3, 2022
1 parent 8c5c5e8 commit 5fabffbb4af8e9e122677e5adeaebf2d6bd0eeb3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
@@ -35,15 +35,18 @@ following structure:
├── results
└── resources
In other words, the workflow code goes into a subfolder ``workflow``, while the configuration is stored in a subfolder ``config``.
In other words, the workflow code goes into a subfolder ``workflow``, while the configuration is stored in a subfolder ``config``.
Inside of the ``workflow`` subfolder, the central ``Snakefile`` marks the entrypoint of the workflow (it will be automatically discovered when running snakemake from the root of above structure.
In addition to the central ``Snakefile``, rules can be stored in a modular way, using the optional subfolder ``workflow/rules``. Such modules should end with ``.smk`` the recommended file extension of Snakemake.
This main structure and the recommendations below are implemented in `this Snakemake workflow template <https://github.com/snakemake-workflows/snakemake-workflow-template>`_ that you can use to `create your own workflow repository with a single click on "Use this template" <https://github.com/snakemake-workflows/snakemake-workflow-template/generate>_.
In addition to the central ``Snakefile``, rules can be stored in a modular way, using the optional subfolder ``workflow/rules``.
Such modules should end with ``.smk``, the recommended file extension of Snakemake.
Further, :ref:`scripts <snakefiles-external_scripts>` should be stored in a subfolder ``workflow/scripts`` and notebooks in a subfolder ``workflow/notebooks``.
Conda environments (see :ref:`integrated_package_management`) should be stored in a subfolder ``workflow/envs`` (make sure to keep them as finegrained as possible to improve transparency and maintainability).
Finally, :ref:`report caption files <snakefiles-reports>` should be stored in ``workflow/report``.
All output files generated in the workflow should be stored under ``results``, unless they are rather retrieved resources, in which case they should be stored under ``resources``. The latter subfolder may also contain small resources that shall be delivered along with the workflow via git (although it might be tempting, please refrain from trying to generate output file paths with string concatenation of a central ``outdir`` variable or so, as this hampers readability).
All output files generated in the workflow should be stored under ``results``, unless they are rather retrieved resources, in which case they should be stored under ``resources``.
The latter subfolder may also contain small resources that shall be delivered along with the workflow via git (although it might be tempting, please refrain from trying to generate output file paths with string concatenation of a central ``outdir`` variable or so, as this hampers readability).

Workflows setup in above structure can be easily used and combined via :ref:`the Snakemake module system <use_with_modules>`.
Workflows set up in above structure can be easily used and combined via :ref:`the Snakemake module system <use_with_modules>`.
Such deployment can even be automated via `Snakedeploy <https://snakedeploy.readthedocs.io>`_.
Moreover, by publishing a workflow on `Github <https://github.com>`_ and following a set of additional `rules <https://snakemake.github.io/snakemake-workflow-catalog/?rules=true>`_ the workflow will be automatically included in the `Snakemake workflow catalog <https://snakemake.github.io/snakemake-workflow-catalog>`_, thereby easing discovery and even automating its usage documentation.
For an example of such automated documentation, see `here <https://snakemake.github.io/snakemake-workflow-catalog/?usage=snakemake-workflows%2Fdna-seq-varlociraptor>`_.
@@ -104,11 +104,8 @@ def __repr__(self):
) == sorted(["a: aa + b: b", "a: aa + b: bb", "c: c", "c: cc"])

# expand on pathlib.Path objects
assert (
expand(
PosixPath() / "{x}" / "{y}",
x="Hello",
y="world",
)
== ["Hello/world"]
)
assert expand(
PosixPath() / "{x}" / "{y}",
x="Hello",
y="world",
) == ["Hello/world"]

0 comments on commit 5fabffb

Please sign in to comment.