pub struct BaseGroup {
pub lower_count: usize,
pub upper_count: usize,
}Expand description
Base position grouping for read-level plots.
Replicates the logic from Graphs/BaseGroup.java. Early positions are shown
individually while later positions are grouped into bins so that general
trends remain visible without overwhelming the output.
A range of read positions (0-based, inclusive on both ends).
Fields§
§lower_count: usize§upper_count: usizeImplementations§
Source§impl BaseGroup
impl BaseGroup
Sourcepub fn label(&self) -> String
pub fn label(&self) -> String
Human-readable label for this group.
Java’s BaseGroup.toString() uses 1-based positions.
A single-position group prints as e.g. “1”, a range as “10-14”.
Sourcepub fn make_base_groups(
max_length: usize,
min_length: usize,
nogroup: bool,
expgroup: bool,
) -> Vec<BaseGroup>
pub fn make_base_groups( max_length: usize, min_length: usize, nogroup: bool, expgroup: bool, ) -> Vec<BaseGroup>
Build the set of base groups for a given maximum read length.
Replicates BaseGroup.makeBaseGroups(int). The Java code
works in 1-based coordinates internally and we convert to 0-based here.
If min_length (from config) exceeds max_length, groups are extended
to cover min_length positions, matching Java’s BaseGroup.java behavior.
Trait Implementations§
impl Eq for BaseGroup
impl StructuralPartialEq for BaseGroup
Auto Trait Implementations§
impl Freeze for BaseGroup
impl RefUnwindSafe for BaseGroup
impl Send for BaseGroup
impl Sync for BaseGroup
impl Unpin for BaseGroup
impl UnsafeUnpin for BaseGroup
impl UnwindSafe for BaseGroup
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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>
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>
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 moreSource§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>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.