Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Bioinformatics: Slow Parsing of a Fasta File

by almut (Canon)
on Jul 27, 2010 at 19:25 UTC ( #851593=note: print w/ replies, xml ) Need Help??


in reply to Bioinformatics: Slow Parsing of a Fasta File

I've never used any BioPerl modules myself (so I cannot say anything about their performance in general), but half an hour for reading ~200MB sounds extremely long indeed.  That makes me wonder if the file is maybe not stored locally, i.e. you're doing I/O with some remote share...

Could you check if running something functionally similar, but without Bio::SeqIO — in its most simple case

while (<>) { print if /^>/; }

(or  perl -ne "print if /^>/" Test.fasta  as a one-liner)  takes similarly long?


Comment on Re: Bioinformatics: Slow Parsing of a Fasta File
Select or Download Code
Re^2: Bioinformatics: Slow Parsing of a Fasta File
by Anonymous Monk on Jul 28, 2010 at 06:38 UTC
    The code perl -ne "print if /^>/" test.fasta works just quite quickly.

    I am reading this file from the same folder that the program is in... While not wanting to resort to a regex to extract the sequences and their header information I believe this is going to be my only way through!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://851593]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2014-09-16 23:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (53 votes), past polls