[−][src]Crate aa_similarity
Substitution matrices for use in protein sequence analysis and alignment.
This crate implements the trait Similarity
which provide the similarity()
function for each substitution matrix. Similarity data from ftp://ftp.ncbi.nih.gov/blast/matrices/ is parsed and creates a match between all possible combination of 2 amino acids.
use aa_similarity::{Blosum62, Blosum65, Similarity, AminoAcid}; use std::convert::TryFrom; // from AminoAcid assert_eq!( Blosum65::similarity(AminoAcid::GlutamicAcid, AminoAcid::AsparticAcid), 2 ); // from char let ala = AminoAcid::try_from('A')?; let tyr = AminoAcid::try_from('Y')?; assert_eq!(Blosum62::similarity(ala, tyr), -2);
Structs
Enums
AminoAcid | One variant for each amino acid |
SubstitutionMatrix | One variant per matrix |
Traits
Similarity |