normalize the usage of obitaxonomy

This commit is contained in:
Eric Coissac
2025-03-08 13:00:55 +01:00
parent b18c9b7ac6
commit 65bd29b955
4 changed files with 15 additions and 9 deletions

View File

@ -20,6 +20,19 @@ func main() {
var iterator *obitax.ITaxon
if obitaxonomy.CLIDownloadNCBI() {
err := obitaxonomy.CLIDownloadNCBITaxdump()
if err != nil {
log.Errorf("Cannot download NCBI taxonomy: %s", err.Error())
os.Exit(1)
}
os.Exit(0)
}
if !obidefault.HasSelectedTaxonomy() {
log.Fatal("you must indicate a taxonomy using the -t or --taxonomy option")
}
switch {
case obitaxonomy.CLIDownloadNCBI():
err := obitaxonomy.CLIDownloadNCBITaxdump()