pub struct SimpleErrorUmiAssigner { /* private fields */ }Expand description
Simple error-tolerant UMI assigner
Groups UMIs that are within a specified edit distance using a simple clustering algorithm. When a new UMI is encountered, it is compared against existing groups. If it matches any UMI in a group, it is added to that group. If it matches multiple groups, those groups are merged. This can lead to transitive clustering where UMIs are grouped together even if they differ by more than the threshold.
§Algorithm
- For each UMI, find all existing groups that contain at least one UMI within threshold
- If no matches, create a new group
- If one match, add to that group
- If multiple matches, merge all matching groups
§Thread Safety
Uses atomic counter for ID generation, making it safe to use across threads.
Implementations§
Trait Implementations§
Source§impl UmiAssigner for SimpleErrorUmiAssigner
impl UmiAssigner for SimpleErrorUmiAssigner
Source§fn assign(&self, raw_umis: &[String]) -> Vec<MoleculeId>
fn assign(&self, raw_umis: &[String]) -> Vec<MoleculeId>
Assign molecule IDs to UMIs Read more
Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Downcast to concrete type (for pattern matching) Read more
Source§fn split_templates_by_pair_orientation(&self) -> bool
fn split_templates_by_pair_orientation(&self) -> bool
Whether to split templates by pair orientation Read more
Auto Trait Implementations§
impl !Freeze for SimpleErrorUmiAssigner
impl RefUnwindSafe for SimpleErrorUmiAssigner
impl Send for SimpleErrorUmiAssigner
impl Sync for SimpleErrorUmiAssigner
impl Unpin for SimpleErrorUmiAssigner
impl UnsafeUnpin for SimpleErrorUmiAssigner
impl UnwindSafe for SimpleErrorUmiAssigner
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