mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
Rename obifind obitaxonomy and introduce the new CSV format for taxonomy.
This commit is contained in:
@ -2,6 +2,7 @@ package obitax
|
||||
|
||||
import (
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiutils"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// ITaxon represents an iterator for traversing Taxon instances.
|
||||
@ -189,12 +190,12 @@ func (taxon *Taxon) ISubTaxonomy() *ITaxon {
|
||||
go func() {
|
||||
for i := lpath - 1; i >= 0; i-- {
|
||||
taxon := path.Taxon(i)
|
||||
parents[taxon.Node] = true
|
||||
iter.Push(taxon)
|
||||
}
|
||||
|
||||
pushed := true
|
||||
|
||||
log.Warn(parents)
|
||||
for pushed {
|
||||
itaxo := taxo.Iterator()
|
||||
pushed = false
|
||||
@ -215,3 +216,13 @@ func (taxon *Taxon) ISubTaxonomy() *ITaxon {
|
||||
|
||||
return iter
|
||||
}
|
||||
|
||||
func (taxonomy *Taxonomy) ISubTaxonomy(taxid string) *ITaxon {
|
||||
taxon := taxonomy.Taxon(taxid)
|
||||
|
||||
if taxon == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
return taxon.ISubTaxonomy()
|
||||
}
|
||||
|
Reference in New Issue
Block a user