Package lib :: Package sequence_alignment :: Module align_protein
[hide private]
[frames] | no frames]

Module align_protein

source code

General sequence alignment functions.

Functions [hide private]
float, str, str, numpy rank-2 int array
align_pairwise(sequence1, sequence2, algorithm='NW70', matrix='BLOSUM62', gap_open_penalty=1.0, gap_extend_penalty=1.0, end_gap_open_penalty=0.0, end_gap_extend_penalty=0.0, verbosity=1)
Align two protein sequences.
source code
Variables [hide private]
  __package__ = 'lib.sequence_alignment'

Imports: sys, RelaxError, needleman_wunsch_align, BLOSUM62, BLOSUM62_SEQ, PAM250, PAM250_SEQ


Function Details [hide private]

align_pairwise(sequence1, sequence2, algorithm='NW70', matrix='BLOSUM62', gap_open_penalty=1.0, gap_extend_penalty=1.0, end_gap_open_penalty=0.0, end_gap_extend_penalty=0.0, verbosity=1)

source code 

Align two protein sequences.

Parameters:
  • sequence1 (str) - The first protein sequence as one letter codes.
  • sequence2 (str) - The second protein sequence as one letter codes.
  • algorithm (str) - The pairwise sequence alignment algorithm to use.
  • matrix (str) - The substitution matrix to use.
  • gap_open_penalty (float) - The penalty for introducing gaps, as a positive number.
  • gap_extend_penalty (float) - The penalty for extending a gap, as a positive number.
  • end_gap_open_penalty (float) - The optional penalty for opening a gap at the end of a sequence.
  • end_gap_extend_penalty (float) - The optional penalty for extending a gap at the end of a sequence.
  • verbosity (int) - The level of verbosity. Setting this to zero silences all printouts.
Returns: float, str, str, numpy rank-2 int array
The alignment score, two alignment strings and the gap matrix.