Can I define a default profile for snakemake?

Viewed 184

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).

1 Answers

Description of --profile option:

--profile
Name of profile to use for configuring Snakemake. Snakemake will search for a corresponding folder in /etc/xdg/snakemake and /home/docs/.config/snakemake. Alternatively, this can be an absolute or relative path. The profile folder has to contain a file ‘config.yaml’. This file can be used to set default values for command line options in YAML format. For example, ‘–cluster qsub’ becomes ‘cluster: qsub’ in the YAML file. Profiles can be obtained from https://github.com/snakemake-profiles.

If your profile is located under /etc/xdg/snakemake or /home/docs/.config/snakemake, snakemake will automatically utilize them.

Related