pub struct ScoringContext {Show 13 fields
pub substitution_matrix: Vec<Vec<i32>>,
pub consweight_matrix: Vec<Vec<f64>>,
pub polarity: [f64; 256],
pub volume: [f64; 256],
pub amino_map: [u8; 256],
pub model: ScoringModel,
pub seq_type: SeqType,
pub gap: GapPenalties,
pub nalphabets: usize,
pub nscoredalphabets: usize,
pub fft_matrix: Vec<Vec<i32>>,
pub ln_matrix: Vec<Vec<f64>>,
pub ribosumdis: Option<[[i32; 37]; 37]>,
}Expand description
The complete scoring context needed by alignment algorithms.
Owns the substitution matrix and all derived scoring data.
This replaces the C globals amino_dis, n_dis, polarity[], etc.
Fields§
§substitution_matrix: Vec<Vec<i32>>Substitution score matrix (indexed by internal residue codes). For proteins: 20x20 (or 26x26 with ambiguity codes). For DNA: 4x4 (or larger with ambiguity).
consweight_matrix: Vec<Vec<f64>>Consistency-weighted version of the substitution matrix.
polarity: [f64; 256]Polarity values for each residue (amino acid property).
volume: [f64; 256]Volume values for each residue (amino acid property).
amino_map: [u8; 256]Character-to-internal-index mapping.
model: ScoringModelScoring model in use.
seq_type: SeqTypeSequence type.
gap: GapPenaltiesGap penalties.
nalphabets: usizeNumber of alphabets (26 for protein, 4-16 for DNA).
nscoredalphabets: usizeNumber of scored alphabets (20 for protein standard AAs).
fft_matrix: Vec<Vec<i32>>FFT-specific scoring matrix (n_dis + offset adjustment).
Used by alignableReagion() for segment detection scoring.
ln_matrix: Vec<Vec<f64>>Log-normal scoring matrix (n_dis + offset - offsetLN). Used in a specific refinement code path.
ribosumdis: Option<[[i32; 37]; 37]>RNA ribosum composite matrix (37×37) for RNA secondary structure scoring. Only populated for DNA/RNA sequence types.
Implementations§
Source§impl ScoringContext
impl ScoringContext
pub fn matrix_size(&self) -> usize
Trait Implementations§
Source§impl Clone for ScoringContext
impl Clone for ScoringContext
Source§fn clone(&self) -> ScoringContext
fn clone(&self) -> ScoringContext
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more