mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
normalize the usage of obitaxonomy
This commit is contained in:
@ -20,6 +20,19 @@ func main() {
|
||||
|
||||
var iterator *obitax.ITaxon
|
||||
|
||||
if obitaxonomy.CLIDownloadNCBI() {
|
||||
err := obitaxonomy.CLIDownloadNCBITaxdump()
|
||||
if err != nil {
|
||||
log.Errorf("Cannot download NCBI taxonomy: %s", err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
if !obidefault.HasSelectedTaxonomy() {
|
||||
log.Fatal("you must indicate a taxonomy using the -t or --taxonomy option")
|
||||
}
|
||||
|
||||
switch {
|
||||
case obitaxonomy.CLIDownloadNCBI():
|
||||
err := obitaxonomy.CLIDownloadNCBITaxdump()
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
// corresponds to the last commit, and not the one when the file will be
|
||||
// commited
|
||||
|
||||
var _Commit = "78df7db"
|
||||
var _Commit = "b18c9b7"
|
||||
var _Version = "Release 4.4.0"
|
||||
|
||||
// Version returns the version of the obitools package.
|
||||
|
@ -68,7 +68,7 @@ func CLICSVTaxaIterator(iterator *obitax.ITaxon) *obiitercsv.ICSVRecord {
|
||||
obitax.OptionsWithRank(CLIWithRank()),
|
||||
obitax.OptionsWithScientificName(CLIWithScientificName()),
|
||||
obitax.OptionsWithPath(CLIWithPath()),
|
||||
obitax.OptionsRawTaxid(CLIRawTaxid()),
|
||||
obitax.OptionsRawTaxid(obidefault.UseRawTaxids()),
|
||||
obitax.OptionsSource(obidefault.SelectedTaxonomy()),
|
||||
)
|
||||
|
||||
|
@ -18,7 +18,6 @@ var __with_query__ = false
|
||||
var __without_rank__ = false
|
||||
var __without_parent__ = false
|
||||
var __without_scientific_name__ = false
|
||||
var __raw_taxid__ = false
|
||||
var __taxid_path__ = "NA"
|
||||
var __taxid_sons__ = "NA"
|
||||
var __restrict_rank__ = ""
|
||||
@ -67,8 +66,6 @@ func OptionSet(options *getoptions.GetOpt) {
|
||||
options.BoolVar(&__without_scientific_name__, "without-scientific-name", __without_scientific_name__,
|
||||
options.Alias("S"),
|
||||
options.Description("Supress the column containing the scientific name from the output."))
|
||||
options.BoolVar(&__raw_taxid__, "raw-taxid", false,
|
||||
options.Description("Displays the raw taxid for each displayed taxon."))
|
||||
options.StringVar(&__to_dump__, "dump", __to_dump__,
|
||||
options.Alias("D"),
|
||||
options.ArgName("TAXID"),
|
||||
@ -132,10 +129,6 @@ func CLIWithScientificName() bool {
|
||||
return !__without_scientific_name__
|
||||
}
|
||||
|
||||
func CLIRawTaxid() bool {
|
||||
return __raw_taxid__
|
||||
}
|
||||
|
||||
func CLIRankRestriction() string {
|
||||
return __restrict_rank__
|
||||
}
|
||||
|
Reference in New Issue
Block a user