Struct bed_utils::bed::tree::SparseBinnedCoverage
source · pub struct SparseBinnedCoverage<'a, B, N> {
pub len: usize,
pub bin_size: u64,
pub consumed_tags: f64,
/* private fields */
}Fields§
§len: usize§bin_size: u64Implementations§
source§impl<'a, N: Num + NumCast + NumAssignOps + Copy, B: BEDLike> SparseBinnedCoverage<'a, B, N>
impl<'a, N: Num + NumCast + NumAssignOps + Copy, B: BEDLike> SparseBinnedCoverage<'a, B, N>
pub fn new(genome_regions: &'a GenomeRegions<B>, bin_size: u64) -> Self
pub fn reset(&mut self)
pub fn insert<D>(&mut self, tag: &D, count: N)where
D: BEDLike,
pub fn get_regions(
&'a self
) -> impl Iterator<Item = impl Iterator<Item = B>> + 'awhere
B: Clone,
pub fn get_coverage(&self) -> &BTreeMap<usize, N>
pub fn get_coverage_as_vec(&self) -> Vec<N>
pub fn get_region_coverage( &'a self ) -> impl Iterator<Item = (GenomicRange, N)> + 'a
Trait Implementations§
Auto Trait Implementations§
impl<'a, B, N> Freeze for SparseBinnedCoverage<'a, B, N>
impl<'a, B, N> RefUnwindSafe for SparseBinnedCoverage<'a, B, N>where
B: RefUnwindSafe,
N: RefUnwindSafe,
impl<'a, B, N> Send for SparseBinnedCoverage<'a, B, N>
impl<'a, B, N> Sync for SparseBinnedCoverage<'a, B, N>
impl<'a, B, N> Unpin for SparseBinnedCoverage<'a, B, N>
impl<'a, B, N> UnwindSafe for SparseBinnedCoverage<'a, B, N>where
N: RefUnwindSafe,
B: RefUnwindSafe,
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> Pointable for T
impl<T> Pointable for T
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.