bonsai-team / matam

Mapping-Assisted Targeted-Assembly for Metagenomics
GNU Affero General Public License v3.0
19 stars 9 forks source link

Binaries checks should be after option parsing and help printing #83

Closed ppericard closed 4 years ago

ppericard commented 5 years ago

Right now, if a binary is missing (e.g. classifier), the main program will stop and raise an error even before printing help.

Cases like:

(base) ubuntu@ppericard-matam-dev:~/data/test_matam$ matam_assembly.py
No valid binary found for classifier
(base) ubuntu@ppericard-matam-dev:~/data/test_matam$ matam_assembly.py -h
No valid binary found for classifier

should print help first and exit without even checking for binaries

ppericard commented 5 years ago

Changing the order of those operations would also help solve issue #82 since the assembler would already be set and its binary could be checked