ncbi genome download gives exit code1 when there are no found genomes in genbank or refseq. This causes the process to fail and to stop the pipeline from running.
This PR fixes that behavior. It:
uses set +e at the top of the bash script in the process, allowing it to finish running even if there is an exit code. Typically, nextflow uses #!/bin/bash -euo pipefail shbang, which makes a script exit if any command has any exit code, without finished the rest of the script. set +e overrides this behavior.
re-set the exit code when we fail at the expected places with exit 1. This included introducing dry-runs and other checks directly in the script
still including errorStrategy { task.exitStatus == 1 ? 'ignore' : 'terminate' } at the top of the script so that when something fails for real, as it should (i.e. no genomes in genbank or refseq for a genera), the whole pipeline keeps running, but only non-dependent processes.
ncbi genome download gives exit code1 when there are no found genomes in genbank or refseq. This causes the process to fail and to stop the pipeline from running.
This PR fixes that behavior. It:
set +e
at the top of the bash script in the process, allowing it to finish running even if there is an exit code. Typically, nextflow uses#!/bin/bash -euo pipefail
shbang, which makes a script exit if any command has any exit code, without finished the rest of the script.set +e
overrides this behavior.errorStrategy { task.exitStatus == 1 ? 'ignore' : 'terminate' }
at the top of the script so that when something fails for real, as it should (i.e. no genomes in genbank or refseq for a genera), the whole pipeline keeps running, but only non-dependent processes.