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)
23 lines
1.3 KiB
Markdown
23 lines
1.3 KiB
Markdown
# Taxonomic Annotation Workers in `obiseq`
|
|
|
|
This Go package provides functional workers for annotating biological sequences with taxonomic information using a hierarchical taxonomy (e.g., from NCBI or UNITE). Each worker is implemented as a `SeqWorker`—a function that processes one sequence and returns an updated slice of sequences.
|
|
|
|
- **`MakeSetTaxonAtRankWorker(taxonomy, rank)`**:
|
|
Assigns a taxonomic label at *a specific rank* (e.g., `"genus"`, `"family"`). Validates that the requested `rank` exists in the taxonomy before proceeding.
|
|
|
|
- **`MakeSetSpeciesWorker(taxonomy)`**:
|
|
Annotates each sequence with its inferred species name using the provided taxonomy.
|
|
|
|
- **`MakeSetGenusWorker(taxonomy)`**:
|
|
Adds genus-level taxonomic assignment to sequences.
|
|
|
|
- **`MakeSetFamilyWorker(taxonomy)`**:
|
|
Adds family-level taxonomic assignment.
|
|
|
|
- **`MakeSetPathWorker(taxonomy)`**:
|
|
Populates the full taxonomic path (e.g., `"Eukaryota;Metazoa;Chordata;..."`) for each sequence.
|
|
|
|
All workers rely on methods of `BioSequence` (e.g., `.SetSpecies()`, `.SetPath()`), which internally use the `obitax.Taxonomy` object to resolve taxonomic IDs or names. Errors are logged via `logrus`; invalid ranks cause a fatal exit.
|
|
|
|
These utilities support modular, pipeline-friendly taxonomic annotation—ideal for high-throughput metabarcoding workflows.
|