[BioRuby-cvs] bioruby/lib/bio/db/embl common.rb,1.12.2.4,1.12.2.5

Naohisa Goto ngoto at dev.open-bio.org
Wed May 7 12:22:13 UTC 2008


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

Modified Files:
      Tag: BRANCH-biohackathon2008
	common.rb 
Log Message:
In Bio::EMBL#references method, authors' names are changed to be normalized
as of GenBank-like style. For example, "van der Waals J.D." in EMBL is
normalized into "van der Waals, J.D.".


Index: common.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/db/embl/common.rb,v
retrieving revision 1.12.2.4
retrieving revision 1.12.2.5
diff -C2 -d -r1.12.2.4 -r1.12.2.5
*** common.rb	23 Apr 2008 18:52:18 -0000	1.12.2.4
--- common.rb	7 May 2008 12:22:10 -0000	1.12.2.5
***************
*** 272,276 ****
      unless @data['references']
        ary = self.ref.map {|ent|
!         hash = Hash.new('')
          ent.each {|key, value|
            case key
--- 272,276 ----
      unless @data['references']
        ary = self.ref.map {|ent|
!         hash = Hash.new
          ent.each {|key, value|
            case key
***************
*** 287,291 ****
              hash['sequence_position'] = value
            when 'RA'
!             hash['authors'] = value.split(/\, /)
            when 'RT'
              hash['title'] = value
--- 287,295 ----
              hash['sequence_position'] = value
            when 'RA'
!             a = value.split(/\, /)
!             a.each do |x|
!               x.sub!(/( [^ ]+)\z/, ",\\1")
!             end
!             hash['authors'] = a
            when 'RT'
              hash['title'] = value




More information about the bioruby-cvs mailing list