<div dir="ltr"><div>Hello Slowat,</div><div><br></div><div>Are you clear that there can be multiple equally scoring "best" alignments?</div><div>This means the details of how you sort or rank pairwise alignments is</div><div>important (i.e. how to tie-break alignments of the same score) and the</div><div>"best" alignment may differ with usage context.<br></div><div><br></div><div>Looking at the code in the old pairwise2 module, using one_alignment_only</div><div>simply returns the first alignment - it wasn't immediately obvious to me if</div><div>that would automatically be one of the top scoring alignments or not.<br></div><div><br></div><div>As far as I could see, the new PairwiseAligner docstring doesn't explicitly</div><div>comment on how the alignments returned are sorted either:<br></div><div><br></div><div><a href="https://github.com/biopython/biopython/blob/biopython-184/Bio/Align/__init__.py#L3759">https://github.com/biopython/biopython/blob/biopython-184/Bio/Align/__init__.py#L3759</a></div><div><br></div><div>This does need clarification, hopefully Markus or Michiel can comment.<br></div><br><div>Peter<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 14, 2024 at 11:46 AM Slowat <<a href="mailto:slowat0kela@gmail.com">slowat0kela@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello - <div><br></div><div>May I ask. I want to align two sequences, and return, for the optimal alignment only, the score, number of identities, mismatches, gaps etc.</div><div><br></div><div>I can see that this is possible by using the 'one_alignment_only=True' parameter in the pairwise2 module, however when I load the pairwise2 module, I get the message that this module is deprecated.</div><div><br></div><div>Using Bio.Align, I can see how you can obtain the .score for the best alignment, but not how to obtain the other information I require about the best alignment.</div><div><br></div><div>I don't want to loop through all the possible alignments, as this would be prohibitively time-consuming for me. Also, since the .score of the best alignment can be returned, it makes me think that the best alignment should be saved somewhere and I should be able to see it (even to calculate the gaps, identities and mismatches myself).</div><div><br></div><div>Could someone explain how to go about this, without using the deprecated pairwise2 module?</div><div><br></div><div>Thanks</div><div>Slowat</div></div>
_______________________________________________<br>
Biopython mailing list - <a href="mailto:Biopython@biopython.org" target="_blank">Biopython@biopython.org</a><br>
<a href="https://mailman.open-bio.org/mailman/listinfo/biopython" rel="noreferrer" target="_blank">https://mailman.open-bio.org/mailman/listinfo/biopython</a><br>
</blockquote></div>