[BioRuby] Error reading ABIF SangerChromatogram data

Bryan Sibert sibert at wisc.edu
Thu Jun 7 19:24:36 UTC 2012


Hello,

I am using BioRuby 1.4.2 on Ruby 1.9.3 installed on a 64-bit Windows Vista
machine.  I am trying to read some .ab1 files using the BioRuby ABIF class
which inherits SangerChromatogram.  Ruby raises a NoMethodError when I
attempt this.  Below is a simple program based up on the example usage
provided in the documentation:

   require 'bio'
   chromatogram_ff = Bio::Abif.open("120605M4_05H_9.ab1")
   chromatogram = chromatogram_ff.next_entry

This raises the following error:

   C:\...\Desktop>test

C:/Ruby193/lib/ruby/gems/1.9.1/gems/bio-1.4.2/lib/bio/db/sanger_chromatogram/abif.rb:107:in
`get_entry_data': undefined method `match' for nil:NilClass (NoMethodError)
        from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/bio-1.4.2/lib/bio/db/sanger_chromatogram/abif.rb:85:in
`block in get_directory_entries'
        from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/bio-1.4.2/lib/bio/db/sanger_chromatogram/abif.rb:77:in
`times'
        from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/bio-1.4.2/lib/bio/db/sanger_chromatogram/abif.rb:77:in
`get_directory_entries'
        from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/bio-1.4.2/lib/bio/db/sanger_chromatogram/abif.rb:42:in
`initialize'
        from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/bio-1.4.2/lib/bio/io/flatfile/splitter.rb:55:in
`new'
        from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/bio-1.4.2/lib/bio/io/flatfile/splitter.rb:55:in
`get_parsed_entry'
        from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/bio-1.4.2/lib/bio/io/flatfile.rb:288:in
`next_entry'
        from C:/.../Desktop/test.rb:3:in `<main>'


I am at a loss as to how to fix this.  If you have any ideas, please let me
know.

Thanks,

Bryan



More information about the BioRuby mailing list