Snakemake-Profiles / slurm

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

Check if job has params before formatting #50

Closed twrightsman closed 4 years ago

twrightsman commented 4 years ago

I was getting the following error:

Traceback (most recent call last):
  File "/home/twrightsman/.config/snakemake/slurm/slurm-submit.py", line 52, in <module>
    sbatch_options = slurm_utils.format_values(sbatch_options, job_properties)
  File "/home/twrightsman/.config/snakemake/slurm/slurm_utils.py", line 95, in format_values
    formatted[key] = format_wildcards(value, job_properties)
  File "/home/twrightsman/.config/snakemake/slurm/slurm_utils.py", line 68, in format_wildcards
    job._format_params = Wildcards(fromdict=job_properties['params'])
KeyError: 'params'
percyfal commented 4 years ago

Hi, could you provide an example of the command/code you used? Snakemake should add all necessary keys (https://github.com/snakemake/snakemake/blob/master/snakemake/jobs.py#L863); could it be a TypeError in the params section (https://github.com/snakemake/snakemake/blob/master/snakemake/jobs.py#L881?