[Biopython] Getting aligned residues index

Ahmad Abdelzaher underoath006 at gmail.com
Tue Jun 5 17:11:09 UTC 2018


Hello,

I have the following code snippet:


from Bio import pairwise2

pacrg_fasta = 'DUDEWHEREISMYCAR'

model = 'MANWHEREISMYCAT'

alignments = pairwise2.align.globalxx(pacrg_fasta, model)
print(pairwise2.format_alignment(*alignments[0]))

The first matching letter is W. I want to be able to get the index of the
matching residues in a tuple, for example (4,3) for W, how can I do that
for all the matching residues?

Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.open-bio.org/pipermail/biopython/attachments/20180605/d6af1cab/attachment.html>


More information about the Biopython mailing list