pub struct GIntervalMap<D>(/* private fields */);Expand description
A map from genomic internvals to values, internally represented as a interval tree for efficient queries. Note that GIntervalMap permits duplicated records.
Implementations§
Source§impl<D> GIntervalMap<D>
impl<D> GIntervalMap<D>
Sourcepub fn iter(&self) -> Iter<'_, D> ⓘ
pub fn iter(&self) -> Iter<'_, D> ⓘ
Iterate over all records in the map. The records are returned in sorted order. The order is determined by the chromosome (string comparison) and the start position and end position of the intervals.
Sourcepub fn insert<B: BEDLike>(&mut self, bed: &B, value: D)
pub fn insert<B: BEDLike>(&mut self, bed: &B, value: D)
This is very inefficient and should be avoided if possible.
Sourcepub fn find<B: BEDLike>(&self, bed: &B) -> GIntervalQueryIter<'_, D> ⓘ
pub fn find<B: BEDLike>(&self, bed: &B) -> GIntervalQueryIter<'_, D> ⓘ
Return regions that overlaop with the query.
Sourcepub fn is_overlapped<B: BEDLike>(&self, bed: &B) -> bool
pub fn is_overlapped<B: BEDLike>(&self, bed: &B) -> bool
Determine if the query overlaps with any record.
Trait Implementations§
Source§impl<D: Clone> Clone for GIntervalMap<D>
impl<D: Clone> Clone for GIntervalMap<D>
Source§fn clone(&self) -> GIntervalMap<D>
fn clone(&self) -> GIntervalMap<D>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<D: Debug> Debug for GIntervalMap<D>
impl<D: Debug> Debug for GIntervalMap<D>
Source§impl<B: BEDLike, D> FromIterator<(B, D)> for GIntervalMap<D>
impl<B: BEDLike, D> FromIterator<(B, D)> for GIntervalMap<D>
Auto Trait Implementations§
impl<D> Freeze for GIntervalMap<D>
impl<D> RefUnwindSafe for GIntervalMap<D>where
D: RefUnwindSafe,
impl<D> Send for GIntervalMap<D>where
D: Send,
impl<D> Sync for GIntervalMap<D>where
D: Sync,
impl<D> Unpin for GIntervalMap<D>
impl<D> UnwindSafe for GIntervalMap<D>where
D: 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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