Snakemake-Profiles / slurm

Cookiecutter for snakemake slurm profile
MIT License
126 stars 44 forks source link

Add snakemake string pattern formatting #43

Closed racng closed 4 years ago

racng commented 4 years ago

Snakemake string pattern formatting code normally used for --cluster-config is adapted and added to slurm profile to do string formatting using the job_properties dictionary. This addresses #40 where the keywords in braces were not substituted for values. All values in sbatch_options would be converted if applicable.

For example, the command snakemake --profile slurm alone would evaluate the following output string pattern in the following yaml file, if its path is given as the cluster_config input for cookiecooker (i.e. assigned to CLUSTER_CONFIG in slurm-submit.py).

__default__:
  output: "slurm/{rule}_%j.log"
racng commented 4 years ago

On second thought, I moved all string formatting functions to slurm_utils.py? Also should the formatting function be applied to the whole sbatch_options dictionary or just the cluster_config dictionary?