add the --out option to the obitaxonomy

This commit is contained in:
Eric Coissac
2025-01-29 13:22:35 +01:00
parent 8a28c9ae7c
commit 337954592d
4 changed files with 14 additions and 10 deletions

View File

@ -8,7 +8,7 @@ import (
// corresponds to the last commit, and not the one when the file will be
// commited
var _Commit = "b6b18c0"
var _Commit = "8a28c9a"
var _Version = "Release 4.2.0"
// Version returns the version of the obitools package.

View File

@ -71,16 +71,15 @@ func InputOptionSet(options *getoptions.GetOpt) {
}
func OutputModeOptionSet(options *getoptions.GetOpt) {
func OutputModeOptionSet(options *getoptions.GetOpt, compressed bool) {
options.BoolVar(&__no_progress_bar__, "no-progressbar", false,
options.Description("Disable the progress bar printing"))
options.BoolVar(&__compressed__, "compress", false,
options.Alias("Z"),
options.Description("Output is compressed"))
options.BoolVar(&__skip_empty__, "skip-empty", __skip_empty__,
options.Description("Sequences of length equal to zero are suppressed from the output"))
if compressed {
options.BoolVar(&__compressed__, "compress", false,
options.Alias("Z"),
options.Description("Output is compressed"))
}
options.StringVar(&__output_file_name__, "out", __output_file_name__,
options.Alias("o"),
@ -90,6 +89,9 @@ func OutputModeOptionSet(options *getoptions.GetOpt) {
}
func OutputOptionSet(options *getoptions.GetOpt) {
options.BoolVar(&__skip_empty__, "skip-empty", __skip_empty__,
options.Description("Sequences of length equal to zero are suppressed from the output"))
options.BoolVar(&__output_in_fasta__, "fasta-output", false,
options.Description("Write sequence in fasta format (default if no quality data available)."))
@ -105,7 +107,7 @@ func OutputOptionSet(options *getoptions.GetOpt) {
options.Alias("O"),
options.Description("output FASTA/FASTQ title line annotations follow OBI format."))
OutputModeOptionSet(options)
OutputModeOptionSet(options, true)
}
func PairedFilesOptionSet(options *getoptions.GetOpt) {

View File

@ -66,7 +66,7 @@ func CSVOptionSet(options *getoptions.GetOpt) {
func OptionSet(options *getoptions.GetOpt) {
obiconvert.InputOptionSet(options)
obiconvert.OutputModeOptionSet(options)
obiconvert.OutputModeOptionSet(options, true)
obioptions.LoadTaxonomyOptionSet(options, false, false)
CSVOptionSet(options)
}

View File

@ -5,6 +5,7 @@ import (
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obioptions"
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obitax"
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obitools/obiconvert"
"github.com/DavidGamba/go-getoptions"
)
@ -36,6 +37,7 @@ func FilterTaxonomyOptionSet(options *getoptions.GetOpt) {
func OptionSet(options *getoptions.GetOpt) {
obioptions.LoadTaxonomyOptionSet(options, false, true)
obiconvert.OutputModeOptionSet(options, false)
FilterTaxonomyOptionSet(options)
options.BoolVar(&__fixed_pattern__, "fixed", false,
options.Alias("F"),