Connect the command line options to the algorithm of obipairing

This commit is contained in:
2022-01-16 17:30:30 +01:00
parent 576a9f4d2d
commit 64676db3f4
7 changed files with 89 additions and 43 deletions

View File

@ -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)
}