schrodinger.ui.sequencealignment.align module

Sequence alignment routines for the multiple sequence viewer.

Copyright Schrodinger, LLC. All rights reserved.

schrodinger.ui.sequencealignment.align.align(first_sequence, second_sequence, gap_open_penalty=- 1.0, gap_extend_penalty=0.0, scoring_matrix=None, direct_scores=False, constraints=None, merge=False, merge_selected=False, last_to_merge=None, ss_constraints=False, sequence_group=None)[source]

This is an implementation of constrained dynamic programming algorithm for pairwise sequence alignment.

Parameters
  • first_sequence (Sequence) – first sequence to be aligned

  • second_sequence (Sequence) – second sequence to be aligned

  • gap_open_penalty (float) – Gap opening penalty.

  • gap_extend_penalty (float) – Gap extension penalty.

  • scoring_matrix (2D float array) – Scoring matrix to be used for the alignment. If no matrix is specified, this method uses residue identity measure.

  • constraints (list of (int, int)) – Optional list of pairwise constraints.

  • merge (boolean) – Merge the aligned sequence with the exisiting alignment.

  • direct_scores (boolean) – Use scoring matrix directly as (NxM) where N, M are lengths of both sequences rather than default 20x20 substitution matrix.

  • ss_constraints (boolean) – Impose secondary structure constraints during the alignment.