mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
Changes to be committed:
modified: cmd/obitools/obitag/main.go modified: cmd/obitools/obitaxonomy/main.go modified: pkg/obiformats/csvtaxdump_read.go modified: pkg/obiformats/ecopcr_read.go modified: pkg/obiformats/ncbitaxdump_read.go modified: pkg/obiformats/ncbitaxdump_readtar.go modified: pkg/obiformats/newick_write.go modified: pkg/obiformats/options.go modified: pkg/obiformats/taxonomy_read.go modified: pkg/obiformats/universal_read.go modified: pkg/obiiter/extract_taxonomy.go modified: pkg/obioptions/options.go modified: pkg/obioptions/version.go new file: pkg/obiphylo/tree.go modified: pkg/obiseq/biosequenceslice.go modified: pkg/obiseq/taxonomy_methods.go modified: pkg/obitax/taxonomy.go modified: pkg/obitax/taxonset.go modified: pkg/obitools/obiconvert/sequence_reader.go modified: pkg/obitools/obitag/obitag.go modified: pkg/obitools/obitaxonomy/obitaxonomy.go modified: pkg/obitools/obitaxonomy/options.go deleted: sample/.DS_Store
This commit is contained in:
@ -42,6 +42,7 @@ type __options__ struct {
|
||||
with_rank bool
|
||||
with_taxid bool
|
||||
with_scientific_name bool
|
||||
without_root_path bool
|
||||
raw_taxid bool
|
||||
with_metadata []string
|
||||
}
|
||||
@ -88,6 +89,7 @@ func MakeOptions(setters []WithOption) Options {
|
||||
with_rank: true,
|
||||
with_taxid: true,
|
||||
with_scientific_name: false,
|
||||
without_root_path: false,
|
||||
raw_taxid: false,
|
||||
}
|
||||
|
||||
@ -250,6 +252,11 @@ func (o *Options) WithScientificName() bool {
|
||||
return o.pointer.with_scientific_name
|
||||
}
|
||||
|
||||
// WithoutRootPath returns whether the root path option is enabled.
|
||||
func (o *Options) WithoutRootPath() bool {
|
||||
return o.pointer.without_root_path
|
||||
}
|
||||
|
||||
// RawTaxid returns whether the raw taxid option is enabled.
|
||||
// It retrieves the setting from the underlying options.
|
||||
func (o *Options) RawTaxid() bool {
|
||||
@ -576,6 +583,13 @@ func OptionsWithScientificName(value bool) WithOption {
|
||||
return f
|
||||
}
|
||||
|
||||
func OptionWithoutRootPath(value bool) WithOption {
|
||||
f := WithOption(func(opt Options) {
|
||||
opt.pointer.without_root_path = value
|
||||
})
|
||||
return f
|
||||
}
|
||||
|
||||
func OptionsRawTaxid(value bool) WithOption {
|
||||
f := WithOption(func(opt Options) {
|
||||
opt.pointer.raw_taxid = value
|
||||
|
Reference in New Issue
Block a user