kinoml.modeling.alignment

Module Contents

kinoml.modeling.alignment.sequence_similarity(sequence1: str, sequence2: str, open_gap_penalty: int = - 11, extend_gap_penalty: int = - 1, substitution_matrix: str = 'BLOSUM62') float

Calculate the squence similarity of two amino acid sequences.

Parameters
  • sequence1 (str) – The first sequence.

  • sequence2 (str) – The second sequence.

  • open_gap_penalty (int) – The penalty to open a gap.

  • extend_gap_penalty (int) – The penalty to extend a gap.

  • substitution_matrix (str) – The substitution matrix to use during alignment. Available matrices can be found via: >>> from Bio.Align import substitution_matrices >>> substitution_matrices.load()

Returns

score – Similarity of sequences.

Return type

float