Skip to content

Commit 4de03da

Browse files
committed
declare the behavier: Reruns will not be triggered if the output file do not exist.
1 parent 5f82139 commit 4de03da

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

docs/snakefiles/rules.rst

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ It is not clear whether ``dataset=101.B`` and ``group=normal`` or ``dataset=101`
7070
Hence wildcards can be constrained to given regular expressions.
7171
Here we could restrict the wildcard ``dataset`` to consist of digits only using ``\d+`` as the corresponding regular expression.
7272
With Snakemake 3.8.0, there are three ways to constrain wildcards.
73-
First, a wildcard can be constrained within the file pattern, by appending a regular expression separated by a comma
73+
First, a wildcard can be constrained within the file pattern, by appending a regular expression separated by a comma
7474
(you might want to use the `r` prefix for a raw string to avoid having to escape backslashes, particularly for more complex regular expressions):
7575

7676
.. code-block:: python
@@ -214,7 +214,7 @@ These restrictions do not apply when using ``unpack()``.
214214
Helpers for defining rules
215215
--------------------------
216216

217-
Snakemake provides a number of helpers that can be used to define rules and drastically simplify over using
217+
Snakemake provides a number of helpers that can be used to define rules and drastically simplify over using
218218
:ref:`input functions <snakefiles-input_functions>` or :ref:`plain python expressions <snakefiles_aggregation>`.
219219
Below, we will first start with describing two basic helper functions for specifying aggregations and multiple output files.
220220
Afterwards, we will further show a set of semantic helper functions should increase readability and simplify code (see :ref:`snakefiles-semantic-helpers`).
@@ -346,14 +346,14 @@ The lookup function
346346

347347
The ``lookup`` function can be used to look up a value in a python mapping (e.g. a ``dict``) or a `pandas dataframe or series <https://pandas.pydata.org>`_.
348348
It is especially useful for looking up information based on wildcard values.
349-
The ``lookup`` function has the signature
349+
The ``lookup`` function has the signature
350350

351351
.. code-block:: python
352352
353353
lookup(
354-
dpath: Optional[str | Callable] = None,
355-
query: Optional[str | Callable] = None,
356-
cols: Optional[List[str]] = None,
354+
dpath: Optional[str | Callable] = None,
355+
query: Optional[str | Callable] = None,
356+
cols: Optional[List[str]] = None,
357357
is_nrows: Optional[int],
358358
within=None,
359359
default=NODEFAULT
@@ -2668,8 +2668,9 @@ Assuming that the checkpoint is named ``somestep`` as above, the output files fo
26682668
26692669
.. note::
26702670

2671-
Note that output files of checkpoints that are accessed via this mechanism should not be marked as temporary.
2672-
Otherwise, they would require to trigger reruns of the checkpoint whenever the DAG shall be reevaluated (because they are already missing at that point).
2671+
Note that output files of checkpoints that are accessed via this mechanism will not be marked as temporary.
2672+
Even you try to mark them as temporary, Snakemake will ignore the label and keep the output files of the checkpoint.
2673+
Reruns will not be triggered if the output file do not exist.
26732674

26742675
Thereby, the ``get`` method throws ``snakemake.exceptions.IncompleteCheckpointException`` if the checkpoint has not yet been executed for these particular wildcard value(s).
26752676
Inside an input function, the exception will be automatically handled by Snakemake, and leads to a re-evaluation after the checkpoint has been successfully passed.
@@ -3195,7 +3196,7 @@ The name is optional and can be left out, creating an anonymous rule. It can als
31953196
31963197
for tool in ["bcftools", "freebayes"]:
31973198
rule:
3198-
name:
3199+
name:
31993200
f"call_variants_{tool}"
32003201
input:
32013202
f"path/to/{tool}/inputfile"

0 commit comments

Comments
 (0)