Class Bio::KEGG::ORTHOLOGY
In: lib/bio/db/kegg/orthology.rb
Parent: KEGGDB

Methods

Included Modules

Common::DblinksAsHash Common::GenesAsHash

Constants

DELIMITER = RS = "\n///\n"
TAGSIZE = 12

Public Class methods

Reads a flat file format entry of the KO database.

[Source]

    # File lib/bio/db/kegg/orthology.rb, line 42
42:   def initialize(entry)
43:     super(entry, TAGSIZE)
44:   end

Public Instance methods

dblinks()

Alias for dblinks_as_hash

Returns a Hash of the DB name and an Array of entry IDs in DBLINKS field.

[Source]

    # File lib/bio/db/kegg/orthology.rb, line 33
33:   def dblinks_as_hash; super; end

Returns an Array of a database name and entry IDs in DBLINKS field.

[Source]

    # File lib/bio/db/kegg/orthology.rb, line 82
82:   def dblinks_as_strings
83:     lines_fetch('DBLINKS')
84:   end

Returns DEFINITION field of the entry.

[Source]

    # File lib/bio/db/kegg/orthology.rb, line 62
62:   def definition
63:     field_fetch('DEFINITION')
64:   end

Returns ID of the entry.

[Source]

    # File lib/bio/db/kegg/orthology.rb, line 47
47:   def entry_id
48:     field_fetch('ENTRY')[/\S+/]
49:   end
genes()

Alias for genes_as_hash

Returns a Hash of the organism ID and an Array of entry IDs in GENES field.

[Source]

    # File lib/bio/db/kegg/orthology.rb, line 38
38:   def genes_as_hash; super; end

Returns an Array of the organism ID and entry IDs in GENES field.

[Source]

    # File lib/bio/db/kegg/orthology.rb, line 87
87:   def genes_as_strings
88:     lines_fetch('GENES')
89:   end

Returns CLASS field of the entry.

[Source]

    # File lib/bio/db/kegg/orthology.rb, line 67
67:   def keggclass
68:     field_fetch('CLASS')
69:   end

Returns an Array of biological classes in CLASS field.

[Source]

    # File lib/bio/db/kegg/orthology.rb, line 72
72:   def keggclasses
73:     keggclass.gsub(/ \[[^\]]+/, '').split(/\] ?/)
74:   end

Returns NAME field of the entry.

[Source]

    # File lib/bio/db/kegg/orthology.rb, line 52
52:   def name
53:     field_fetch('NAME')
54:   end

Returns an Array of names in NAME field.

[Source]

    # File lib/bio/db/kegg/orthology.rb, line 57
57:   def names
58:     name.split(', ')
59:   end

Returns an Array of KEGG/PATHWAY ID in CLASS field.

[Source]

    # File lib/bio/db/kegg/orthology.rb, line 77
77:   def pathways
78:     keggclass.scan(/\[PATH:(.*?)\]/).flatten
79:   end

[Validate]