skbio.alignment.multi_align_prot#

skbio.alignment.multi_align_prot(sequences, /, **kwargs)[source]#

Align multiple protein sequences.

This is a convenience wrapper of multi_align for protein sequence alignment. It is preloaded with a scoring scheme consistent with BLASTP’s defaults [1]: substitution matrix = BLOSUM62, gap opening penalty = 11, gap extension penalty = 1. All parameters remain customizable. Refer to multi_align for full documentation.

References

Examples

>>> from skbio.sequence import Protein
>>> from skbio.alignment import multi_align_prot
>>> seqs = [Protein("MKTAVLGHDPQRSIF"),
...         Protein("MKTSVLGHDPKRAIF"),
...         Protein("MRAAAVLNYDPPQSVF"),
...         Protein("MKTGAVLGHEDPQRTIF"),
...         Protein("MSTGVLGYDPQRSIL")]
>>> path = multi_align_prot(seqs).path
>>> for seq in path.to_aligned(seqs):
...     print(seq)
MKTA-VLGH-DPQRSIF
MKTS-VLGH-DPKRAIF
MRAAAVLNY-DPPQSVF
MKTGAVLGHEDPQRTIF
MSTG-VLGY-DPQRSIL