Skip to content Skip to sidebar Skip to footer

Use Of Argparse In Snakemake Script

Is it possible to pass custom command line arguments to snakemake scripts? I have tried, but executing Snakefile with argparse results in error snakemake: error: unrecognized argum

Solution 1:

Passing arguments from command line is possible using --config. For example:

snakemake --config zz="filename"

In snakefile script, this can be used in this way:

rule test_1:
    input:
        fn + config['zz']
    shell:
        "echo Using file {input}"

See the doc for more info.

Post a Comment for "Use Of Argparse In Snakemake Script"