[BioRuby] Problems with Bl2seq parser
Trevor Wennblom
trevor at corevx.com
Thu Sep 8 18:10:54 EDT 2005
Hi, I seem to be running into some problems with the new Bl2seq parser.
Ideally I'd like to be able to read the report the same way as blast
reports:
Bio::Blast::Bl2seq::Report.xmlparser(filename_bl2seq_output).each do |hit|
a = hit.identity
end
xmlparser is undefined however, so we can try this:
Bio::Blast::Bl2seq::Report.new(filename_bl2seq_output).each do |hit|
a = hit.identity
end
This doesn't give an error, but it wont read the report either. This
can be double checked with:
Bio::Blast::Bl2seq::Report.new(filename_bl2seq_output).to_yaml
What I have to do is the following:
Bio::FlatFile.open(Bio::Blast::Bl2seq::Report, filename_bl2seq_output)
do |ff|
ff.each do |rep|
rep.iterations.each do |itr|
itr.hits.each do |hit|
a = hit.identity
end
end
end
end
That's an awful lot of work for what should be a one-liner. Am I doing
something wrong here?
Thanks,
Trevor
More information about the BioRuby
mailing list