mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-12-08 16:50:27 +00:00
First commit
This commit is contained in:
16
pkg/obitax/ranklist.go
Normal file
16
pkg/obitax/ranklist.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package obitax
|
||||
|
||||
func (taxonomy *Taxonomy) RankList() []string {
|
||||
ranks := make([]string, 0, 30)
|
||||
mranks := make(map[string]bool)
|
||||
|
||||
for _, t := range *taxonomy.nodes {
|
||||
mranks[t.rank] = true
|
||||
}
|
||||
|
||||
for r := range mranks {
|
||||
ranks = append(ranks, r)
|
||||
}
|
||||
|
||||
return ranks
|
||||
}
|
||||
Reference in New Issue
Block a user