Struct bio::alignment::pairwise::Scoring

source ·
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: i32gap_extend: i32match_fn: Fmatch_scores: Option<(i32, i32)>xclip_prefix: i32xclip_suffix: i32yclip_prefix: i32yclip_suffix: i32

Implementations

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 match
  • mismatch_score - the score for a mismatch

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)

Sets the prefix and suffix clipping penalties for x to the input value

Arguments
  • penalty - Clipping penalty for x (both prefix and suffix, should not be positive)

Sets the prefix and suffix clipping penalties for y to the input value

Arguments
  • penalty - Clipping penalty for y (both prefix and suffix, should not be positive)

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.