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
<!--Add a description of your PR here-->
I initially wanted to fix only the Mambaforge mentions in the Setup
tutorial, but then noticed several warnings when building the docs so I
tried tackling those as well. Here is a list:
- Replace Mambaforge by Miniforge in the Setup tutorial
- Remove deprecated `sphinxawesome_theme.highlighting` extension
- Fix broken links in the docs (internal links and links to API docs)
- Fix headings that the did not show up in HTML (Bash examples)
- Fix warnings about duplicate external links (e.g. links named "here")
by making them anonymous with a double underscore.
- Replace sub-worfklows by modules in Additional Features tutorial about
modularization
Let me know if these are too unrelated for a single PR and you want me
to split it.
Thank you!
### QC
<!-- Make sure that you can tick the boxes below. -->
* [x] The PR contains a test case for the changes or the changes are
already covered by an existing test case. (N.A., I think)
* [x] The documentation (`docs/`) is updated to reflect the changes or
this is not necessary (e.g. if the change does neither modify the
language nor the behavior or functionalities of Snakemake).
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Documentation Updates**
- Removed outdated highlighting extension from documentation
configuration.
- Updated references in cloud execution documentation for clarity.
- Enhanced hyperlink formatting throughout various documentation files
for consistency.
- Clarified terminology related to modularization and workflow
management.
- Revised tutorial content to reflect the transition from "Mambaforge"
to "Miniforge" for Python installation instructions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Copy file name to clipboardExpand all lines: docs/executing/caching.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ For example,
22
22
23
23
would instruct Snakemake to cache and reuse the results of the rules ``download_data`` and ``create_index``.
24
24
The environment variable definition that happens in the first line (defining the location of the cache) should of course be done only once and system wide in reality.
25
-
When Snakemake is executed without a shared filesystem (e.g., in the cloud, see :ref:`cloud`), the environment variable has to point to a location compatible with the given remote provider (e.g. an S3 or Google Storage bucket).
25
+
When Snakemake is executed without a shared filesystem (e.g., in the cloud, see :ref:`tutorial-cloud`), the environment variable has to point to a location compatible with the given remote provider (e.g. an S3 or Google Storage bucket).
26
26
In any case, the provided location should be shared between all workflows of your group, institute or computing environment, in order to benefit from the reuse of previously obtained intermediate results.
27
27
28
28
Alternatively, rules can be marked as eligible for caching via the ``cache`` directive:
Copy file name to clipboardExpand all lines: docs/getting_started/migration.rst
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,12 +25,12 @@ Snakemake 8 removes the support for three syntactical elements, which are all of
25
25
26
26
In addition, we have moved the former remote provider functionality into so called :ref:`storage plugins <storage-support>`.
27
27
Most of the old remote providers have been migrated into the new storage plugins
28
-
(see the `Snakemake plugin catalog <https://snakemake.github.io/snakemake-plugin-catalog>`_.).
28
+
(see the `Snakemake plugin catalog <https://snakemake.github.io/snakemake-plugin-catalog>`__.).
29
29
Two former remote providers have been migrated into Snakemake wrappers instead, namely
30
30
the NCBI and EGA remote providers, which are now replaced by the
31
31
`entrez/efetch <https://snakemake-wrappers.readthedocs.io/en/stable/wrappers/entrez/efetch.html>`_ and
32
32
the `ega <https://snakemake-wrappers.readthedocs.io/en/stable/wrappers/ega/fetch.html>`_ wrappers.
33
-
As of writing, the Snakemake storage plugin for xrootd (see `here <https://github.com/snakemake/snakemake-storage-plugin-xrootd>`_) does not yet pass the CI tests. Any help would be greatly appreciated.
33
+
As of writing, the Snakemake storage plugin for xrootd (see `here <https://github.com/snakemake/snakemake-storage-plugin-xrootd>`__) does not yet pass the CI tests. Any help would be greatly appreciated.
34
34
35
35
36
36
Command line interface
@@ -42,14 +42,14 @@ The command line interface of Snakemake 8 has a lot of new options which are bes
42
42
43
43
Moreover, some options have been renamed:
44
44
45
-
* All the execution backends have been moved into plugins. When you used e.g. ``--kubernetes`` and corresponding options before, you should now use ``--executor kubernetes`` and check the `Snakemake plugin catalog <https://snakemake.github.io/snakemake-plugin-catalog/plugins/executor/kubernetes.html>`_ for the new options. The same holds for all other execution backends, see `here <https://snakemake.github.io/snakemake-plugin-catalog/index.html>`_.
45
+
* All the execution backends have been moved into plugins. When you used e.g. ``--kubernetes`` and corresponding options before, you should now use ``--executor kubernetes`` and check the `Snakemake plugin catalog <https://snakemake.github.io/snakemake-plugin-catalog/plugins/executor/kubernetes.html>`_ for the new options. The same holds for all other execution backends, see `here <https://snakemake.github.io/snakemake-plugin-catalog/index.html>`__.
46
46
* The ``--use-conda`` and ``--use-singularity`` options are deprecated. Instead you should now use ``--software-deployment-method conda`` or ``--software-deployment-method apptainer`` or ``--software-deployment-method conda apptainer`` if you need both.
47
47
* There is a new executor plugin for `Google Cloud Batch <https://cloud.google.com/batch/docs/get-started>`_.
48
48
This is meant as a replacement for the old Google Life Sciences executor.
49
49
The new executor is called ``googlebatch`` and can be used with ``--executor googlebatch``.
50
-
Please check out the documentation of the plugin in the `Snakemake plugin catalog <https://snakemake.github.io/snakemake-plugin-catalog/plugins/executor/googlebatch.html>`_.
50
+
Please check out the documentation of the plugin in the `Snakemake plugin catalog <https://snakemake.github.io/snakemake-plugin-catalog/plugins/executor/googlebatch.html>`__.
51
51
Note that in principle it is fine to re-add google-lifesciences support as a plugin as well.
52
-
We even have skeleton code for this `here <https://github.com/snakemake/snakemake-executor-plugin-google-lifesciences>`_.
52
+
We even have skeleton code for this `here <https://github.com/snakemake/snakemake-executor-plugin-google-lifesciences>`__.
53
53
Any help with getting this tested and released despite the fact that google lifesciences will be shut down this year would still be valued.
54
54
55
55
.. list-table:: Interface comparison
@@ -578,4 +578,4 @@ API
578
578
579
579
The Snakemake API has been completely rewritten into a modern `dataclass <https://docs.python.org/3/library/dataclasses.html>`_ based approach.
580
580
The traditional central ``snakemake()`` function is gone.
581
-
For an example how to use the new API, check out the Snakemake CLI implementation `here <https://github.com/snakemake/snakemake/blob/04ec2c0262b2cb96cbcd7edbbb2596979c1703ae/snakemake/cli.py#L1767>`_.
581
+
For an example how to use the new API, check out the Snakemake CLI implementation `here <https://github.com/snakemake/snakemake/blob/04ec2c0262b2cb96cbcd7edbbb2596979c1703ae/snakemake/cli.py#L1767>`__.
Copy file name to clipboardExpand all lines: docs/project_info/faq.rst
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ The quick fix for virtualenv is to temporarily deactivate the check for unbound
64
64
65
65
set +u;source /path/to/venv/bin/activate;set -u
66
66
67
-
For more details on bash strict mode, see the `here <http://redsymbol.net/articles/unofficial-bash-strict-mode/>`_.
67
+
For more details on bash strict mode, see the `here <http://redsymbol.net/articles/unofficial-bash-strict-mode/>`__.
68
68
69
69
70
70
My shell command fails with exit code != 0 from within a pipe, what's wrong?
@@ -293,11 +293,11 @@ How do I enable syntax highlighting in Vim for Snakefiles?
In case your administrator does not provide you with a proper configuration of the sendmail framework, you can configure `mail` to work e.g. via Gmail (see `here <https://www.cyberciti.biz/tips/linux-use-gmail-as-a-smarthost.html>`_).
357
+
In case your administrator does not provide you with a proper configuration of the sendmail framework, you can configure `mail` to work e.g. via Gmail (see `here <https://www.cyberciti.biz/tips/linux-use-gmail-as-a-smarthost.html>`__).
358
358
359
359
I want to pass Python variables between rules. Is that possible?
@@ -440,6 +440,7 @@ How do I make my rule fail if an output file is empty?
440
440
Snakemake expects shell commands to behave properly, meaning that failures should cause an exit status other than zero. If a command does not exit with a status other than zero, Snakemake assumes everything worked fine, even if output files are empty. This is because empty output files are also a reasonable tool to indicate progress where no real output was produced. However, sometimes you will have to deal with tools that do not properly report their failure with an exit status. Here, you can use the :ref:`ensure function <snakefiles_ensure>` to mark output files that should not be empty, e.g.:
441
441
442
442
.. code-block:: python
443
+
443
444
rule NAME:
444
445
input: ...
445
446
output:
@@ -532,7 +533,7 @@ One solution is to add the following lines to your ``.bashrc`` (or similar):
532
533
done
533
534
}
534
535
535
-
(inspired by the answer `here <https://stackoverflow.com/questions/2458042/restore-files-modification-time-in-git/22638823#22638823>`_).
536
+
(inspired by the answer `here <https://stackoverflow.com/questions/2458042/restore-files-modification-time-in-git/22638823#22638823>`__).
536
537
You can then run ``gitmodtimes`` to update the modification times of all tracked files on the current branch to their last commit time in git; BE CAREFUL--this does not account for local changes that have not been committed.
537
538
538
539
How do I exit a running Snakemake workflow?
@@ -664,7 +665,7 @@ Say you have forgotten how to use the various options starting ``force``, just t
664
665
665
666
To activate this autocompletion permanently, put this line in ``~/.zshrc``.
666
667
667
-
`Here <https://github.com/zsh-users/zsh-completions/blob/master/zsh-completions-howto.org>`_ is some further reading.
668
+
`Here <https://github.com/zsh-users/zsh-completions/blob/master/zsh-completions-howto.org>`__ is some further reading.
668
669
669
670
How can I avoid system /tmp to be used when combining apptainer and conda?
Copy file name to clipboardExpand all lines: docs/snakefiles/best_practices.rst
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,14 +15,14 @@ Best practices
15
15
It is **highly recommended** to run the linter before publishing any workflow, asking questions on Stack Overflow or filing issues on Github.
16
16
* There is an automatic formatter for Snakemake workflows, called `Snakefmt <https://github.com/snakemake/snakefmt>`_, which should be applied to any Snakemake workflow before publishing it.
17
17
* When publishing your workflow in a `Github <https://github.com>`_ repository, it is a good idea to add some minimal test data and configure `Github Actions <https://github.com/features/actions>`_ for continuously testing the workflow on each new commit.
18
-
For this purpose, we provide predefined Github actions for both running tests and linting `here <https://github.com/snakemake/snakemake-github-action>`_, as well as formatting `here <https://github.com/snakemake/snakefmt#github-actions>`_.
18
+
For this purpose, we provide predefined Github actions for both running tests and linting `here <https://github.com/snakemake/snakemake-github-action>`__, as well as formatting `here <https://github.com/snakemake/snakefmt#github-actions>`__.
19
19
* For publishing and distributing a Snakemake workflow, it is a good idea to stick to a :ref:`standardized structure <distribution_and_reproducibility>` that is expected by frequent users of Snakemake.
20
20
The `Snakemake workflow catalog <https://snakemake.github.io/snakemake-workflow-catalog>`_ automatically lists Snakemake workflows hosted on `Github <https://github.com>`_ if they follow certain `rules <https://snakemake.github.io/snakemake-workflow-catalog/?rules=true>`_.
21
21
By complying to these `rules <https://snakemake.github.io/snakemake-workflow-catalog/?rules=true>`_ you can make your workflow more discoverable and even automate its usage documentation (see `"Standardized usage" <https://snakemake.github.io/snakemake-workflow-catalog/?rules=true>`_).
22
-
* Configuration of a workflow should be handled via :ref:`config files <snakefiles_standard_configuration>` and, if needed, tabular configuration like sample sheets (either via :ref:`Pandas <snakefiles_tabular_configuration>` or :ref:`PEPs <snakefiles_peps>`).
22
+
* Configuration of a workflow should be handled via :ref:`config files <snakefiles_standard_configuration>` and, if needed, tabular configuration like sample sheets (either via :ref:`Pandas <snakefiles_tabular_configuration>` or :ref:`PEPs <snakefiles-peps>`).
23
23
Use such configuration for metadata and experiment information, **not for runtime specific configuration** like threads, resources and output folders.
24
24
For those, just rely on Snakemake's CLI arguments like ``--set-threads``, ``--set-resources``, ``--set-default-resources``, and ``--directory``.
25
25
This makes workflows more readable, scalable, and portable.
26
26
* Try to keep filenames short (thus easier on the eye), but informative. Avoid mixing of too many special characters (e.g. decide whether to use ``_`` or ``-`` as a separator and do that consistently throughout the workflow).
27
27
* Try to keep Python code like helper functions separate from rules (e.g. in a ``workflow/rules/common.smk`` file). This way, you help non-experts to read the workflow without needing to parse internals that are irrelevant for them. The helper function names should be chosen in a way that makes them sufficiently informative without looking at their content. Also avoid ``lambda`` expressions inside of rules.
28
-
* Make use of `Snakemake wrappers <https://snakemake-wrappers.readthedocs.io>`_ whenever possible. Consider contributing to the wrapper repo whenever you have a rule that reoccurs in at least two of your workflows.
28
+
* Make use of `Snakemake wrappers <https://snakemake-wrappers.readthedocs.io>`_ whenever possible. Consider contributing to the wrapper repo whenever you have a rule that reoccurs in at least two of your workflows.
If the `configfile` statement is not used, the config variable provides an empty array.
37
-
In addition to the `configfile` statement, config values can be overwritten via the command line or the :ref:`api_reference_snakemake`, e.g.:
37
+
In addition to the `configfile` statement, config values can be overwritten via the command line or the `snakemake.utils API <https://snakemake-api.readthedocs.io/en/stable/api_reference/snakemake_utils.html#snakemake.utils.update_config>`__, e.g.:
38
38
39
39
.. code-block:: console
40
40
@@ -53,7 +53,7 @@ For adding config placeholders into a shell command, Python string formatting sy
Copy file name to clipboardExpand all lines: docs/snakefiles/foreign_wms.rst
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ Consider the following example:
29
29
30
30
Here, the workflow is executed as usual until this rule is reached.
31
31
Then, Snakemake passes all resources to the nextflow workflow management system, which generates certain files.
32
-
The rule is executed as a :ref:`local rule <snakefiles-local-rule>`, meaning that it would not be submitted to a cluster or cloud system by Snakemake.
32
+
The rule is executed as a :ref:`local rule <snakefiles-local-rules>`, meaning that it would not be submitted to a cluster or cloud system by Snakemake.
33
33
Instead, the invoked other workflow management system is responsible for that.
34
34
E.g., in case of `Nextflow <https://nextflow.io>`_, submission behavior can be configured via a ``nextflow.conf`` file or environment variables.
35
-
After the step is done, Snakemake continues execution with the output files produced by the foreign workflow.
35
+
After the step is done, Snakemake continues execution with the output files produced by the foreign workflow.
Copy file name to clipboardExpand all lines: docs/snakefiles/modularization.rst
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,7 @@ The `Snakemake Wrapper Repository`_ is meant as a collaborative project and pull
62
62
Common-Workflow-Language (CWL) support
63
63
--------------------------------------
64
64
65
-
With Snakemake 4.8.0, it is possible to refer to `CWL <https://www.commonwl.org/>`_ tool definitions in rules instead of specifying a wrapper or a plain shell command.
65
+
With Snakemake 4.8.0, it is possible to refer to `CWL <https://www.commonwl.org/>`__ tool definitions in rules instead of specifying a wrapper or a plain shell command.
66
66
A CWL tool definition can be used as follows.
67
67
68
68
.. code-block:: python
@@ -89,7 +89,7 @@ Snakemake will execute the rule by invoking `cwltool`, which has to be available
89
89
When using in combination with :ref:`--software-deployment-method apptainer <apptainer>` (``--sdm`` for short), Snakemake will instruct `cwltool` to execute the command via Singularity in user space.
90
90
Otherwise, `cwltool` will in most cases use a Docker container, which requires Docker to be set up properly.
91
91
92
-
The advantage is that predefined tools available via any `repository of CWL tool definitions <https://www.commonwl.org/#Repositories_of_CWL_Tools_and_Workflows>`_ can be used in any supporting workflow management system.
92
+
The advantage is that predefined tools available via any `repository of CWL tool definitions <https://www.commonwl.org/#Repositories_of_CWL_Tools_and_Workflows>`__ can be used in any supporting workflow management system.
93
93
In contrast to a :ref:`Snakemake wrapper <snakefiles-wrappers>`, CWL tool definitions are in general not suited to alter the behavior of a tool, e.g., by normalizing output names or special input handling.
94
94
As you can see in comparison to the analog :ref:`wrapper declaration <snakefiles-wrappers>` above, the rule becomes slightly more verbose, because input, output, and params have to be dispatched to the specific expectations of the CWL tool definition.
0 commit comments