pub enum MateResolutionStrategy {
BaseQualMapQualFirstInPair,
BaseQualMapQualIUPAC,
BaseQualMapQualN,
MapQualBaseQualFirstInPair,
MapQualBaseQualIUPAC,
MapQualBaseQualN,
IUPAC,
N,
Original,
}Expand description
Strategies for resolving which mate to use when overlapping mates disagree on a base call.
All strategies first check user-based read filters. If one mate fails filters, the other is chosen. If both fail, the first mate is chosen by default.
For reads that are deletions / ref skips or lack a base call, all strategies fall back to the Original strategy (MAPQ → first in pair).
Variants§
BaseQualMapQualFirstInPair
Base quality → MAPQ → first in pair
Priority order:
- Higher base quality score wins
- If base qualities are equal, higher MAPQ wins
- If both are equal, first mate in pair wins
BaseQualMapQualIUPAC
Base quality → MAPQ → IUPAC ambiguity code
Priority order:
- Higher base quality score wins
- If base qualities are equal, higher MAPQ wins
- If both are equal, return IUPAC ambiguity code (e.g., A+G→R)
BaseQualMapQualN
Base quality → MAPQ → N
Priority order:
- Higher base quality score wins
- If base qualities are equal, higher MAPQ wins
- If both are equal, return N (unknown base), if ambiguous
MapQualBaseQualFirstInPair
MAPQ → base quality → first in pair
Priority order:
- Higher MAPQ wins
- If MAPQ is equal, higher base quality wins
- If both are equal, first mate in pair wins
MapQualBaseQualIUPAC
MAPQ → base quality → IUPAC ambiguity code
Priority order:
- Higher MAPQ wins
- If MAPQ is equal, higher base quality wins
- If both are equal, return IUPAC ambiguity code (e.g., A+G→R)
MapQualBaseQualN
MAPQ → base quality → N
Priority order:
- Higher MAPQ wins
- If MAPQ is equal, higher base quality wins
- If both are equal, return N (unknown base), if ambiguous
IUPAC
Always return IUPAC ambiguity code for different bases
Returns the appropriate IUPAC code for the base combination:
- Same bases: return the base (A+A→A)
- Different bases: return IUPAC code (A+G→R, C+T→Y, etc.)
N
Always return N for different bases
Returns N for different bases, but identical bases return themselves:
- Same bases: return the base (A+A→A)
- Different bases: return N
Original
Original strategy: MAPQ → first in pair
Priority order:
- Higher MAPQ wins
- If MAPQ is equal, first mate in pair wins
- If neither is marked as first in pair, choose first mate by default
Trait Implementations§
Source§impl Clone for MateResolutionStrategy
impl Clone for MateResolutionStrategy
Source§fn clone(&self) -> MateResolutionStrategy
fn clone(&self) -> MateResolutionStrategy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MateResolutionStrategy
impl Debug for MateResolutionStrategy
Source§impl FromStr for MateResolutionStrategy
impl FromStr for MateResolutionStrategy
Source§impl TryFrom<&str> for MateResolutionStrategy
impl TryFrom<&str> for MateResolutionStrategy
impl Copy for MateResolutionStrategy
Auto Trait Implementations§
impl Freeze for MateResolutionStrategy
impl RefUnwindSafe for MateResolutionStrategy
impl Send for MateResolutionStrategy
impl Sync for MateResolutionStrategy
impl Unpin for MateResolutionStrategy
impl UnwindSafe for MateResolutionStrategy
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<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.