pub struct FastaIndexEntry {
pub name: Vec<u8>,
pub len: u64,
pub offset: u64,
pub line_bases: u64,
pub line_width: u64,
}Expand description
One .fai-style FASTA index entry.
offset, line_bases, and line_width follow the SAMtools .fai
convention over the uncompressed FASTA byte stream. When built from BGZF
input, virtual_offset stores the BGZF virtual offset for offset.
Fields§
§name: Vec<u8>Reference name, using the first whitespace-delimited token after >.
len: u64Number of bases in the reference sequence.
offset: u64Uncompressed byte offset of the first sequence byte.
line_bases: u64Number of bases per full sequence line.
line_width: u64Number of bytes per full sequence line, including line ending bytes.
Implementations§
Source§impl FastaIndexEntry
impl FastaIndexEntry
Sourcepub fn sequence_offset(&self, pos: u64) -> Result<u64>
pub fn sequence_offset(&self, pos: u64) -> Result<u64>
Return the uncompressed FASTA byte offset for a zero-based sequence position.
Coordinates are 0-based and do not include FASTA line separators.
Trait Implementations§
Source§impl Clone for FastaIndexEntry
impl Clone for FastaIndexEntry
Source§fn clone(&self) -> FastaIndexEntry
fn clone(&self) -> FastaIndexEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FastaIndexEntry
impl Debug for FastaIndexEntry
impl Eq for FastaIndexEntry
Source§impl PartialEq for FastaIndexEntry
impl PartialEq for FastaIndexEntry
Source§fn eq(&self, other: &FastaIndexEntry) -> bool
fn eq(&self, other: &FastaIndexEntry) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FastaIndexEntry
Auto Trait Implementations§
impl Freeze for FastaIndexEntry
impl RefUnwindSafe for FastaIndexEntry
impl Send for FastaIndexEntry
impl Sync for FastaIndexEntry
impl Unpin for FastaIndexEntry
impl UnsafeUnpin for FastaIndexEntry
impl UnwindSafe for FastaIndexEntry
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