mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
Connect the command line options to the algorithm of obipairing
This commit is contained in:
@ -3,7 +3,7 @@ package main
|
||||
import (
|
||||
"log"
|
||||
"os"
|
||||
"runtime/pprof"
|
||||
"runtime/trace"
|
||||
|
||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obioptions"
|
||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obitools/obiconvert"
|
||||
@ -13,25 +13,31 @@ import (
|
||||
func main() {
|
||||
|
||||
// go tool pprof -http=":8000" ./obipairing ./cpu.pprof
|
||||
f, err := os.Create("cpu.pprof")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
pprof.StartCPUProfile(f)
|
||||
defer pprof.StopCPUProfile()
|
||||
|
||||
// go tool trace cpu.trace
|
||||
// ftrace, err := os.Create("cpu.trace")
|
||||
// f, err := os.Create("cpu.pprof")
|
||||
// if err != nil {
|
||||
// log.Fatal(err)
|
||||
// }
|
||||
// trace.Start(ftrace)
|
||||
// defer trace.Stop()
|
||||
// pprof.StartCPUProfile(f)
|
||||
// defer pprof.StopCPUProfile()
|
||||
|
||||
// go tool trace cpu.trace
|
||||
ftrace, err := os.Create("cpu.trace")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
trace.Start(ftrace)
|
||||
defer trace.Stop()
|
||||
|
||||
optionParser := obioptions.GenerateOptionParser(obipairing.OptionSet)
|
||||
|
||||
optionParser(os.Args)
|
||||
pairs, _ := obipairing.IBatchPairedSequence()
|
||||
paired := obipairing.IAssemblePESequencesBatch(pairs, 2, 50, 20, true)
|
||||
paired := obipairing.IAssemblePESequencesBatch(pairs,
|
||||
obipairing.GapPenality(),
|
||||
obipairing.Delta(),
|
||||
obipairing.MinOverlap(),
|
||||
true,
|
||||
obioptions.ParallelWorkers(),
|
||||
)
|
||||
obiconvert.WriteBioSequencesBatch(paired, true)
|
||||
}
|
||||
|
Reference in New Issue
Block a user