mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-12-08 08:40:26 +00:00
Refactoring of the default values
This commit is contained in:
@@ -7,8 +7,8 @@ import (
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obidefault"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiiter"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obioptions"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiseq"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiutils"
|
||||
"github.com/goccy/go-json"
|
||||
@@ -143,7 +143,7 @@ func ReadCSV(reader io.Reader, options ...WithOption) (obiiter.IBioSequence, err
|
||||
go _ParseCsvFile(opt.Source(),
|
||||
reader,
|
||||
out,
|
||||
byte(obioptions.InputQualityShift()),
|
||||
obidefault.ReadQualitiesShift(),
|
||||
opt.BatchSize())
|
||||
|
||||
go func() {
|
||||
|
||||
@@ -3,7 +3,7 @@ package obiformats
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obioptions"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obidefault"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiseq"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiutils"
|
||||
)
|
||||
@@ -54,7 +54,7 @@ func CSVSequenceRecord(sequence *obiseq.BioSequence, opt Options) []string {
|
||||
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)
|
||||
}
|
||||
|
||||
@@ -7,8 +7,8 @@ import (
|
||||
"os"
|
||||
"path"
|
||||
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obidefault"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiiter"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obioptions"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiseq"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiutils"
|
||||
log "github.com/sirupsen/logrus"
|
||||
@@ -341,7 +341,7 @@ func ReadFastq(reader io.Reader, options ...WithOption) (obiiter.IBioSequence, e
|
||||
go _ParseFastqFile(
|
||||
chkchan,
|
||||
out,
|
||||
byte(obioptions.InputQualityShift()),
|
||||
obidefault.ReadQualitiesShift(),
|
||||
opt.ReadQualities(),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -14,8 +14,8 @@ import (
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obidefault"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiiter"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obioptions"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiseq"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiutils"
|
||||
)
|
||||
@@ -92,7 +92,7 @@ func ReadFastSeqFromFile(filename string, options ...WithOption) (obiiter.IBioSe
|
||||
name := C.CString(filename)
|
||||
defer C.free(unsafe.Pointer(name))
|
||||
|
||||
pointer := C.open_fast_sek_file(name, C.int32_t(obioptions.InputQualityShift()))
|
||||
pointer := C.open_fast_sek_file(name, C.int32_t(obidefault.ReadQualitiesShift()))
|
||||
|
||||
var err error
|
||||
err = nil
|
||||
@@ -151,7 +151,7 @@ func ReadFastSeqFromStdin(options ...WithOption) obiiter.IBioSequence {
|
||||
}(newIter)
|
||||
|
||||
go _FastseqReader(opt.Source(),
|
||||
C.open_fast_sek_stdin(C.int32_t(obioptions.InputQualityShift())),
|
||||
C.open_fast_sek_stdin(C.int32_t(obidefault.ReadQualitiesShift())),
|
||||
newIter, opt.BatchSize())
|
||||
|
||||
log.Debugln("Full file batch mode : ", opt.FullFileBatch())
|
||||
|
||||
@@ -3,7 +3,7 @@ package obiformats
|
||||
import (
|
||||
"io"
|
||||
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiiter"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiutils"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
@@ -12,7 +12,7 @@ func WriteFileChunk(
|
||||
writer io.WriteCloser,
|
||||
toBeClosed bool) ChannelFileChunk {
|
||||
|
||||
obiiter.RegisterAPipe()
|
||||
obiutils.RegisterAPipe()
|
||||
chunk_channel := make(ChannelFileChunk)
|
||||
|
||||
go func() {
|
||||
@@ -53,7 +53,7 @@ func WriteFileChunk(
|
||||
}
|
||||
}
|
||||
|
||||
obiiter.UnregisterPipe()
|
||||
obiutils.UnregisterPipe()
|
||||
log.Debugf("The writer has been closed")
|
||||
}()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user