mirror of
https://github.com/metabarcoding/obitools4.git
synced 2026-11-10 01:24:41 +00:00
add the --raw-taxid option
This commit is contained in:
1 parent
78df7db18d
commit
b18c9b7ac6
5 files changed
+25
-1
No files matched your search
@@ -5,6 +5,7 @@ import (
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obidefault"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
@@ -37,6 +38,10 @@ type TaxNode struct {
|
||||
// Returns:
|
||||
// - A formatted string representing the TaxNode in the form "taxonomyCode:id [scientificName]@rank".
|
||||
func (node *TaxNode) String(taxonomyCode string) string {
|
||||
if obidefault.UseRawTaxids() {
|
||||
return *node.id
|
||||
}
|
||||
|
||||
if node.HasScientificName() {
|
||||
return fmt.Sprintf("%s:%v [%s]@%s",
|
||||
taxonomyCode,
|
||||
|
||||
Reference in new issue
Block a user