mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
Correct the logic of --update-taxid and --fail-on-taxonomy
This commit is contained in:
@ -8,7 +8,7 @@ import (
|
|||||||
// corresponds to the last commit, and not the one when the file will be
|
// corresponds to the last commit, and not the one when the file will be
|
||||||
// commited
|
// commited
|
||||||
|
|
||||||
var _Commit = "50d11ce"
|
var _Commit = "3b5d4ba"
|
||||||
var _Version = "Release 4.4.0"
|
var _Version = "Release 4.4.0"
|
||||||
|
|
||||||
// Version returns the version of the obitools package.
|
// Version returns the version of the obitools package.
|
||||||
|
@ -50,18 +50,17 @@ func (s *BioSequence) SetTaxid(taxid string, rank ...string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if isAlias {
|
if isAlias {
|
||||||
if obidefault.FailOnTaxonomy() {
|
if obidefault.UpdateTaxid() {
|
||||||
log.Fatalf("%s: Taxid: %v is an alias from taxonomy (%v) to %s",
|
log.Warnf("%s: Taxid: %v is updated to %s",
|
||||||
s.Id(), taxid, taxonomy.Name(), taxon.String())
|
s.Id(), taxid, taxon.String())
|
||||||
|
taxid = taxon.String()
|
||||||
} else {
|
} else {
|
||||||
if obidefault.UpdateTaxid() {
|
if obidefault.FailOnTaxonomy() {
|
||||||
log.Warnf("%s: Taxid: %v is updated to %s",
|
log.Fatalf("%s: Taxid: %v is an alias from taxonomy (%v) to %s",
|
||||||
s.Id(), taxid, taxon.String())
|
s.Id(), taxid, taxonomy.Name(), taxon.String())
|
||||||
taxid = taxon.String()
|
|
||||||
} else {
|
|
||||||
log.Warnf("%s: Taxid %v has to be updated to %s",
|
|
||||||
s.Id(), taxid, taxon.String())
|
|
||||||
}
|
}
|
||||||
|
log.Warnf("%s: Taxid %v has to be updated to %s",
|
||||||
|
s.Id(), taxid, taxon.String())
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user