Class: Bio::FlatFileIndex::Indexer::Parser::EMBLParser
- Inherits:
-
TemplateParser
- Object
- TemplateParser
- Bio::FlatFileIndex::Indexer::Parser::EMBLParser
- Defined in:
- lib/bio/io/flatfile/indexer.rb
Overview
class GenPeptParser
Direct Known Subclasses
Constant Summary collapse
- NAMESTYLE =
NameSpaces.new( NameSpace.new( 'ID', Proc.new { |x| x.entry_id } ), NameSpace.new( 'AC', Proc.new { |x| x.accessions } ), NameSpace.new( 'SV', Proc.new { |x| x.sv } ), NameSpace.new( 'DR', Proc.new { |x| y = [] x.dr.each_value { |z| y << z } y.flatten! y.find_all { |z| z.length > 1 } } ) )
- PRIMARY =
'ID'
- SECONDARY =
[ 'AC', 'SV' ]
Instance Attribute Summary
Attributes inherited from TemplateParser
#dbclass, #errorlog, #fileid, #format, #primary, #secondary
Instance Method Summary collapse
-
#initialize(pri_name = nil, sec_names = nil) ⇒ EMBLParser
constructor
A new instance of EMBLParser.
Methods inherited from TemplateParser
#add_secondary_namespaces, #close_flatfile, #each, #open_flatfile, #parse_primary, #parse_secondary, #set_primary_namespace
Constructor Details
#initialize(pri_name = nil, sec_names = nil) ⇒ EMBLParser
Returns a new instance of EMBLParser.
219 220 221 222 223 224 225 226 227 228 |
# File 'lib/bio/io/flatfile/indexer.rb', line 219 def initialize(pri_name = nil, sec_names = nil) super() self.format = 'embl' self.dbclass = Bio::EMBL self.set_primary_namespace((pri_name or PRIMARY)) unless sec_names then sec_names = self.class::SECONDARY end self.add_secondary_namespaces(*sec_names) end |