I suspect that what you are doing is:
rule one:
input:
...
output:
...
shell:
"""
sbatch [sbatch-options] "some-command-or-script"
"""
What you want maybe is:
rule one:
input:
...
output:
...
shell:
"""
some-command-or-script
"""
To be executed as
snakemake --cluster "sbatch [sbatch-options]"
In this way every rule will send its jobs to the cluster and snakemake will handle them. If you want a rule to execute its jobs locally (not via sbatch) mark that rule with the directive localrule
(check documentation for more detail)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…