skbio.alignment.pair_align_prot#

skbio.alignment.pair_align_prot(seq1, seq2, /, **kwargs)[source]#

Align two protein sequences.

This is a convenience wrapper of pair_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 pair_align for full documentation.

References

Examples

>>> from skbio.sequence import Protein
>>> from skbio.alignment import pair_align_prot
>>> seq1 = Protein('PKKKRKV')
>>> seq2 = Protein('PAAKRVKLD')
>>> res = pair_align_prot(seq1, seq2)
>>> res.score
11.0
>>> res.paths[0]
<PairAlignPath, positions: 9, segments: 2, CIGAR: '7M2I'>
>>> res.paths[0].to_aligned((seq1, seq2))
['PKKKRKV--', 'PAAKRVKLD']