Debug on taxonomy extraction and CSV conversion

This commit is contained in:
Eric Coissac
2025-07-07 15:29:40 +02:00
parent 8d53d253d4
commit 43b285587e
6 changed files with 39 additions and 17 deletions

View File

@@ -44,6 +44,7 @@ type __options__ struct {
with_scientific_name bool
without_root_path bool
raw_taxid bool
u_to_t bool
with_metadata []string
}
@@ -88,6 +89,7 @@ func MakeOptions(setters []WithOption) Options {
with_path: false,
with_rank: true,
with_taxid: true,
u_to_t: false,
with_scientific_name: false,
without_root_path: false,
raw_taxid: false,
@@ -263,6 +265,10 @@ func (o *Options) RawTaxid() bool {
return o.pointer.raw_taxid
}
func (o *Options) UtoT() bool {
return o.pointer.u_to_t
}
// WithMetadata returns a slice of strings containing the metadata
// associated with the Options instance. It retrieves the metadata
// from the pointer's with_metadata field.
@@ -598,6 +604,14 @@ func OptionsRawTaxid(value bool) WithOption {
return f
}
func OptionsUtoT(value bool) WithOption {
f := WithOption(func(opt Options) {
opt.pointer.u_to_t = value
})
return f
}
func OptionsWithMetadata(values ...string) WithOption {
f := WithOption(func(opt Options) {
opt.pointer.with_metadata = values