[BioRuby-cvs] bioruby/lib/bio/db/kegg ortholog.rb,1.7,1.8

Katayama Toshiaki k at dev.open-bio.org
Thu Apr 5 15:37:52 UTC 2007


Update of /home/repository/bioruby/bioruby/lib/bio/db/kegg
In directory dev.open-bio.org:/tmp/cvs-serv16283

Modified Files:
	ortholog.rb 
Log Message:
* Recently, KEGG KO database is renamed to KEGG ORTHOLOG, so we follow the change as
  * ko.rb is renamed to ortholog.rb
  * Bio::KEGG::KO is renamed to Bio::KEGG::ORTHOLOG
* genes and dblinks methods are rewrited to use lines_fetch


Index: ortholog.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/db/kegg/ortholog.rb,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** ortholog.rb	8 Mar 2007 00:20:21 -0000	1.7
--- ortholog.rb	5 Apr 2007 15:37:50 -0000	1.8
***************
*** 1,6 ****
  #
! # = bio/db/kegg/ko.rb - KO (KEGG Orthology) database class
  #
! # Copyright::  Copyright (C) 2003 Toshiaki Katayama <k at bioruby.org>
  # Copyright::  Copyright (C) 2003 Masumi Itoh <m at bioruby.org>
  #
--- 1,6 ----
  #
! # = bio/db/kegg/ortholog.rb - KEGG ORTHOLOG database class
  #
! # Copyright::  Copyright (C) 2003-2007 Toshiaki Katayama <k at bioruby.org>
  # Copyright::  Copyright (C) 2003 Masumi Itoh <m at bioruby.org>
  #
***************
*** 22,26 ****
  # * ftp://ftp.genome.jp/pub/kegg/tarfiles/ko
  #
! class KO < KEGGDB
    
    DELIMITER	= RS = "\n///\n"
--- 22,26 ----
  # * ftp://ftp.genome.jp/pub/kegg/tarfiles/ko
  #
! class ORTHOLOG < KEGGDB
    
    DELIMITER	= RS = "\n///\n"
***************
*** 70,80 ****
    def dblinks
      unless @data['DBLINKS']
!       hash = {}
!       get('DBLINKS').scan(/(\S+):\s*(.*)\n/).each do |k, v|
!         hash[k] = v.split(/\s+/)
!       end
!       @data['DBLINKS'] = hash
      end
!     @data['DBLINKS']		# Hash of DB:ID in DBLINKS
    end
  
--- 70,76 ----
    def dblinks
      unless @data['DBLINKS']
!       @data['DBLINKS'] = lines_fetch('DBLINKS')
      end
!     @data['DBLINKS']
    end
  
***************
*** 82,102 ****
    def genes
      unless @data['GENES']
!       hash = {}
!       k = ''
!       get('GENES').each_line do |line|
!         line.chomp!
!         line[0, @tagsize] = '' 
!         if line =~ /(\S+):/
!           k = $1
!           hash[k] = []
!         end
!         line[0, 5] = ''
!         line.gsub(/\(\S+/, '').each(' ') do |u|
!           hash[k] << u.strip
!         end
!       end
!       @data['GENES'] = hash
      end
!     @data['GENES']		# Hash of DB:ID in DBLINKS
    end
    
--- 78,84 ----
    def genes
      unless @data['GENES']
!       @data['GENES'] = lines_fetch('GENES')
      end
!     @data['GENES']
    end
    




More information about the bioruby-cvs mailing list