pub struct PafRecord {
pub query_name: String,
pub query_len: usize,
pub query_start: usize,
pub query_end: usize,
pub strand: char,
pub target_name: String,
pub target_len: usize,
pub target_start: usize,
pub target_end: usize,
pub matches: usize,
pub block_len: usize,
}Expand description
A single PAF alignment record.
Contains the 12 mandatory PAF columns parsed from a single line. Optional tags (columns 13+) are not currently parsed.
Fields§
§query_name: StringQuery sequence name (column 1).
query_len: usizeQuery sequence length (column 2).
query_start: usizeQuery start position, 0-based (column 3).
query_end: usizeQuery end position (column 4).
strand: charRelative strand: ‘+’ or ‘-’ (column 5).
target_name: StringTarget sequence name (column 6).
target_len: usizeTarget sequence length (column 7).
target_start: usizeTarget start position (column 8).
target_end: usizeTarget end position (column 9).
matches: usizeNumber of matching bases (column 10).
block_len: usizeAlignment block length (column 11).
Implementations§
Source§impl PafRecord
impl PafRecord
Sourcepub fn parse_line(line: &str) -> Result<Self>
pub fn parse_line(line: &str) -> Result<Self>
Sourcepub fn calculate_identity(&self) -> f64
pub fn calculate_identity(&self) -> f64
Calculates alignment identity percentage.
Identity = (matching bases / alignment block length) × 100
§Returns
Identity percentage (0-100), or 0 if block_len is 0.
Sourcepub fn calculate_coverage(&self) -> f64
pub fn calculate_coverage(&self) -> f64
Calculates target coverage percentage.
Coverage = (aligned target length / total target length) × 100
§Returns
Coverage percentage (0-100), or 0 if target_len is 0.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PafRecord
impl RefUnwindSafe for PafRecord
impl Send for PafRecord
impl Sync for PafRecord
impl Unpin for PafRecord
impl UnsafeUnpin for PafRecord
impl UnwindSafe for PafRecord
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 more