pub struct FastaDir { /* private fields */ }
Expand description
This class provides a simple key-value interface to a directory of compressed FASTA files.
Sequences are stored in dated FASTA files. Dating the files enables compact storage with multiple releases (using hard links) and efficient incremental updtes and transfers (e.g., via rsync). The FASTA files are compressed with block gzip, enabling fast random access to arbitrary regions of even large (chromosome-sized) sequences.
When the key is a hash based on sequence (e.g., SHA512), the combination provides a convenient non-redundant storage of sequences with fast access to sequences and sequence slices, compact storage and easy replication.
Implementations§
Source§impl FastaDir
impl FastaDir
Sourcepub fn new<P>(root_dir: P) -> Result<Self, Error>
pub fn new<P>(root_dir: P) -> Result<Self, Error>
Initialize new FastaDir
, will open connection to the database.
Sourcepub fn schema_version(&self) -> u32
pub fn schema_version(&self) -> u32
Schema version as read from the database.
Sourcepub fn fetch_seqinfo(&self, seq_id: &str) -> Result<SeqInfoRecord, Error>
pub fn fetch_seqinfo(&self, seq_id: &str) -> Result<SeqInfoRecord, Error>
Load SeqInfoRecord
from database.