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

## Description

KO (KEGG Orthology) entry parser.

## References

- www.genome.jp/dbget-bin/get_htext?KO
- ftp.genome.jp/pub/kegg/genes/ko

### Methods

dblinks dblinks_as_hash dblinks_as_strings definition entry_id genes genes_as_hash genes_as_strings keggclass keggclasses name names new pathways

### Included Modules

Common::DblinksAsHash Common::GenesAsHash

### Constants

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

### Public Class methods

new(entry)

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

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

dblinks_as_strings()

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

definition()

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

entry_id()

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

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

genes_as_strings()

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

keggclass()

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

keggclasses()

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

name()

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

names()

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

pathways()

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]