snakemake / snakemake-executor-plugin-slurm

A Snakemake executor plugin for submitting jobs to a SLURM cluster
MIT License
9 stars 13 forks source link

feat: add wildcards to output and comment #35

Closed Ulthran closed 4 months ago

Ulthran commented 4 months ago

Add rule wildcards to slurm output logs and job comments. Not sure if this will need extra checks for when job is a group instead of a rule.

cmeesters commented 4 months ago

I'm afraid, that's not possible this way. Also: is adding arbitrary wildcards really desirable? Or just the rule name?

Ulthran commented 4 months ago

Can we only include the wildcards if it is a Job type and pass an empty string if it's a GroupJob? Tried implementing that in the most recent commit.

In our case, we would always want to have all wildcards included in the output names. Is your concern that there might be cases where there are too many wildcards for this to be reasonable?

cmeesters commented 4 months ago

@Ulthran no, just fix the linting issue(s), please. I recommend running black on snakemake code, before commits.

I have no concerns in that regard: If people overdo appending wildcards, eventually SLURM will raise errors, but that is a very minor concern ;-)

jaicher commented 4 months ago

This breaks pipelines where wildcards can include the directory separator "/".

It should be straightforward to fix by sanitizing the wildcard string used in the logfile name to remove/replace the extra directory separators.