Class: Bio::BlastXMLParser::XmlIterator

Inherits:
Object
  • Object
show all
Defined in:
lib/bio/db/blast/xmliterator.rb

Overview

Iterate a BLAST file yielding (lazy) results

Instance Method Summary collapse

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_enumObject



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