class Bio::FlatFileIndex::Indexer::Parser::BlastDefaultParser

Constants

NAMESTYLE
PRIMARY
SECONDARY

Public Class Methods

new(klass, pri_name = nil, sec_names = nil) click to toggle source
    # File lib/bio/io/flatfile/indexer.rb
392 def initialize(klass, pri_name = nil, sec_names = nil)
393   super()
394   self.format = 'raw'
395   self.dbclass = klass
396   self.set_primary_namespace((pri_name or PRIMARY))
397   unless sec_names then
398     sec_names = []
399     @namestyle.each_value do |x|
400       sec_names << x.name if x.name != self.primary.name
401     end
402   end
403   self.add_secondary_namespaces(*sec_names)
404 end

Public Instance Methods

open_flatfile(fileid, file) click to toggle source
    # File lib/bio/io/flatfile/indexer.rb
405 def open_flatfile(fileid, file)
406   super
407   @flatfile.rewind
408   @flatfile.dbclass = nil
409   @flatfile.autodetect
410   @flatfile.dbclass = self.dbclass unless @flatfile.dbclass
411   @flatfile.rewind
412   begin
413     pos = @flatfile.pos
414     line = @flatfile.gets
415   end until (!line or line =~ /^T?BLAST/)
416   @flatfile.pos = pos
417 end