[Tutor] Phyton script for fasta file (seek help)

Ali Torkamani torkamani at gmail.com
Wed Apr 10 19:56:12 CEST 2013


On Wed, Apr 10, 2013 at 8:32 AM, Danny Yoo <dyoo at hashcollision.org> wrote:

> Hi Ali,
>
> Again, I recommend not reinventing a FASTA parser unless you really
> need something custom here.  In this particular case, the function
> ReadFasta here is slow on large inputs.  The culprit is the set of
> lines:
>
>             if line[0]=='>':
>                 prevLine=line[1:]
>                 dictFasta[prevLine]=''
>             else:
>

Sure, I myself use biopythin as well, but just wanted to mention that it's
not a big hassle, in particular if you need to load it just once. You have
a very legitimate point about the order of execution of my suggested code.

Ali
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130410/e4eb4b06/attachment.html>


More information about the Tutor mailing list