mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
Add managment of the taxonomy alias politic
This commit is contained in:
@ -3,6 +3,7 @@ package main
|
||||
import (
|
||||
"os"
|
||||
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obidefault"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obioptions"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obitax"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obitools/obiconvert"
|
||||
@ -52,13 +53,19 @@ func main() {
|
||||
|
||||
case obitaxonomy.CLIRequestsPathForTaxid() != "NA":
|
||||
|
||||
taxon, err := obitax.DefaultTaxonomy().Taxon(obitaxonomy.CLIRequestsPathForTaxid())
|
||||
taxon, isAlias, err := obitax.DefaultTaxonomy().Taxon(obitaxonomy.CLIRequestsPathForTaxid())
|
||||
|
||||
if err != nil {
|
||||
log.Fatalf("Cannot identify the requested taxon: %s (%v)",
|
||||
obitaxonomy.CLIRequestsPathForTaxid(), err)
|
||||
}
|
||||
|
||||
if isAlias {
|
||||
if obidefault.FailOnTaxonomy() {
|
||||
log.Fatalf("Taxon %s is an alias for %s", taxon.String(), taxon.Parent().String())
|
||||
}
|
||||
}
|
||||
|
||||
s := taxon.Path()
|
||||
|
||||
if s == nil {
|
||||
|
Reference in New Issue
Block a user