mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
24 lines
609 B
Go
24 lines
609 B
Go
package obiformats
|
|
|
|
import (
|
|
"strings"
|
|
|
|
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obiiter"
|
|
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obiseq"
|
|
)
|
|
|
|
func ParseGuessedFastSeqHeader(sequence *obiseq.BioSequence) {
|
|
if strings.HasPrefix(sequence.Definition(), "{") {
|
|
ParseFastSeqJsonHeader(sequence)
|
|
} else {
|
|
ParseFastSeqOBIHeader(sequence)
|
|
}
|
|
}
|
|
|
|
func IParseFastSeqHeaderBatch(iterator obiiter.IBioSequence,
|
|
options ...WithOption) obiiter.IBioSequence {
|
|
opt := MakeOptions(options)
|
|
return iterator.MakeIWorker(obiseq.AnnotatorToSeqWorker(opt.ParseFastSeqHeader()),
|
|
opt.ParallelWorkers())
|
|
}
|