SamStudio8 / reticulatus

A snakemake-based pipeline for assembling and polishing long genomes from long nanopore reads
MIT License
68 stars 5 forks source link

Make use of the {attempt} key to reduce GPU requirements #19

Open SamStudio8 opened 4 years ago

SamStudio8 commented 4 years ago

In typical snakemake fashion, you can't just do the simple stuff. The attempt counter is only available to resources, not params. Hacking a param to access a resource also seems to just give the default value for that resource.

SamStudio8 commented 4 years ago

It turns out that you can assign arbitrary, uncontrolled resources that depend on attempt. These are actually accessible in shell. So you can define these attempt-influenced parameters as a resource, rather than an actual parameter. It's a dirty hack, but it works.