mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 08:10:45 +00:00
Add _ to allowed in taxid
This commit is contained in:
@ -8,7 +8,7 @@ import (
|
||||
// corresponds to the last commit, and not the one when the file will be
|
||||
// commited
|
||||
|
||||
var _Commit = "6cb7a5a"
|
||||
var _Commit = "d31e677"
|
||||
var _Version = "Release 4.4.0"
|
||||
|
||||
// Version returns the version of the obitools package.
|
||||
|
@ -42,6 +42,8 @@ type Taxonomy struct {
|
||||
index map[*string]*TaxonSet
|
||||
}
|
||||
|
||||
var DefaultTaxidAlphabet = obiutils.AsciiAlphaNumSet.Union(obiutils.AsciiUnderScore)
|
||||
|
||||
// NewTaxonomy creates and initializes a new Taxonomy instance with the specified name and code.
|
||||
// It sets up the necessary internal structures, including ranks, nodes, aliases, and an index.
|
||||
//
|
||||
@ -365,7 +367,7 @@ func (taxonomy *Taxonomy) InsertPathString(path []string) (*Taxonomy, error) {
|
||||
code, taxid, scientific_name, rank, err := ParseTaxonString(path[0])
|
||||
|
||||
if taxonomy == nil {
|
||||
taxonomy = NewTaxonomy(code, code, obiutils.AsciiAlphaNumSet)
|
||||
taxonomy = NewTaxonomy(code, code, DefaultTaxidAlphabet)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
|
@ -8,6 +8,7 @@ import (
|
||||
type AsciiSet [256]bool
|
||||
|
||||
var AsciiSpaceSet = AsciiSetFromString("\t\n\v\f\r ")
|
||||
var AsciiUnderScore = AsciiSetFromString("_")
|
||||
var AsciiDigitSet = AsciiSetFromString("0123456789")
|
||||
var AsciiUpperSet = AsciiSetFromString("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
|
||||
var AsciiLowerSet = AsciiSetFromString("abcdefghijklmnopqrstuvwxyz")
|
||||
|
Reference in New Issue
Block a user