pub struct Scoring<F: MatchFunc> {
pub gap_open: i32,
pub gap_extend: i32,
pub match_fn: F,
pub match_scores: Option<(i32, i32)>,
pub xclip_prefix: i32,
pub xclip_suffix: i32,
pub yclip_prefix: i32,
pub yclip_suffix: i32,
}
Expand description
Details of scoring are encapsulated in this structure. An affine gap score model is used so that the gap score for a length ‘k’ is: GapScore(k) = gap_open + gap_extend * k
Fields
gap_open: i32
gap_extend: i32
match_fn: F
match_scores: Option<(i32, i32)>
xclip_prefix: i32
xclip_suffix: i32
yclip_prefix: i32
yclip_suffix: i32
Implementations
sourceimpl Scoring<MatchParams>
impl Scoring<MatchParams>
sourcepub fn from_scores(
gap_open: i32,
gap_extend: i32,
match_score: i32,
mismatch_score: i32
) -> Self
pub fn from_scores(
gap_open: i32,
gap_extend: i32,
match_score: i32,
mismatch_score: i32
) -> Self
Create new Scoring instance with given gap open, gap extend penalties match and mismatch scores. The clip penalties are set to MIN_SCORE by default
Arguments
gap_open
- the score for opening a gap (should not be positive)gap_extend
- the score for extending a gap (should not be positive)match_score
- the score for a matchmismatch_score
- the score for a mismatch
sourceimpl<F: MatchFunc> Scoring<F>
impl<F: MatchFunc> Scoring<F>
sourcepub fn new(gap_open: i32, gap_extend: i32, match_fn: F) -> Self
pub fn new(gap_open: i32, gap_extend: i32, match_fn: F) -> Self
Create new Scoring instance with given gap open, gap extend penalties and the score function. The clip penalties are set to MIN_SCORE by default
Arguments
gap_open
- the score for opening a gap (should not be positive)gap_extend
- the score for extending a gap (should not be positive)match_fn
- function that returns the score for substitutions (also see bio::scores)
Trait Implementations
Auto Trait Implementations
impl<F> RefUnwindSafe for Scoring<F>where
F: RefUnwindSafe,
impl<F> Send for Scoring<F>where
F: Send,
impl<F> Sync for Scoring<F>where
F: Sync,
impl<F> Unpin for Scoring<F>where
F: Unpin,
impl<F> UnwindSafe for Scoring<F>where
F: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more