I am testing edlib for the purpose of calculating pairwise identites between sequences, using the BLAST/USEARCH definition of sequence identity; i.e. $\text{id} = \frac{\text{edit distance}}{\text{alignment length}}$. One difficulty I am finding is that there can be multiple alignments which have the same edit distance, but different lengths, even in the fully global case, because it may be possible to trade, e.g., 2 mismatches for 1 insertion and 1 deletion. This means that the pairwise identity is not uniquely defined. Is there any way for edlib to give me a maximally long and/or maximally short CIGAR, or even just calculate what the maximum and minimum lengths are?
If this is possible but would require some coding, I'd be willing to give it a shot if you give me some pointers.