From 422f11ccebf56cd4ee9700f531ca742115f3e5af Mon Sep 17 00:00:00 2001 From: Eric Coissac Date: Tue, 29 Oct 2024 16:53:10 +0100 Subject: [PATCH] Changes to be committed: modified: pkg/obitools/obitagpcr/pcrtag.go --- pkg/obitools/obitagpcr/pcrtag.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/pkg/obitools/obitagpcr/pcrtag.go b/pkg/obitools/obitagpcr/pcrtag.go index 3af7706..8b7caf6 100644 --- a/pkg/obitools/obitagpcr/pcrtag.go +++ b/pkg/obitools/obitagpcr/pcrtag.go @@ -12,6 +12,29 @@ import ( "git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obitools/obipairing" ) +// IPCRTagPESequencesBatch performs paired-end sequence demultiplexing and tagging. +// It takes an iterator of paired-end biosequences, and various parameters to control +// the demultiplexing and tagging process. It returns a new iterator with the +// demultiplexed and tagged sequences. +// +// The function first checks if the input iterator contains paired-end sequences. +// It then creates a new iterator to hold the processed sequences, and launches +// a number of worker goroutines to process the input sequences in parallel. +// +// For each sequence pair, the function attempts to assemble the paired-end +// sequences into a consensus sequence, and then extracts the barcodes and +// other metadata from the consensus. The extracted information is then +// added as annotations to the original sequence pair. +// +// If the CLI option to reorient the sequences is enabled, the function will +// reverse-complement the sequences as needed to ensure the forward and reverse +// tags are correctly oriented. +// +// If the CLI option to conserve unassigned sequences is disabled, the function +// will filter out any sequences that could not be demultiplexed. +// +// If the CLI option to save unassigned sequences is enabled, the function will +// write those sequences to a separate file. func IPCRTagPESequencesBatch(iterator obiiter.IBioSequence, gap, scale float64, delta, minOverlap int, minIdentity float64, fastAlign, fastScoreRel,