Contents
What are rules and names in snakemake workflow?
A Snakemake workflow defines a data analysis in terms of rules, that are listed in so-called Snakefiles. Most importantly, a rule can consist of a name, input files, output files, and a shell command to generate the output from the input, i.e. The name is optional and can be left out, creating an anonymous rule, and can be overridden with name.
Can you change the number of cores in snakemake?
Note: This behavior is not affected by –local-cores, which only applies to jobs running on the main node. Snakemake can alter the number of cores available based on command line options.
How are input and output evaluated in snakemake?
Here, input and output (and in general any list or tuple) automatically evaluate to a space-separated list of files (i.e. path/to/inputfile path/to/other/inputfile ).
How to limit the environment variables in snakemake?
Snakemake limits the respective environment variables to one core by default, to avoid unexpected and unlimited core-grabbing, but will override this with the threads: you specify in a rule (the parameters set to threads:, or defaulting to 1, are: OMP_NUM_THREADS]
How are the paths interpreted in the snakefile?
All paths in the snakefile are interpreted relative to the directory snakemake is executed in. This behaviour can be overridden by specifying a workdir in the snakefile: Usually, it is preferred to only set the working directory via the command line, because above directive limits the portability of Snakemake workflows.
Where do I find the configuration file in snakemake?
A configuration is provided as a JSON or YAML file and can be loaded with: The config file can be used to define a dictionary of configuration parameters and their values. In the workflow, the configuration is accessible via the global variable config, e.g.
What is the wildcard basename for snakemake?
If a rule named bamCoverage is executed with the wildcard basename = sample1, for example, the output and error files will be bamCoverage.basename=sample1.out and bamCoverage.basename=sample1.err, respectively. All paths in the snakefile are interpreted relative to the directory snakemake is executed in.
Why is snakemake used as a command line tool?
Snakemake is primarily a command-line tool, so the snakemake executable is the primary way to execute, debug, and visualize workflows. If called with the number of cores to use, i.e.
How are output files identified in snakemake 6.3?
Output files are identified by hashing all steps, parameters and software stack (conda envs or containers) needed to create them. The workflow definition in form of a snakefile.Usually, you should not need to specify this.