gbouras13 / hybracter

Automated long-read first bacterial genome assembly tool implemented in Snakemake using Snaketool.
MIT License
108 stars 8 forks source link

Fix: Error calling blastx in rule Dnaapler #106

Closed richardstoeckl closed 1 week ago

richardstoeckl commented 2 weeks ago

Hi,

this PR attempts to fix #54.

As discussed in that issue, the Dnaapler rule might fail, if not enough memory is given. However, even if I set the "medium" ressources the same as the "big" ressources in the config file, the Dnaapler rule still failed with the same error for me. The only solution was to run hybracter with --cores 1.

In this PR, I use the retries: directive and a small helper function to set the threads for the Dnaapler rules to 1, if the rule fails with the usual config.resources.med.cpu.

Let me know if I can improve something.

Best wishes, Richard

gbouras13 commented 1 week ago

Hi @richardstoeckl - thanks for this PR! Very happy to merge it as it has passed all CI checks (albeit it would be hard to replicate the OOM behaviour in the CI suite).

George