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

Fungazid fungazid at yahoo.com
Tue Jul 7 19:19:33 UTC 2009


Hi David,

I am working with a version of this cookbook that suits my needs. Right now I do not have extremely existing things to add to the cookbook, but I am working with this code and maybe I can track something important (hopefully not bugs ;) ).

Thanks,
Avi

--- On Tue, 7/7/09, David WInter <winda002 at student.otago.ac.nz> wrote:

> From: David WInter <winda002 at student.otago.ac.nz>
> Subject: Re: [Biopython] suggestion for a little change in the ACE cookbook
> To: "Fungazid" <fungazid at yahoo.com>
> Cc: biopython at lists.open-bio.org
> Date: Tuesday, July 7, 2009, 2:31 AM
> Fungazid wrote:
> > 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'
> >   
> 
> Yep, well spotted. It seems I'd also put an ugly hack in
> the 'pad_ends' function to deal with the problem (cutting
> the read to length before returning it) so we can get rid to
> that too ;) I've changed the code on the wiki.
> 
> As for adding 'x's instead of '-'s - I think this is really
> going to be a case by case thing - the contigs I had to play
> with had asterisks for gaps in the reads so I could tell the
> difference (and for some strange reason I'm squeamish about
> using letters to represent a gap even if 'x' is not an
> ambiguity code). Do you want to add something to the recipe
> to make it clear that someone could change the 'pad
> character' to suit the assembly you are using?
> 
> Cheers,
> David
> 
> 
> 
> 
> 
> 
> 


      




More information about the Biopython mailing list