I am trying to use a Snakefile that does something like this:
rule split_files:
input:
'{pop}.bam'
output:
dynamic('{pop}_split/{chrom}.sam')
shell:
"something"
rule work:
input:
sam='{pop}_split/{chrom}.sam',
snps='snps/{chrom}_snps'
output:
'{pop}_split/{chrom}_parsed.sam'
shell:
"something"
rule combine:
input:
dynamic('{pop}_split/{chrom}_parsed.sam')
output:
'{pop}_merged.sam'
shell:
"something"
This results in the error:
Missing input files for rule work:
snps/__snakemake_dynamic___snps
Adding dynamic
to both of the inputs for the work rule results in the same error.
I need to do this because some populations have chrY and others do not, so I can't just expand with a chromosome list (actually I can with another work around that I am currently using, but it is cumbersome).