Skip to content

Commit

Permalink
docs: tutorial formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneskoester committed Sep 21, 2021
1 parent 26373e6 commit 594f5fb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
1 change: 1 addition & 0 deletions doc-environment.yml
Expand Up @@ -13,6 +13,7 @@ dependencies:
- jsonschema
- gitpython
- sphinx
- pip
- pip:
- sphinxcontrib-napoleon
- sphinx-argparse
Expand Down
17 changes: 7 additions & 10 deletions docs/tutorial/basics.rst
Expand Up @@ -360,6 +360,13 @@ But for now, this is enough so that we can add the following rule to our Snakefi
"samtools mpileup -g -f {input.fa} {input.bam} | "
"bcftools call -mv - > {output}"
With multiple input or output files, it is sometimes handy to refer to them separately in the shell command.
This can be done by **specifying names for input or output files**, for example with ``fa=...``.
The files can then be referred to in the shell command by name, for example with ``{input.fa}``.
For **long shell commands** like this one, it is advisable to **split the string over multiple indented lines**.
Python will automatically merge it into one.
Further, you will notice that the **input or output file lists can contain arbitrary Python statements**, as long as it returns a string, or a list of strings.
Here, we invoke our ``expand`` function to aggregate over the aligned reads of all samples.

.. sidebar:: Note

Expand All @@ -374,16 +381,6 @@ But for now, this is enough so that we can add the following rule to our Snakefi
This would concatenate to the command ``"samtools mpileup-g -f {input.fa} {input.bam}"`` and consequently throw the error: ``[main] unrecognized command 'mpileup-g'``.


With multiple input or output files, it is sometimes handy to refer to them separately in the shell command.
This can be done by **specifying names for input or output files**, for example with ``fa=...``.
The files can then be referred to in the shell command by name, for example with ``{input.fa}``.
For **long shell commands** like this one, it is advisable to **split the string over multiple indented lines**.
Python will automatically merge it into one.
Further, you will notice that the **input or output file lists can contain arbitrary Python statements**, as long as it returns a string, or a list of strings.
Here, we invoke our ``expand`` function to aggregate over the aligned reads of all samples.


Exercise
........

Expand Down

0 comments on commit 594f5fb

Please sign in to comment.