snakemake
snakemake copied to clipboard
glob_wildcards does not obey wildcard_constraints directive
True on v7.8.2, but from peeking at the code, there is no mention of wildcard constraints near the glob_wildcards definition.
So code like this "fails" because it pulls in the wrong files
wildcard_constraints:
chunk = r'\d*:\d*-\d*'
def aggregate_scatter(wildcards):
checkpoint_dir = checkpoints.bcftools_scatter.get(**wildcards).output[0]
return expand('chunk-{chunk}.imputed.vcf.gz',chunk=glob_wildcards('chunk-{chunk}.vcf.gz')).chunk)
while explicitly adding the constraint to the glob glob_wildcards('chunk-{chunk,\d*:\d*-\d*}.vcf.gz') now works. Not that hard to work around, but an easy mistake to make since I would assume wildcard_constraints always applies and just leads to repeating yourself.
This is still not fixed as of v8.16.0. Spent all this time trying to figure out why my checkpoint wasn't working it was because of this
I think this is a duplicate of #482.