Commit c821dbee authored by Cedric Laczny's avatar Cedric Laczny

Minor fixes.

parent c672b091
......@@ -27,7 +27,7 @@ rule generate_some_output:
cat {input.first} {input.second} > {output}
"""
# The `str(output)` is necessary as `open()` expectes a `string` type and not an `OutputFiles` type
# A default of 4 threads is specified here. This is overriden using the `--cores` CLI option
rule list_generated_output:
input: expand("{NAME}_out.txt", NAME=NAMES)
output: "list_of_generated_output.txt"
......
......@@ -30,7 +30,8 @@ rule generate_some_output:
cat {input.first} {input.second} > {output}
"""
# The `str(output)` is necessary as `open()` expectes a `string` type and not an `OutputFiles` type
# N.B. the *LACK* of quotes around `heading`, whereas `names` needs to be quoted above.
# This is the difference between using the config *within* or *outside* of a rule.
rule list_generated_output:
input: expand("{NAME}_out.txt", NAME=NAMES)
output: "list_of_generated_output.txt"
......
......@@ -12,7 +12,9 @@ pip install snakemake --no-cache-dir # Needed in case of my b0rked environment
# Basics
```
snakemake -s 01-basics.smk # Generate the *default* target
snakemake -s 01-basics.smk -n # Dry-run
snakemake -s 01-basics.smk -np # Dry-run and print the commands
snakemake -s 01-basics.smk -p # Generate the *default* target and print the commands
snakemake -s 01-basics.smk a.txt # Generate a *specific* target
snakemake -s 02-basics.smk a.txt # Print info message during run
```
......@@ -106,9 +108,9 @@ cat list_of_generated_output.txt
# Parallelization
## Simple parallelization
```
snakemake -s 07-threads.smk -p
snakemake -s 07-threads.smk -p # Will use a *single* thread
cat list_of_generated_output.txt # All files should be in alphabetical order
snakemake -j 2 -s 07-threads.smk -p # Files can be listed *out*-of-order
snakemake --cores 2 -s 07-threads.smk -p # Will use *two* threads. Files can be listed *out*-of-order
```
## Cluster-scale parallelization
......@@ -116,10 +118,10 @@ Demo using MUST/LeGeLiS sample
# Using a configuration file
```
snakemake -s 08-config_file.smk
snakemake -s 08-config_file.smk -p
cat list_of_generated_output.txt
snakemake --config names='["p", "q", "t"]' -s 08-config_file.smk # Overwriting via the CLI
snakemake --configfile config2.yaml -s 08-config_file.smk # Use a different configfile altogether
snakemake --config names='["p", "q", "t"]' -s 08-config_file.smk -p # Overwriting via the CLI
snakemake --configfile config2.yaml -s 08-config_file.smk -p # Use a different configfile altogether
cat list_of_generated_output.txt
```
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment