pub struct BamReader { /* private fields */ }Implementations§
Source§impl BamReader
impl BamReader
pub fn open( path: &str, index_path: Option<&str>, parallel: i64, block_size: Option<u64>, max_blocks: Option<usize>, ) -> Result<Self>
pub fn header(&self) -> &SamHeader
pub fn chr_sizes(&self) -> &ChrMap
pub fn index_error(&self) -> &str
pub fn is_indexed(&self) -> bool
pub fn is_closed(&self) -> bool
pub fn path(&self) -> &str
pub fn parallel(&self) -> usize
pub fn close(&mut self)
Sourcepub fn read_entries(&self, req: &EntriesRequest) -> Result<Vec<Vec<BamRecord>>>
pub fn read_entries(&self, req: &EntriesRequest) -> Result<Vec<Vec<BamRecord>>>
One list per locus, in the order the loci were given.
Each locus gets its own full list, so two overlapping loci both report the alignments they share.
Sourcepub fn read_all_entries(&self, req: &EntriesRequest) -> Result<Vec<BamRecord>>
pub fn read_all_entries(&self, req: &EntriesRequest) -> Result<Vec<BamRecord>>
Every alignment on the named references, in reference then coordinate order.
Unplaced alignments are left out: the index reaches an alignment only through the reference it sits on.
Sourcepub fn iter_entries(&self, req: &EntriesRequest) -> Result<LocusEntries<'_>>
pub fn iter_entries(&self, req: &EntriesRequest) -> Result<LocusEntries<'_>>
Per-locus, lazily.
Sourcepub fn iter_all_entries(
&self,
req: &EntriesRequest,
window: i64,
) -> Result<WindowEntries<'_>>
pub fn iter_all_entries( &self, req: &EntriesRequest, window: i64, ) -> Result<WindowEntries<'_>>
Successive windows over whole references.
A window never spans two references, and an alignment reaching over a boundary is reported by the window it starts in.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for BamReader
impl !UnwindSafe for BamReader
impl Freeze for BamReader
impl Send for BamReader
impl Sync for BamReader
impl Unpin for BamReader
impl UnsafeUnpin for BamReader
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more