Module: Bio::FlatFileIndex::Indexer::Parser

Defined in:
lib/bio/io/flatfile/indexer.rb

Defined Under Namespace

Classes: BlastDefaultParser, EMBLParser, FastaFormatParser, GenBankParser, GenPeptParser, MaXMLClusterParser, MaXMLSequenceParser, PDBChemicalComponentParser, SPTRParser, TemplateParser

Class Method Summary collapse

Class Method Details

.new(format, *arg) ⇒ Object



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/bio/io/flatfile/indexer.rb', line 46

def self.new(format, *arg)
  case format.to_s
  when 'embl', 'Bio::EMBL'
    EMBLParser.new(*arg)
  when 'swiss', 'Bio::SPTR', 'Bio::TrEMBL', 'Bio::SwissProt'
    SPTRParser.new(*arg)
  when 'genbank', 'Bio::GenBank', 'Bio::RefSeq', 'Bio::DDBJ'
    GenBankParser.new(*arg)
  when 'Bio::GenPept'
    GenPeptParser.new(*arg)
  when 'fasta', 'Bio::FastaFormat'
    FastaFormatParser.new(*arg)
  when 'Bio::FANTOM::MaXML::Sequence'
    MaXMLSequenceParser.new(*arg)
  when 'Bio::FANTOM::MaXML::Cluster'
    MaXMLClusterParser.new(*arg)
  when 'Bio::Blast::Default::Report'
    BlastDefaultParser.new(Bio::Blast::Default::Report, *arg)
  when 'Bio::Blast::Default::Report_TBlast'
    BlastDefaultParser.new(Bio::Blast::Default::Report_TBlast, *arg)
  when 'Bio::Blast::WU::Report'
    BlastDefaultParser.new(Bio::Blast::WU::Report, *arg)
  when 'Bio::Blast::WU::Report_TBlast'
    BlastDefaultParser.new(Bio::Blast::WU::Report_TBlast, *arg)
  when 'Bio::PDB::ChemicalComponent'
    PDBChemicalComponentParser.new(Bio::PDB::ChemicalComponent, *arg)
  else
    raise 'unknown or unsupported format'
  end #case dbclass.to_s
end