mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
correction in obitag to save partially indexed reference db
Former-commit-id: ba1e5ce42ac77b143d20fd8903a6e157d83c09f5
This commit is contained in:
@ -3,10 +3,12 @@ package main
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obiiter"
|
||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obitools/obiconvert"
|
||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obitools/obifind"
|
||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obitools/obitag"
|
||||
|
||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obioptions"
|
||||
@ -30,6 +32,9 @@ func main() {
|
||||
// trace.Start(ftrace)
|
||||
// defer trace.Stop()
|
||||
|
||||
obioptions.SetWorkerPerCore(2)
|
||||
obioptions.SetReadWorkerPerCore(0.5)
|
||||
|
||||
optionParser := obioptions.GenerateOptionParser(obitag.OptionSet)
|
||||
|
||||
_, args := optionParser(os.Args)
|
||||
@ -37,14 +42,24 @@ func main() {
|
||||
fs, err := obiconvert.CLIReadBioSequences(args...)
|
||||
|
||||
if err != nil {
|
||||
log.Errorf("Cannot open file (%v)",err)
|
||||
log.Errorf("Cannot open file (%v)", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
identified := obitag.AssignTaxonomy(fs)
|
||||
taxo, error := obifind.CLILoadSelectedTaxonomy()
|
||||
if error != nil {
|
||||
log.Panicln(error)
|
||||
}
|
||||
|
||||
references := obitag.CLIRefDB()
|
||||
|
||||
|
||||
identified := obitag.CLIAssignTaxonomy(fs,references,taxo)
|
||||
|
||||
obiconvert.CLIWriteBioSequences(identified, true)
|
||||
obiiter.WaitForLastPipe()
|
||||
|
||||
obitag.CLISaveRefetenceDB(references)
|
||||
|
||||
fmt.Println("")
|
||||
}
|
||||
|
Reference in New Issue
Block a user