Class: Bio::BlastXMLParser::XmlIterator
- Inherits:
-
Object
- Object
- Bio::BlastXMLParser::XmlIterator
- Defined in:
- lib/bio/db/blast/xmliterator.rb
Overview
Iterate a BLAST file yielding (lazy) results
Instance Method Summary collapse
-
#initialize(blastfilename) ⇒ XmlIterator
constructor
A new instance of XmlIterator.
- #to_enum ⇒ Object
Constructor Details
#initialize(blastfilename) ⇒ XmlIterator
Returns a new instance of XmlIterator.
8 9 10 |
# File 'lib/bio/db/blast/xmliterator.rb', line 8 def initialize blastfilename @fn = blastfilename end |
Instance Method Details
#to_enum ⇒ Object
12 13 14 15 16 |
# File 'lib/bio/db/blast/xmliterator.rb', line 12 def to_enum logger = Bio::Log::LoggerPlus['bio-blastxmlparser'] logger.info("parsing (:nosplit) #{@fn}") NokogiriBlastXml.new(File.new(@fn)).to_enum end |