[BioRuby] Reading ab1 files in bioruby
George Githinji
georgkam at gmail.com
Sat Jul 7 03:35:59 UTC 2012
Dear list,
Is there a Bioruby best practice way of reading an ab1 chromatogram file?
I am processing a long list of ab1 chromatogram files like this
file= "filename"
chromatogram_ff = Bio::Abif.open(filename)
chromatogram_ff.each do |ch|
ch.to_seq
end
however I came across this error with some files
/Users/george/.rbenv/versions/1.9.3-p125/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 /Users/george/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/bio-1.4.2/lib/bio/db/sanger_chromatogram/abif.rb:83:in
`block in get_directory_entries'
from /Users/george/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/bio-1.4.2/lib/bio/db/sanger_chromatogram/abif.rb:77:in
`times'
from /Users/george/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/bio-1.4.2/lib/bio/db/sanger_chromatogram/abif.rb:77:in
`get_directory_entries'
from /Users/george/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/bio-1.4.2/lib/bio/db/sanger_chromatogram/abif.rb:42:in
`initialize'
from /Users/george/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/bio-1.4.2/lib/bio/io/flatfile/splitter.rb:55:in
`new'
from /Users/george/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/bio-1.4.2/lib/bio/io/flatfile/splitter.rb:55:in
`get_parsed_entry'
from /Users/george/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/bio-1.4.2/lib/bio/io/flatfile.rb:288:in
`next_entry'
from /Users/george/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/bio-1.4.2/lib/bio/io/flatfile.rb:335:in
`each_entry'
from parse_ab1.rb:11:in `<main>'
When I read the files that generated the error with convert_trace to
attempt to transform to scf trace, they are parsed properly meaning
their is an issue with the way the abif package works or the
bio::flatfile iteration procedure in bioruby. Are there known bugs?
some solution?
--
---------------
Sincerely
George
Skype: george_g2
Blog: http://biorelated.wordpress.com/
Twitter: http://twitter.com/#!/george_l
More information about the BioRuby
mailing list