[BioRuby] Error reading GenBank file
ktym at hgc.jp
Wed Dec 7 04:13:41 EST 2005
Your file contains extra "\n" after the GenBank delimiter //.
If you strip the last empty line from the input file, this bug won't occur.
And the following code also works.
gb = Bio::GenBank.new(ARGF.read)
So, it is a problem with Bio::FlatFile module.
I'll talk with Goto-san, the maintainer, on this.
On 2005/12/07, at 17:39, Urban Hafner wrote:
> On 7 Dec 2005, at 04:37, Toshiaki Katayama wrote:
> I could not reproduce this error with this entry.
> 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
> And that's what I get:
> NoMethodError: undefined method `=' for nil:NilClass
> from /opt/local/lib/ruby/site_ruby/1.8/bio/db.rb:223:in `tag_cut'
> 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.
> Just to make sure, here's the file I used:
> Thanks again for the help. I very much appreciate it.
> BioRuby mailing list
> BioRuby at open-bio.org
More information about the BioRuby