[BioPython] Iterating through an alignment to calculate the number of gaps and their lengths

Matthew Abravanel vmatthewa at gmail.com
Wed Feb 6 21:21:47 UTC 2008


Hi Everyone,

I was wondering if anyone could help, I am trying to write a little python
script to iterate through an alignment and determine the number of gaps the
alignment has and their lengths and output that information as a list.
 Such as this made up alignemt:

 Seq1 ATT-AGC-C
 Seq2 AT--AGCTC

and your program runs and outputs like  2 gaps of length 1 outputted as a
list like this [1,1] or something like that. I am still learning about
python strings and iterators and am not sure how you would approach this?
Appreciate any help you could give. Thanks.

Sincerely,

                     Matthew



More information about the Biopython mailing list