Change some comments

This commit is contained in:
2022-08-21 14:47:22 +02:00
parent 10663bf79c
commit ad4a861261
2 changed files with 6 additions and 2 deletions

View File

@ -10,7 +10,7 @@ import (
) )
// Runs dereplication algorithm on a obiiter.IBioSequenceBatch // Runs dereplication algorithm on a obiiter.IBioSequenceBatch
// iterator. // iterator.
func IUniqueSequence(iterator obiiter.IBioSequenceBatch, func IUniqueSequence(iterator obiiter.IBioSequenceBatch,
options ...WithOption) (obiiter.IBioSequenceBatch, error) { options ...WithOption) (obiiter.IBioSequenceBatch, error) {
@ -86,6 +86,7 @@ func IUniqueSequence(iterator obiiter.IBioSequenceBatch,
next = obiiter.MakeIBioSequenceBatch(opts.BufferSize()) next = obiiter.MakeIBioSequenceBatch(opts.BufferSize())
iUnique.Add(1) iUnique.Add(1)
go ff(next, go ff(next,
obiseq.AnnotationClassifier(cat[icat], na), obiseq.AnnotationClassifier(cat[icat], na),
icat) icat)
@ -96,13 +97,16 @@ func IUniqueSequence(iterator obiiter.IBioSequenceBatch,
batch := input.Get() batch := input.Get()
if icat < 0 || len(batch.Slice()) == 1 { if icat < 0 || len(batch.Slice()) == 1 {
// No more sub classification of sequence or only a single sequence
if opts.NoSingleton() && len(batch.Slice()) == 1 && batch.Slice()[0].Count() == 1 { if opts.NoSingleton() && len(batch.Slice()) == 1 && batch.Slice()[0].Count() == 1 {
// We remove singleton from output
batch.Slice()[0].Recycle() batch.Slice()[0].Recycle()
batch.Recycle() batch.Recycle()
} else { } else {
iUnique.Push(batch.Reorder(nextOrder())) iUnique.Push(batch.Reorder(nextOrder()))
} }
} else { } else {
// A new step of classification must du realized
next.Push(batch.Reorder(o)) next.Push(batch.Reorder(o))
o++ o++
} }

View File

@ -30,7 +30,7 @@ func Unique(sequences obiiter.IBioSequenceBatch) obiiter.IBioSequenceBatch {
} }
// //
// Considers if sequences observed a singletime in the dataset have to // Considers if sequences observed a single time in the dataset have to
// be conserved in the output // be conserved in the output
// //
// --no-singleton // --no-singleton