[BioRuby] problem while handling large fasta files

K. Patil kpatil at science.uva.nl
Thu Sep 4 13:32:27 UTC 2008


Oops, sorry for incomplete information. Here it is;

Ruby: 1.8
Bioruby: 1.0.0
OS/CPU: 2.6.24.2.1.amd64-smp #1 SMP Mon Feb 11 12:43:21 UTC 2008 x86_64
GNU/Linux


Also I cannot upgrade Ruby/Bioruby easily as I don't have appropriate
permissions (all packages are installed by the administrator on request).

thanks and regards,
kaustubh


> Hi,
>
> Please show which BioRuby version, Ruby version, OS,
> architecture (type of CPU) you are using.
>
> Is the Ruby and/or BioRuby version older?
>
> Naohisa Goto
> ngoto at gen-info.osaka-u.ac.jp / ng at bioruby.org
>
> On Thu, 4 Sep 2008 14:02:19 +0200 (CEST)
> "K. Patil" <kpatil at science.uva.nl> wrote:
>
>> Hi,
>>
>> I am trying to do some simple processing on fasta files. It works file
>> for
>> small files (upto several MB). But as soon as I move to very large files
>> (e.g. 2.2 GB) the program crashes. Any help/suggestions highly
>> appreciated.
>>
>> Best regards,
>> Kaustubh Patil
>>
>> I am pasting a very simple example below (the file is 2.2GB);
>>
>> irb(main):021:0> fasta = Bio::FastaFormat.open("9606.2.fna")
>> => #<Bio::FlatFile:0x2b2484e9c4a0
>> @splitter=#<Bio::FlatFile::Splitter::Default:0x2b2484e9a420
>> @stream=#<Bio::FlatFile::BufferedInputStream:0x2b2484e9c158
>> @io=#<Bio::FlatFile::BufferedInputStream:0x2b2484e9c3b0
>> @io=#<File:9606.2.fna>, @buffer="", @path="9606.2.fna">,
>> @buffer=">9606.2.fna\ntaaccctaaccctaaccctaaccctaaccctaaccctaaccctaaccctaaccctaaccctaaccctaaccctaaccctaaccctaaccctaaccctaac\n",
>> @path="9606.2.fna">, @header=nil, @delimiter="\n>",
>> @delimiter_overrun=1>,
>> @firsttime_flag=true,
>> @stream=#<Bio::FlatFile::BufferedInputStream:0x2b2484e9c158
>> @io=#<Bio::FlatFile::BufferedInputStream:0x2b2484e9c3b0
>> @io=#<File:9606.2.fna>, @buffer="", @path="9606.2.fna">,
>> @buffer=">9606.2.fna\ntaaccctaaccctaaccctaaccctaaccctaaccctaaccctaaccctaaccctaaccctaaccctaaccctaaccctaaccctaaccctaaccctaac\n",
>> @path="9606.2.fna">, @skip_leader_mode=:firsttime, @raw=false,
>> @dbclass=Bio::FastaFormat>
>> irb(main):022:0> fasta.each do |seq|
>> irb(main):023:1* print seq.data
>> irb(main):024:1> end
>> NoMethodError: private method `sub' called for nil:NilClass
>>         from /usr/lib/ruby/1.8/bio/db/fasta.rb:156:in `initialize'
>>         from /usr/lib/ruby/1.8/bio/io/flatfile.rb:579:in `new'
>>         from /usr/lib/ruby/1.8/bio/io/flatfile.rb:579:in `next_entry'
>>         from /usr/lib/ruby/1.8/bio/io/flatfile.rb:609:in `each'
>>         from (irb):22
>>
>>
>> _______________________________________________
>> BioRuby mailing list
>> BioRuby at lists.open-bio.org
>> http://lists.open-bio.org/mailman/listinfo/bioruby
>
>
>





More information about the BioRuby mailing list