HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

snakefmt — Format Snakemake files. More information: <https://github.com/snakemake/snakefmt#usage>.

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandformatfilesclisnakemakeinformationmoresnakefmt

Problem

How to use the snakefmt command: Format Snakemake files. More information: <https://github.com/snakemake/snakefmt#usage>.

Solution

snakefmt — Format Snakemake files. More information: <https://github.com/snakemake/snakefmt#usage>.

Format a specific Snakefile:
snakefmt {{path/to/snakefile}}


Format all Snakefiles recursively in a specific directory:
snakefmt {{path/to/directory}}


Format a file using a specific configuration file:
snakefmt --config {{path/to/config.toml}} {{path/to/snakefile}}


Format a file using a specific maximum line length:
snakefmt --line-length {{100}} {{path/to/snakefile}}


Display the changes that would be performed without performing them (dry-run):
snakefmt --diff {{path/to/snakefile}}

Code Snippets

Format a specific Snakefile

snakefmt {{path/to/snakefile}}

Format all Snakefiles recursively in a specific directory

snakefmt {{path/to/directory}}

Format a file using a specific configuration file

snakefmt --config {{path/to/config.toml}} {{path/to/snakefile}}

Format a file using a specific maximum line length

snakefmt --line-length {{100}} {{path/to/snakefile}}

Display the changes that would be performed without performing them (dry-run)

snakefmt --diff {{path/to/snakefile}}

Context

tldr-pages: common/snakefmt

Revisions (0)

No revisions yet.