mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-12-08 16:50:27 +00:00
Add capacity to obidistribute to save gzipped files
This commit is contained in:
@@ -71,6 +71,7 @@ func OutputOptionSet(options *getoptions.GetOpt) {
|
||||
|
||||
options.BoolVar(&__no_progress_bar__, "no-progressbar", false,
|
||||
options.Description("Disable the progress bar printing"))
|
||||
|
||||
}
|
||||
|
||||
func OptionSet(options *getoptions.GetOpt) {
|
||||
|
||||
@@ -40,6 +40,9 @@ func DistributeSequence(sequences obiiter.IBioSequence) {
|
||||
opts = append(opts, obiformats.OptionsAppendFile())
|
||||
}
|
||||
|
||||
if CLICompressed() {
|
||||
opts = append(opts, obiformats.OptionsCompressed())
|
||||
}
|
||||
var formater obiformats.SequenceBatchWriterToFile
|
||||
|
||||
switch obiconvert.CLIOutputFormat() {
|
||||
|
||||
@@ -17,6 +17,8 @@ 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,
|
||||
@@ -43,6 +45,10 @@ func DistributeOptionSet(options *getoptions.GetOpt) {
|
||||
options.Alias("A"),
|
||||
options.Description("Indicates to append sequence to files if they already exist."))
|
||||
|
||||
options.BoolVar(&_compressed, "--compress", false,
|
||||
options.Alias("Z"),
|
||||
options.Description("Output is compressed"))
|
||||
|
||||
options.IntVar(&_HashSize, "hash", 0,
|
||||
options.Alias("H"),
|
||||
options.Description("Indicates to split the input into at most <n> batch based on a hash code of the seequence."))
|
||||
@@ -58,6 +64,10 @@ func CLIAppendSequences() bool {
|
||||
return _append
|
||||
}
|
||||
|
||||
func CLICompressed() bool {
|
||||
return _compressed
|
||||
}
|
||||
|
||||
func CLISequenceClassifier() *obiseq.BioSequenceClassifier {
|
||||
switch {
|
||||
case _SequenceClassifierTag != "":
|
||||
|
||||
Reference in New Issue
Block a user