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
PCR Simulation and Barcode Extraction Module
This Go package (obingslibrary) provides configuration-driven tools for PCR simulation and barcode extraction from NGS libraries.
Core Concepts
Options: A fluent configuration object for customizing behavior via functional setters.- Default options are defined in
MakeOptions, supporting:- Error handling (
discardErrors) - Mismatch/indel tolerance via
allowedMismatchandallowsIndel - Parallelization (
parallelWorkers) and batching control (batchSize) - Optional progress tracking (
withProgressBar)
- Error handling (
Key Functionalities
-
Barcode Extraction:
ExtractBarcodeSlice: Extracts barcodes from a slice of sequences using the NGS library, applying configured error handling and alignment parameters.ExtractBarcodeSliceWorker: Returns a reusable worker function for batch processing (e.g., in pipelines or parallel workers).
-
Compilation Step:
ngslibrary.Compile(...)prepares internal indexing based on mismatch/indel settings before extraction.
-
Error Handling:
- If
discardErrorsis true (default), sequences causing extraction errors are filtered out. - Alternatively, error-containing reads can be retained or logged via
OptionUnidentified.
- If
Design Highlights
- Uses the option pattern for extensibility and clean API.
- Integrates with default settings from
obidefault(e.g., parallelism, batch size). - Designed for both direct use and integration into concurrent workflows.