Files
obitools4/autodoc/docmd/pkg/obingslibrary/worker.md
T
Eric Coissac 8c7017a99d ⬆️ version bump to v4.5
- Update obioptions.Version from "Release 4.4.29" to "/v/ Release v5"
- Update version.txt from 4.29 → .30
(automated by Makefile)
2026-04-13 13:34:53 +02:00

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 allowedMismatch and allowsIndel
    • Parallelization (parallelWorkers) and batching control (batchSize)
    • Optional progress tracking (withProgressBar)

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 discardErrors is true (default), sequences causing extraction errors are filtered out.
    • Alternatively, error-containing reads can be retained or logged via OptionUnidentified.

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.