score
#
- biotite.sequence.align.score(alignment, matrix, gap_penalty=-10, terminal_penalty=True)[source]#
Calculate the similarity score of an alignment.
If the alignment contains more than two sequences, all pairwise scores are counted.
- Parameters:
- alignmentAlignment
The alignment to calculate the identity for.
- matrixSubstitutionMatrix
The substitution matrix used for scoring.
- gap_penaltyint or (tuple, dtype=int), optional
If an integer is provided, the value will be interpreted as general gap penalty. If a tuple is provided, an affine gap penalty is used. The first integer in the tuple is the gap opening penalty, the second integer is the gap extension penalty. The values need to be negative. (Default: -10)
- terminal_penaltybool, optional
If true, gap penalties are applied to terminal gaps. (Default: True)
- Returns:
- scoreint
The similarity score.