LingPy

This documentation is for version 2.0.dev, which is not released yet.

lingpy.align.multiple.Multiple.sum_of_pairs

Multiple.sum_of_pairs(alm_matrix='self', mat=None, gap_weight=0.0, gop=-1)

Calculate the sum-of-pairs score for a given alignment analysis.

Parameters :

alm_matrix : { ‘self’, ‘other’ }

Indicate for which MSA the sum-of-pairs score shall be calculated.

mat : None or numpy.array

If ‘other’ is chosen as an option for alm_matrix, define for which matrix the sum-of-pairs score shall be calculated.

gap_weight : float (default=0)

The factor by which gaps in aligned columns contribute to the calculation of the column score. When set to 0, gaps will be ignored in the calculation. When set to 0.5, gaps will count half as much as other characters.

Returns :

The sum-of-pairs score of the alignment. :

This Page