pub struct FastaSequenceStore { /* private fields */ }Expand description
A sequence store that holds all sequences in memory, loaded from indexed FASTA files.
Supports loading multiple FASTA files incrementally via add_fasta.
Digest computation is skipped when a fresh .refget.json cache exists.
Implementations§
Source§impl FastaSequenceStore
impl FastaSequenceStore
Sourcepub fn add_fasta<P: AsRef<Path>>(
&mut self,
path: P,
) -> StoreResult<Vec<FastaSequenceSummary>>
pub fn add_fasta<P: AsRef<Path>>( &mut self, path: P, ) -> StoreResult<Vec<FastaSequenceSummary>>
Load a FASTA file into this store, appending to existing data.
Uses a digest cache if fresh, otherwise computes digests on the fly. Returns summaries for the sequences loaded from this file.
Sourcepub fn mark_circular(&mut self, circular_names: &[String])
pub fn mark_circular(&mut self, circular_names: &[String])
Mark sequences with matching names as circular.
Sourcepub fn from_fasta<P: AsRef<Path>>(
path: P,
) -> StoreResult<(Self, Vec<FastaSequenceSummary>)>
pub fn from_fasta<P: AsRef<Path>>( path: P, ) -> StoreResult<(Self, Vec<FastaSequenceSummary>)>
Convenience: load a single FASTA file and return the store + summaries.
Trait Implementations§
Source§impl Default for FastaSequenceStore
impl Default for FastaSequenceStore
Source§impl SequenceStore for FastaSequenceStore
impl SequenceStore for FastaSequenceStore
Source§fn get_sequence(
&self,
digest: &str,
start: Option<u64>,
end: Option<u64>,
) -> StoreResult<Option<Vec<u8>>>
fn get_sequence( &self, digest: &str, start: Option<u64>, end: Option<u64>, ) -> StoreResult<Option<Vec<u8>>>
Retrieve sequence bases by digest (MD5 or sha512t24u).
Supports optional start/end for subsequence retrieval (0-based, half-open).
Source§fn get_metadata(&self, digest: &str) -> StoreResult<Option<SequenceMetadata>>
fn get_metadata(&self, digest: &str) -> StoreResult<Option<SequenceMetadata>>
Retrieve metadata for a sequence by digest.
Source§fn get_length(&self, digest: &str) -> StoreResult<Option<u64>>
fn get_length(&self, digest: &str) -> StoreResult<Option<u64>>
Retrieve the length of a sequence by digest.
Auto Trait Implementations§
impl Freeze for FastaSequenceStore
impl RefUnwindSafe for FastaSequenceStore
impl Send for FastaSequenceStore
impl Sync for FastaSequenceStore
impl Unpin for FastaSequenceStore
impl UnsafeUnpin for FastaSequenceStore
impl UnwindSafe for FastaSequenceStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more