Search code examples
snakemake

Can I define a default profile for snakemake?


From the documentation, I know that I can define a profile and use it via

snakemake --profile <name>

Can I make one of these profiles the default (to be used when I enter the command snakemake)?

Defining an alias in .bashrc would be a workaround. However, I wondered whether there is an 'official' snakemake solution.

Sideremark: My initial motivation for a default profile of snakemake was to define the default number of cores, so that I would not always have to type

snakemake -j [cores]

The default number of cores is "None" (for my installation of snakemake using conda).


Solution

  • From the documentation:

    The default profile to use when no --profile argument is specified can also be set via the environment variable SNAKEMAKE_PROFILE, e.g. by specifying export SNAKEMAKE_PROFILE=myprofile in your ~/.bashrc or the system wide shell defaults.