mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-12-13 18:50:26 +00:00
Patch rev complement and first implementation of --auto in obicsv
Former-commit-id: f3020e81283b1073c4d1c2d2ff0887e3998e6764
This commit is contained in:
@@ -16,13 +16,10 @@ var __input_ecopcr_format__ = false
|
||||
var __input_embl_format__ = false
|
||||
var __input_genbank_format__ = false
|
||||
|
||||
var __input_solexa_quality__ = false
|
||||
|
||||
var __output_in_fasta__ = false
|
||||
var __output_in_fastq__ = false
|
||||
var __output_fastjson_format__ = false
|
||||
var __output_fastobi_format__ = false
|
||||
var __output_solexa_quality__ = false
|
||||
|
||||
var __no_progress_bar__ = false
|
||||
var __compressed__ = false
|
||||
@@ -54,9 +51,6 @@ func InputOptionSet(options *getoptions.GetOpt) {
|
||||
options.BoolVar(&__input_genbank_format__, "genbank", __input_genbank_format__,
|
||||
options.Description("Read data following the Genbank flatfile format."))
|
||||
|
||||
options.BoolVar(&__input_solexa_quality__, "solexa", __input_solexa_quality__,
|
||||
options.Description("Decodes quality string according to the Solexa specification."))
|
||||
|
||||
options.BoolVar(&__no_ordered_input__, "no-order", __no_ordered_input__,
|
||||
options.Description("When several input files are provided, "+
|
||||
"indicates that there is no order among them."))
|
||||
@@ -71,7 +65,7 @@ func OutputModeOptionSet(options *getoptions.GetOpt) {
|
||||
options.Alias("Z"),
|
||||
options.Description("Output is compressed"))
|
||||
|
||||
options.BoolVar(&__skip_empty__, "skip-empty", __skip_empty__,
|
||||
options.BoolVar(&__skip_empty__, "skip-empty", __skip_empty__,
|
||||
options.Description("Sequences of length equal to zero are suppressed from the output"))
|
||||
|
||||
options.StringVar(&__output_file_name__, "out", __output_file_name__,
|
||||
@@ -146,7 +140,7 @@ func CLICompressed() bool {
|
||||
}
|
||||
|
||||
func CLISkipEmpty() bool {
|
||||
return __skip_empty__
|
||||
return __skip_empty__
|
||||
}
|
||||
|
||||
func CLIInputFastHeaderFormat() string {
|
||||
@@ -181,22 +175,6 @@ func CLIAnalyzeOnly() int {
|
||||
return __read_only_entries__
|
||||
}
|
||||
|
||||
func CLIInputQualityShift() int {
|
||||
if __input_solexa_quality__ {
|
||||
return 64
|
||||
} else {
|
||||
return 33
|
||||
}
|
||||
}
|
||||
|
||||
func CLIOutputQualityShift() int {
|
||||
if __output_solexa_quality__ {
|
||||
return 64
|
||||
} else {
|
||||
return 33
|
||||
}
|
||||
}
|
||||
|
||||
func CLIProgressBar() bool {
|
||||
return !__no_progress_bar__
|
||||
}
|
||||
@@ -217,4 +195,4 @@ func SetFullFileBatch() {
|
||||
}
|
||||
func FullFileBatch() bool {
|
||||
return __full_file_batch__
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,10 +98,8 @@ func CLIReadBioSequences(filenames ...string) (obiiter.IBioSequence, error) {
|
||||
opts = append(opts, obiformats.OptionsParallelWorkers(nworkers))
|
||||
opts = append(opts, obiformats.OptionsBatchSize(obioptions.CLIBatchSize()))
|
||||
|
||||
opts = append(opts, obiformats.OptionsQualityShift(CLIInputQualityShift()))
|
||||
opts = append(opts, obiformats.OptionsFullFileBatch(FullFileBatch()))
|
||||
|
||||
|
||||
if len(filenames) == 0 {
|
||||
log.Printf("Reading sequences from stdin in %s\n", CLIInputFormat())
|
||||
opts = append(opts, obiformats.OptionsSource("stdin"))
|
||||
|
||||
@@ -59,8 +59,6 @@ func CLIWriteBioSequences(iterator obiiter.IBioSequence,
|
||||
opts = append(opts, obiformats.OptionsParallelWorkers(nworkers))
|
||||
opts = append(opts, obiformats.OptionsBatchSize(obioptions.CLIBatchSize()))
|
||||
|
||||
opts = append(opts, obiformats.OptionsQualityShift(CLIOutputQualityShift()))
|
||||
|
||||
opts = append(opts, obiformats.OptionsCompressed(CLICompressed()))
|
||||
|
||||
var err error
|
||||
|
||||
@@ -27,8 +27,6 @@ func CLIWriteCSV(iterator obiiter.IBioSequence,
|
||||
|
||||
opts = append(opts, obiformats.OptionsParallelWorkers(nworkers))
|
||||
opts = append(opts, obiformats.OptionsBatchSize(obioptions.CLIBatchSize()))
|
||||
|
||||
opts = append(opts, obiformats.OptionsQualityShift(obiconvert.CLIOutputQualityShift()))
|
||||
opts = append(opts, obiformats.OptionsCompressed(obiconvert.CLICompressed()))
|
||||
|
||||
opts = append(opts, obiformats.CSVId(CLIPrintId()),
|
||||
@@ -37,6 +35,7 @@ func CLIWriteCSV(iterator obiiter.IBioSequence,
|
||||
obiformats.CSVDefinition(CLIPrintDefinition()),
|
||||
obiformats.CSVKeys(CLIToBeKeptAttributes()),
|
||||
obiformats.CSVSequence(CLIPrintSequence()),
|
||||
obiformats.CSVAutoColumn(CLIAutoColumns()),
|
||||
)
|
||||
|
||||
var err error
|
||||
|
||||
@@ -32,7 +32,6 @@ func DistributeSequence(sequences obiiter.IBioSequence) {
|
||||
|
||||
opts = append(opts, obiformats.OptionsParallelWorkers(nworkers),
|
||||
obiformats.OptionsBatchSize(obioptions.CLIBatchSize()),
|
||||
obiformats.OptionsQualityShift(obiconvert.CLIOutputQualityShift()),
|
||||
obiformats.OptionsAppendFile(CLIAppendSequences()),
|
||||
obiformats.OptionsCompressed(obiconvert.CLICompressed()))
|
||||
|
||||
|
||||
@@ -93,8 +93,6 @@ func CLISaveRefetenceDB(db obiseq.BioSequenceSlice) {
|
||||
opts = append(opts, obiformats.OptionsParallelWorkers(nworkers))
|
||||
opts = append(opts, obiformats.OptionsBatchSize(obioptions.CLIBatchSize()))
|
||||
|
||||
opts = append(opts, obiformats.OptionsQualityShift(obiconvert.CLIOutputQualityShift()))
|
||||
|
||||
opts = append(opts, obiformats.OptionsCompressed(obiconvert.CLICompressed()))
|
||||
|
||||
var err error
|
||||
|
||||
Reference in New Issue
Block a user