Struct consalign::IndexedReader
[−]Expand description
A FASTA reader with an index as created by SAMtools (.fai).
Fields
index: IndexImplementations
impl IndexedReader<File>
impl IndexedReader<File>
impl<R> IndexedReader<R>where
R: Read + Seek,
impl<R> IndexedReader<R>where
R: Read + Seek,
pub fn new<I>(fasta: R, fai: I) -> Result<IndexedReader<R>, Error>where
I: Read,
pub fn new<I>(fasta: R, fai: I) -> Result<IndexedReader<R>, Error>where
I: Read,
Read from a FASTA and its index, both given as io::Read. FASTA has to
be io::Seek in addition.
pub fn with_index(fasta: R, index: Index) -> IndexedReader<R>
pub fn with_index(fasta: R, index: Index) -> IndexedReader<R>
Read from a FASTA and its index, the first given as io::Read, the
second given as index object.
pub fn fetch(&mut self, seq_name: &str, start: u64, stop: u64) -> Result<(), Error>
pub fn fetch(&mut self, seq_name: &str, start: u64, stop: u64) -> Result<(), Error>
Fetch an interval from the sequence with the given name for reading. (stop position is exclusive).
pub fn fetch_by_rid(
&mut self,
rid: usize,
start: u64,
stop: u64
) -> Result<(), Error>
pub fn fetch_by_rid(
&mut self,
rid: usize,
start: u64,
stop: u64
) -> Result<(), Error>
Fetch an interval from the sequence with the given record index for reading. (stop position is exclusive).
pub fn fetch_all(&mut self, seq_name: &str) -> Result<(), Error>
pub fn fetch_all(&mut self, seq_name: &str) -> Result<(), Error>
Fetch the whole sequence with the given name for reading.
pub fn fetch_all_by_rid(&mut self, rid: usize) -> Result<(), Error>
pub fn fetch_all_by_rid(&mut self, rid: usize) -> Result<(), Error>
Fetch the whole sequence with the given record index for reading.
pub fn read(&mut self, seq: &mut Vec<u8, Global>) -> Result<(), Error>
pub fn read(&mut self, seq: &mut Vec<u8, Global>) -> Result<(), Error>
Read the fetched sequence into the given vector.
pub fn read_iter(&mut self) -> Result<IndexedReaderIterator<'_, R>, Error>
pub fn read_iter(&mut self) -> Result<IndexedReaderIterator<'_, R>, Error>
Return an iterator yielding the fetched sequence.
Trait Implementations
Auto Trait Implementations
impl<R> RefUnwindSafe for IndexedReader<R>where
R: RefUnwindSafe,
impl<R> Send for IndexedReader<R>where
R: Send,
impl<R> Sync for IndexedReader<R>where
R: Sync,
impl<R> Unpin for IndexedReader<R>where
R: Unpin,
impl<R> UnwindSafe for IndexedReader<R>where
R: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more