pub struct AlignmentResult {
pub score: i32,
pub aligned_query: Vec<u8>,
pub aligned_target: Vec<u8>,
pub query_start: usize,
pub query_end: usize,
pub target_start: usize,
pub target_end: usize,
pub cigar: Vec<CigarOp>,
}Expand description
The result of a pairwise sequence alignment.
Fields§
§score: i32Alignment score.
aligned_query: Vec<u8>Aligned query sequence (with - for gaps).
aligned_target: Vec<u8>Aligned target sequence (with - for gaps).
query_start: usizeStart position in the original query (0-based, inclusive).
query_end: usizeEnd position in the original query (0-based, exclusive).
target_start: usizeStart position in the original target (0-based, inclusive).
target_end: usizeEnd position in the original target (0-based, exclusive).
cigar: Vec<CigarOp>CIGAR operations describing the alignment.
Implementations§
Source§impl AlignmentResult
impl AlignmentResult
Sourcepub fn cigar_string(&self) -> String
pub fn cigar_string(&self) -> String
Format the CIGAR vector as a compact string, e.g. "4=1I3=".
Sourcepub fn identity(&self) -> f64
pub fn identity(&self) -> f64
Fraction of aligned columns that are exact matches, in [0.0, 1.0].
Returns 0.0 if the alignment is empty.
Sourcepub fn mismatches(&self) -> usize
pub fn mismatches(&self) -> usize
Number of mismatching positions.
Trait Implementations§
Source§impl Clone for AlignmentResult
impl Clone for AlignmentResult
Source§fn clone(&self) -> AlignmentResult
fn clone(&self) -> AlignmentResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AlignmentResult
impl Debug for AlignmentResult
Auto Trait Implementations§
impl Freeze for AlignmentResult
impl RefUnwindSafe for AlignmentResult
impl Send for AlignmentResult
impl Sync for AlignmentResult
impl Unpin for AlignmentResult
impl UnsafeUnpin for AlignmentResult
impl UnwindSafe for AlignmentResult
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