Sequence.get_sequence_identity() — get sequence identity

get_sequence_identity(seq)
This returns the percentage sequence identity between this sequence and seq, which is defined as the number of identical aligned residues divided by the length of the shorter sequence. Only available for sequences in alignments.
Example: See Alignment.id_table() command.