[BioRuby-cvs] bioruby/lib/bio db.rb,0.37,0.38

Mitsuteru C. Nakao nakao at dev.open-bio.org
Tue May 8 17:02:15 UTC 2007


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

Modified Files:
	db.rb 
Log Message:
* Goto's embl parsing patch applied.
  http://lists.open-bio.org/pipermail/bioruby/2007-May/000383.html



Index: db.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/db.rb,v
retrieving revision 0.37
retrieving revision 0.38
diff -C2 -d -r0.37 -r0.38
*** db.rb	5 Apr 2007 23:35:39 -0000	0.37
--- db.rb	8 May 2007 17:02:13 -0000	0.38
***************
*** 314,323 ****
    # Returns the contents of the entry as a Hash.
    def entry2hash(entry)
!     hash = Hash.new('')
      entry.each_line do |line|
        tag = tag_get(line)
        next if tag == 'XX'
        tag = 'R' if tag =~ /^R./	# Reference lines
!       hash[tag] += line
      end
      return hash
--- 314,323 ----
    # Returns the contents of the entry as a Hash.
    def entry2hash(entry)
!     hash = Hash.new { |h,k| h[k] = '' }
      entry.each_line do |line|
        tag = tag_get(line)
        next if tag == 'XX'
        tag = 'R' if tag =~ /^R./	# Reference lines
!       hash[tag].concat line
      end
      return hash




More information about the bioruby-cvs mailing list