[BioRuby-cvs] bioruby/lib/bio/db/embl common.rb,1.12.2.2,1.12.2.3
Naohisa Goto
ngoto at dev.open-bio.org
Wed Apr 23 18:04:53 UTC 2008
Update of /home/repository/bioruby/bioruby/lib/bio/db/embl
In directory dev.open-bio.org:/tmp/cvs-serv12842/lib/bio/db/embl
Modified Files:
Tag: BRANCH-biohackathon2008
common.rb
Log Message:
Part of changes made between 1.12 and 1.12.2.1 is incorporated with
modifications.
Index: common.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/db/embl/common.rb,v
retrieving revision 1.12.2.2
retrieving revision 1.12.2.3
diff -C2 -d -r1.12.2.2 -r1.12.2.3
*** common.rb 23 Apr 2008 17:34:15 -0000 1.12.2.2
--- common.rb 23 Apr 2008 18:04:51 -0000 1.12.2.3
***************
*** 74,77 ****
--- 74,78 ----
require 'bio/db'
require 'bio/reference'
+ require 'bio/compat/references'
module Bio
***************
*** 274,279 ****
ent.each {|key, value|
case key
when 'RA'
! hash['authors'] = value.split(/, /)
when 'RT'
hash['title'] = value
--- 275,288 ----
ent.each {|key, value|
case key
+ when 'RN'
+ if /\[(\d+)\]/ =~ value.to_s
+ hash['embl_gb_record_number'] = $1.to_i
+ end
+ when 'RC'
+ hash['comment'] = value
+ when 'RP'
+ hash['sequence_position'] = value
when 'RA'
! hash['authors'] = value.split(/\, /)
when 'RT'
hash['title'] = value
***************
*** 288,292 ****
hash['journal'] = value
end
! when 'RX' # PUBMED, MEDLINE
value.split(/\. /).each {|item|
tag, xref = item.split(/\; /).map {|i| i.strip.sub(/\.\z/, '') }
--- 297,301 ----
hash['journal'] = value
end
! when 'RX' # PUBMED, DOI, (AGRICOLA)
value.split(/\. /).each {|item|
tag, xref = item.split(/\; /).map {|i| i.strip.sub(/\.\z/, '') }
***************
*** 297,301 ****
Reference.new(hash)
}
! @data['references'] = References.new(ary)
end
@data['references']
--- 306,310 ----
Reference.new(hash)
}
! @data['references'] = ary.extend(Bio::References::BackwardCompatibility)
end
@data['references']
More information about the bioruby-cvs
mailing list