Skip to content

Refgetstore updates#237

Merged
nsheff merged 23 commits intodevfrom
refgetstore
Mar 6, 2026
Merged

Refgetstore updates#237
nsheff merged 23 commits intodevfrom
refgetstore

Conversation

@nsheff
Copy link
Copy Markdown
Member

@nsheff nsheff commented Feb 28, 2026

Add FastaImportOptions, thread-safe decoded cache, and namespace alias extraction

Summary

  • Add FastaImportOptions builder for configuring FASTA imports (force overwrite, namespace selection)
  • Add thread-safe decoded sequence cache (ensure_decoded / sequence_bytes) for parallel access from rayon workers
  • Extract namespace aliases from FASTA headers during import (NCBI, RefSeq, etc.)
  • Change get_sequence_by_alias to return Result instead of Option (KeyError on missing)
  • Update Python bindings, R bindings, and tests for new APIs
  • Minor cleanups: fix CustomError display, remove dead code, add #[must_use] annotations

nsheff and others added 7 commits February 24, 2026 22:17
Add decoded_cache HashMap, ensure_decoded(&mut self) for serial setup,
and sequence_bytes(&self) for parallel read access. This separates
mutation from borrowing so rayon workers can read decoded bytes without
external caching.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collapse 3 FASTA import methods (base, _force, _internal) into a single
add_sequence_collection_from_fasta() accepting a FastaImportOptions builder
with force() and namespaces() setters. Add extract_aliases_from_header()
for parsing namespaced aliases from FASTA headers during import.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…s API to return Result

- Remove dead bbid variable in region_set error path
- Gate std::error::Error import behind http feature
- Fix CustomError to display its message instead of hardcoded string
- Add #[must_use] to FastaImportOptions builder methods
- Add clear_decoded_cache() for memory reclamation
- Change get_sequence_by_alias to return Result instead of Option
- Update Rust and Python tests for new API

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@nsheff nsheff changed the title Refgetstore Refgetstore updates Feb 28, 2026
@nsheff nsheff marked this pull request as ready for review March 6, 2026 12:09
@nsheff nsheff merged commit 4884bd9 into dev Mar 6, 2026
@nsheff nsheff deleted the refgetstore branch March 6, 2026 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant