mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-12-08 16:50:27 +00:00
adds a directory option to obidistribute
This commit is contained in:
@@ -13,13 +13,13 @@ import (
|
||||
|
||||
var _FilenamePattern = ""
|
||||
var _SequenceClassifierTag = ""
|
||||
var _DirectoryTag = ""
|
||||
var _BatchCount = 0
|
||||
var _HashSize = 0
|
||||
var _NAValue = "NA"
|
||||
var _append = false
|
||||
var _compressed = false
|
||||
|
||||
|
||||
func DistributeOptionSet(options *getoptions.GetOpt) {
|
||||
options.StringVar(&_FilenamePattern, "pattern", _FilenamePattern,
|
||||
options.Alias("p"),
|
||||
@@ -30,10 +30,17 @@ func DistributeOptionSet(options *getoptions.GetOpt) {
|
||||
|
||||
options.StringVar(&_SequenceClassifierTag, "classifier", _SequenceClassifierTag,
|
||||
options.Alias("c"),
|
||||
options.Description("The name of a tag annotating thes sequences. "+
|
||||
options.Description("The name of a tag annotating the sequences. "+
|
||||
"The name must corresponds to a string, a integer or a boolean value. "+
|
||||
"That value will be used to dispatch sequences amoong the different files"))
|
||||
|
||||
options.StringVar(&_DirectoryTag, "directory", _DirectoryTag,
|
||||
options.Alias("d"),
|
||||
options.Description("The name of a tag annotating the sequences. "+
|
||||
"The name must corresponds to a string, a integer or a boolean value. "+
|
||||
"That value will be used to dispatch sequences amoong the different directory " +
|
||||
"in conjunction with the -c|--classifier options"))
|
||||
|
||||
options.StringVar(&_NAValue, "na-value", _NAValue,
|
||||
options.Description("Value used when the classifier tag is not defined for a sequence."))
|
||||
|
||||
@@ -71,7 +78,7 @@ func CLICompressed() bool {
|
||||
func CLISequenceClassifier() *obiseq.BioSequenceClassifier {
|
||||
switch {
|
||||
case _SequenceClassifierTag != "":
|
||||
return obiseq.AnnotationClassifier(_SequenceClassifierTag, _NAValue)
|
||||
return obiseq.DualAnnotationClassifier(_SequenceClassifierTag,_DirectoryTag, _NAValue)
|
||||
case _BatchCount > 0:
|
||||
return obiseq.RotateClassifier(_BatchCount)
|
||||
case _HashSize > 0:
|
||||
|
||||
Reference in New Issue
Block a user