mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-12-10 01:30:27 +00:00
some renaming of functions
This commit is contained in:
17
pkg/obichunk/chunk.go
Normal file
17
pkg/obichunk/chunk.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package obichunk
|
||||
|
||||
import (
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiiter"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiseq"
|
||||
)
|
||||
|
||||
func ISequenceChunk(iterator obiiter.IBioSequence,
|
||||
classifier *obiseq.BioSequenceClassifier,
|
||||
onMemory bool) (obiiter.IBioSequence, error) {
|
||||
|
||||
if onMemory {
|
||||
return ISequenceChunkOnMemory(iterator, classifier)
|
||||
} else {
|
||||
return ISequenceChunkOnDisk(iterator, classifier)
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiseq"
|
||||
)
|
||||
|
||||
// ISequenceChunkMemory processes a sequence iterator by distributing the sequences
|
||||
// ISequenceChunkOnMemory processes a sequence iterator by distributing the sequences
|
||||
// into chunks in memory. It uses a classifier to determine how to distribute
|
||||
// the sequences and returns a new iterator for the processed sequences.
|
||||
//
|
||||
@@ -22,7 +22,7 @@ import (
|
||||
// An iterator of biosequences representing the processed chunks.
|
||||
//
|
||||
// The function operates asynchronously.
|
||||
func ISequenceChunkMemory(iterator obiiter.IBioSequence,
|
||||
func ISequenceChunkOnMemory(iterator obiiter.IBioSequence,
|
||||
classifier *obiseq.BioSequenceClassifier) (obiiter.IBioSequence, error) {
|
||||
|
||||
newIter := obiiter.MakeIBioSequence()
|
||||
|
||||
@@ -35,7 +35,7 @@ func IUniqueSequence(iterator obiiter.IBioSequence,
|
||||
}
|
||||
|
||||
} else {
|
||||
iterator, err = ISequenceChunkMemory(iterator,
|
||||
iterator, err = ISequenceChunkOnMemory(iterator,
|
||||
obiseq.HashClassifier(opts.BatchCount()))
|
||||
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user