Default memory request overridden in Snakefile?

I have a Snakefile with multiple rules, and only a few need more than 1 GB / core to run on a cluster. The directive resources

works great for this, but I can't find a way to set the default. I would rather not write resources: mem_per_cpu = 1024

for every rule that doesn't require more than the default.

I understand that I can get what I want by using __default__

in the cluster config file and overriding the value mem_per_cpu

for specific rules. I hesitate to do this because the memory requirements are platform independent, so I would prefer to include them in the Snakefile itself. It would also prevent me from specifying local resource limits using a command line parameter --resources

.

Is there a simple solution with Snakemake to help me here? Thank!

+3


source to share


1 answer


I was reading the Serpentine Creation changelog and I came across this:



Add the –default-resources flag that allows you to define default resources for desktops (eg mem_mb, disk_mb), see docs.

+1


source







All Articles