[BioRuby] Error reading GenBank file

Urban Hafner urban at bettong.net
Wed Dec 7 03:39:30 EST 2005


On 7 Dec 2005, at 04:37, Toshiaki Katayama wrote:

I could not reproduce this error with this entry.

Strange.

I suspect that your input file is not in GenBank format but, for example,
saved in HTML or something?

OK. Here's the code again:

require 'bio'
fn = 'AJ271885.gb'
ff = Bio::FlatFile.auto(fn)
ff.each_entry do |gb|
  p gb.naseq.class
end

And that's what I get:

Bio::Sequence::NA
NoMethodError: undefined method `[]=' for nil:NilClass
        from /opt/local/lib/ruby/site_ruby/1.8/bio/db.rb:223:in `tag_cut'
        from
/opt/local/lib/ruby/site_ruby/1.8/bio/db/genbank/common.rb:239:in
`origin'
        from
/opt/local/lib/ruby/site_ruby/1.8/bio/db/genbank/genbank.rb:72:in
`naseq'
        from (irb):10
        from (irb):9:in `each_entry'
        from (irb):9

To download the file I used the 'Save to file' drop down on the site.
(http://www.ncbi.nlm.nih.gov/entrez/viewer.fcgi?db=nucleotide&val=11342587).
Just to make sure, here's the file I used:
http://bettong.net/mail/AJ271885.gb.gz

Thanks again for the help. I very much appreciate it.

Urban



More information about the BioRuby mailing list