mirror of
https://github.com/metabarcoding/obitools4.git
synced 2026-03-25 21:40:52 +00:00
This commit refactors the k-mer index management tools to use a unified subcommand structure with obik, adds support for per-set metadata and ID management, enhances the k-mer set group builder to support appending to existing groups, and improves command-line option handling with a new global options registration system. Key changes: - Introduce obik command with subcommands (index, ls, summary, cp, mv, rm, super, lowmask) - Add support for per-set metadata and ID management in kmer set groups - Implement ability to append to existing kmer index groups - Refactor option parsing to use a global options registration system - Add new commands for listing, copying, moving, and removing sets - Enhance low-complexity masking with new options and output formats - Improve kmer index summary with Jaccard distance matrix support - Remove deprecated obikindex and obisuperkmer commands - Update build process to use the new subcommand structure
35 lines
711 B
Go
35 lines
711 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
"errors"
|
|
"os"
|
|
|
|
log "github.com/sirupsen/logrus"
|
|
|
|
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obioptions"
|
|
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiseq"
|
|
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obitools/obik"
|
|
"github.com/DavidGamba/go-getoptions"
|
|
)
|
|
|
|
func main() {
|
|
defer obiseq.LogBioSeqStatus()
|
|
|
|
opt, parser := obioptions.GenerateSubcommandParser(
|
|
"obik",
|
|
"Manage disk-based kmer indices",
|
|
obik.OptionSet,
|
|
)
|
|
|
|
_, remaining := parser(os.Args)
|
|
|
|
err := opt.Dispatch(context.Background(), remaining)
|
|
if err != nil {
|
|
if errors.Is(err, getoptions.ErrorHelpCalled) {
|
|
os.Exit(0)
|
|
}
|
|
log.Fatalf("Error: %v", err)
|
|
}
|
|
}
|