mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-12-08 16:50:27 +00:00
move the worker class to the obiseq package
This commit is contained in:
@@ -18,7 +18,7 @@ func ParseGuessedFastSeqHeader(sequence *obiseq.BioSequence) {
|
||||
func IParseFastSeqHeaderBatch(iterator obiiter.IBioSequence,
|
||||
options ...WithOption) obiiter.IBioSequence {
|
||||
opt := MakeOptions(options)
|
||||
return iterator.MakeIWorker(obiiter.AnnotatorToSeqWorker(opt.ParseFastSeqHeader()),
|
||||
return iterator.MakeIWorker(obiseq.AnnotatorToSeqWorker(opt.ParseFastSeqHeader()),
|
||||
opt.ParallelWorkers(),
|
||||
opt.BufferSize())
|
||||
}
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
package obiformats
|
||||
|
||||
import (
|
||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obiiter"
|
||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obiseq"
|
||||
)
|
||||
|
||||
type __options__ struct {
|
||||
fastseq_header_parser obiiter.SeqAnnotator
|
||||
fastseq_header_parser obiseq.SeqAnnotator
|
||||
fastseq_header_writer func(*obiseq.BioSequence) string
|
||||
with_progress_bar bool
|
||||
buffer_size int
|
||||
@@ -59,7 +58,7 @@ func (opt Options) ParallelWorkers() int {
|
||||
return opt.pointer.parallel_workers
|
||||
}
|
||||
|
||||
func (opt Options) ParseFastSeqHeader() obiiter.SeqAnnotator {
|
||||
func (opt Options) ParseFastSeqHeader() obiseq.SeqAnnotator {
|
||||
return opt.pointer.fastseq_header_parser
|
||||
}
|
||||
|
||||
@@ -124,7 +123,7 @@ func OptionsQualitySolexa() WithOption {
|
||||
return OptionsQualityShift(64)
|
||||
}
|
||||
|
||||
func OptionsFastSeqHeaderParser(parser obiiter.SeqAnnotator) WithOption {
|
||||
func OptionsFastSeqHeaderParser(parser obiseq.SeqAnnotator) WithOption {
|
||||
f := WithOption(func(opt Options) {
|
||||
opt.pointer.fastseq_header_parser = parser
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user