mirror of
https://github.com/metabarcoding/obitools4.git
synced 2026-04-30 12:00:39 +00:00
8c7017a99d
- Update obioptions.Version from "Release 4.4.29" to "/v/ Release v5" - Update version.txt from 4.29 → .30 (automated by Makefile)
1.5 KiB
1.5 KiB
Semantic Description of obiseq Package Functionalities
The obiseq package provides composable, higher-order worker functions for processing biological sequence data in Go. It defines three core functional types:
SeqAnnotator: In-place annotation of a single sequence (e.g., adding metadata).SeqWorker: Processes one sequence and returns zero or more output sequences (1→N transformation).SeqSliceWorker: Processes a slice of sequences and returns another slice (bulk pipeline stage).
Key utilities include:
NilSeqWorker: Identity worker—returns the input sequence unchanged.AnnotatorToSeqWorker: Converts an in-place annotator into aSeqWorker, preserving compatibility with pipeline interfaces.SeqToSliceWorker: Lifts aSeqWorkerto operate on slices, with configurable error handling (breakOnError). Supports dynamic slice growth and logging viaobilog.SeqToSliceFilterOnWorker: Filters sequences in a slice using aSequencePredicate, preserving order and avoiding unnecessary allocations.SeqToSliceConditionalWorker: Applies aSeqWorkeronly to sequences satisfying a predicate; others pass through unchanged..ChainWorkers(): Method onSeqWorkerto compose two workers sequentially (pipeline chaining), enabling modular, reusable workflows.
All functions emphasize safety: errors are either propagated (breakOnError = true) or logged with warnings, ensuring robustness in large-scale sequence processing pipelines.