mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
Add a first version of obitag the successor of ecotag
This commit is contained in:
22
cmd/obitools/obirefidx/main.go
Normal file
22
cmd/obitools/obirefidx/main.go
Normal file
@ -0,0 +1,22 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obitools/obiconvert"
|
||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obitools/obirefidx"
|
||||
|
||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obioptions"
|
||||
)
|
||||
|
||||
func main() {
|
||||
optionParser := obioptions.GenerateOptionParser(obirefidx.OptionSet)
|
||||
|
||||
_, args, _ := optionParser(os.Args)
|
||||
|
||||
fs, _ := obiconvert.ReadBioSequencesBatch(args...)
|
||||
indexed := obirefidx.IndexReferenceDB(fs)
|
||||
|
||||
written, _ := obiconvert.WriteBioSequencesBatch(indexed, false)
|
||||
written.Consume()
|
||||
}
|
21
cmd/obitools/obitag/main.go
Normal file
21
cmd/obitools/obitag/main.go
Normal file
@ -0,0 +1,21 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obitools/obiconvert"
|
||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obitools/obitag"
|
||||
|
||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obioptions"
|
||||
)
|
||||
|
||||
func main() {
|
||||
optionParser := obioptions.GenerateOptionParser(obitag.OptionSet)
|
||||
|
||||
_, args, _ := optionParser(os.Args)
|
||||
|
||||
fs, _ := obiconvert.ReadBioSequencesBatch(args...)
|
||||
identified := obitag.AssignTaxonomy(fs)
|
||||
|
||||
obiconvert.WriteBioSequencesBatch(identified, true)
|
||||
}
|
Reference in New Issue
Block a user