mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-12-13 02:30:26 +00:00
Refactoring of the default values
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/goombaio/orderedset"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obidefault"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiformats"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiiter"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obioptions"
|
||||
@@ -99,7 +100,7 @@ func CLIReadBioSequences(filenames ...string) (obiiter.IBioSequence, error) {
|
||||
opts = append(opts, obiformats.OptionsFastSeqHeaderParser(obiformats.ParseGuessedFastSeqHeader))
|
||||
}
|
||||
|
||||
opts = append(opts, obiformats.OptionsReadQualities(obioptions.CLIReadQualities()))
|
||||
opts = append(opts, obiformats.OptionsReadQualities(obidefault.ReadQualities()))
|
||||
|
||||
nworkers := obioptions.CLIReadParallelWorkers()
|
||||
if nworkers < 2 {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiiter"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiutils"
|
||||
"github.com/tevino/abool/v2"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
@@ -57,7 +57,7 @@ func NewICSVRecord() *ICSVRecord {
|
||||
lock := sync.RWMutex{}
|
||||
i.lock = &lock
|
||||
|
||||
obiiter.RegisterAPipe()
|
||||
obiutils.RegisterAPipe()
|
||||
|
||||
return &i
|
||||
}
|
||||
@@ -275,7 +275,7 @@ func (iterator *ICSVRecord) Push(batch CSVRecordBatch) {
|
||||
|
||||
func (iterator *ICSVRecord) Close() {
|
||||
close(iterator.channel)
|
||||
obiiter.UnregisterPipe()
|
||||
obiutils.UnregisterPipe()
|
||||
}
|
||||
|
||||
func (iterator *ICSVRecord) WaitAndClose() {
|
||||
|
||||
@@ -4,8 +4,8 @@ import (
|
||||
"log"
|
||||
"slices"
|
||||
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obidefault"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiiter"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obioptions"
|
||||
)
|
||||
|
||||
func CSVSequenceHeader(opt Options) CSVHeader {
|
||||
@@ -95,7 +95,7 @@ func CSVBatchFromSequences(batch obiiter.BioSequenceBatch, opt Options) CSVRecor
|
||||
l := sequence.Len()
|
||||
q := sequence.Qualities()
|
||||
ascii := make([]byte, l)
|
||||
quality_shift := obioptions.OutputQualityShift()
|
||||
quality_shift := obidefault.WriteQualitiesShift()
|
||||
for j := 0; j < l; j++ {
|
||||
ascii[j] = uint8(q[j]) + uint8(quality_shift)
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ func IMatrix(iterator obiiter.IBioSequence) *MatrixData {
|
||||
}
|
||||
|
||||
waiter.Wait()
|
||||
obiiter.WaitForLastPipe()
|
||||
obiutils.WaitForLastPipe()
|
||||
|
||||
rep := summaries[0]
|
||||
|
||||
|
||||
@@ -187,7 +187,7 @@ func ISummary(iterator obiiter.IBioSequence, summarise []string) map[string]inte
|
||||
}
|
||||
|
||||
waiter.Wait()
|
||||
obiiter.WaitForLastPipe()
|
||||
obiutils.WaitForLastPipe()
|
||||
|
||||
rep := summaries[0]
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obioptions"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiseq"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obitools/obiconvert"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiutils"
|
||||
"github.com/DavidGamba/go-getoptions"
|
||||
)
|
||||
|
||||
@@ -112,7 +113,7 @@ func CLISaveRefetenceDB(db obiseq.BioSequenceSlice) {
|
||||
}
|
||||
|
||||
newIter.Recycle()
|
||||
obiiter.WaitForLastPipe()
|
||||
obiutils.WaitForLastPipe()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user