Function parasailors::global_alignment_score
[−]
[src]
pub fn global_alignment_score(query_profile: &Profile, database_sequence: &[u8], open_cost: i32, gap_extend_cost: i32) -> i32
Provides a score for global pairwise alignment, using a vectorized version of Needleman-Wunsch.
Examples
// create & lookup substitution matrices let identity_matrix = Matrix::new(MatrixType::Identity); let query = b"AAAAAAAAAACCCCCCCCCCGGGGGGGGGGTTTTTTTTTTTNNNNNNNNN"; let profile_ident = Profile::new(query, &identity_matrix); let reference = b"AAAAAAAAAACCCCCCCCCCGGGGGGGGGGTTTTTTTTTTTNNNNNNNNN"; assert_eq!(50, global_alignment_score(&profile_ident, reference, 1, 1)); let reference = b"AAAAAAAAAACCCCCCCCCCGGGGGGGGGGTTTTTCCTTTTTTNNNNNNNNN"; assert_eq!(48, global_alignment_score(&profile_ident, reference, 1, 1));