[Biopython] suggestion for a little change in the ACE cookbook

Fungazid fungazid at yahoo.com
Sun Jul 5 18:57:08 EDT 2009



Hi,

About the cookbook here
http://biopython.org/wiki/ACE_contig_to_alignment

instead of:

def cut_ends(read, start, end):
  return (start-1) * '-' + read[start-1:end] + (end +1) * '-'

I think it is better to write:

def cut_ends(self,read, start, end):
    return (start-1) * 'x' + read[start-1:end-1] + (len(read)-end) * 'x'

The 2 changes are:
1) correcting the coordinates of the clipped 5' region
2) adding 'x' instead of '-' to separate the clipped region from the gaps





      


More information about the Biopython mailing list