mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
51 lines
1.1 KiB
Go
51 lines
1.1 KiB
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obioptions"
|
|
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiseq"
|
|
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obitools/obiconvert"
|
|
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obitools/obimatrix"
|
|
)
|
|
|
|
func main() {
|
|
|
|
defer obiseq.LogBioSeqStatus()
|
|
|
|
// 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")
|
|
// if err != nil {
|
|
// log.Fatal(err)
|
|
// }
|
|
// trace.Start(ftrace)
|
|
// defer trace.Stop()
|
|
|
|
optionParser := obioptions.GenerateOptionParser(
|
|
obimatrix.OptionSet,
|
|
)
|
|
|
|
_, args := optionParser(os.Args)
|
|
|
|
fs, err := obiconvert.CLIReadBioSequences(args...)
|
|
obiconvert.OpenSequenceDataErrorMessage(args, err)
|
|
|
|
matrix := obimatrix.IMatrix(fs)
|
|
|
|
if obimatrix.CLIOutFormat() == "matrix" {
|
|
obimatrix.CLIWriteCSVToStdout(matrix)
|
|
} else {
|
|
obimatrix.CLIWriteThreeColumnsToStdout(matrix)
|
|
}
|
|
fmt.Printf("\n")
|
|
}
|