class Bio::FlatFileIndex::Indexer::Parser::PDBChemicalComponentParser

Constants

NAMESTYLE
PRIMARY

Public Class Methods

new(klass, pri_name = nil, sec_names = nil) click to toggle source
    # File lib/bio/io/flatfile/indexer.rb
425 def initialize(klass, pri_name = nil, sec_names = nil)
426   super()
427   self.format = 'raw'
428   self.dbclass = Bio::PDB::ChemicalComponent
429   self.set_primary_namespace((pri_name or PRIMARY))
430   unless sec_names then
431     sec_names = []
432     @namestyle.each_value do |x|
433       sec_names << x.name if x.name != self.primary.name
434     end
435   end
436   self.add_secondary_namespaces(*sec_names)
437 end

Public Instance Methods

open_flatfile(fileid, file) click to toggle source
    # File lib/bio/io/flatfile/indexer.rb
438 def open_flatfile(fileid, file)
439   super
440   @flatfile.pos = 0
441   begin
442     pos = @flatfile.pos
443     line = @flatfile.gets
444   end until (!line or line =~ /^RESIDUE /)
445   @flatfile.pos = pos
446 end