I had also the same problem and I wrote a function to do it using exonerate or blast, take a look at create_vector_striper_by_alignment in: http://bioinf.comav.upv.es/svn/biolib/biolib/src/biolib/seq_cleaner.py Jose Blanca