I am trying to run snakemake
version 3.5.4
on my cluster, where jobs are partially defined by a common template build according manual and also defined though rule-specific parameters. But for some reason cluster configuration is not expanding wildcards (and command does). When I run
snakemake data/genome.fa.gz.bwt -p --jobs 10 --cluster-config cluster.json --cluster "bsub -J "{rule}.{wildcards}" -q {cluster.queue} -n {threads} -M {resources.M} -R {cluster.one_host} -o {cluster.output} -e {cluster.error}"
-J "{rule}.{wildcards}" -q {cluster.queue} -n {threads} -M {resources.M} -R {cluster.one_host}
expands as expected. But -o {cluster.output} -e {cluster.error}
is replaced by literally logs/cluster/{rule}.{wildcards}.out
and logs/cluster/{rule}.{wildcards}.err
, i.e. there is no expansion in config file (the config file is attached bellow).
I am puzzled since exactly this lines are in the documentation. What am I doing wrong? Why snakemake
is not expanding wildcards in the config file?
Here is my cluster.json
{
"__default__" :
{
"queue" : "bgee",
"one_host" : "\"span[hosts=1]\"",
"name" : "{rule}.{wildcards}",
"output" : "logs/cluster/{rule}.{wildcards}.out",
"error" : "logs/cluster/{rule}.{wildcards}.err"
},
}
Here is relevant part of Snakefile
:
rule index_reference :
threads: 1
resources: M=20000000
input : "data/{reference}/genome.fa.gz"
output : "data/{reference}/genome.fa.gz.bwt"
shell : "scripts/index_genome.sh {input}"