[BioRuby-cvs] bioruby/lib/bio/db/embl embl.rb,1.29.2.2,1.29.2.3
Naohisa Goto
ngoto at dev.open-bio.org
Tue Mar 4 10:56:44 UTC 2008
Update of /home/repository/bioruby/bioruby/lib/bio/db/embl
In directory dev.open-bio.org:/tmp/cvs-serv7563/lib/bio/db/embl
Modified Files:
Tag: BRANCH-biohackathon2008
embl.rb
Log Message:
In Bio::EMBL#ft(), added "extend Bio::Features::BackwardCompatibility"
to keep backward compatibility.
Index: embl.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/db/embl/embl.rb,v
retrieving revision 1.29.2.2
retrieving revision 1.29.2.3
diff -C2 -d -r1.29.2.2 -r1.29.2.3
*** embl.rb 20 Feb 2008 09:56:22 -0000 1.29.2.2
--- embl.rb 4 Mar 2008 10:56:42 -0000 1.29.2.3
***************
*** 257,261 ****
def ft
unless @data['FT']
! @data['FT'] = Array.new
in_quote = false
@orig['FT'].each_line do |line|
--- 257,261 ----
def ft
unless @data['FT']
! ary = Array.new
in_quote = false
@orig['FT'].each_line do |line|
***************
*** 265,271 ****
body = line[20,60].chomp # feature value (position, /qualifier=)
if line =~ /^FT {3}(\S+)/
! @data['FT'].push([ $1, body ]) # [ feature, position, /q="data", ... ]
elsif body =~ /^ \// and not in_quote
! @data['FT'].last.push(body) # /q="data..., /q=data, /q
if body =~ /=" / and body !~ /"$/
--- 265,271 ----
body = line[20,60].chomp # feature value (position, /qualifier=)
if line =~ /^FT {3}(\S+)/
! ary.push([ $1, body ]) # [ feature, position, /q="data", ... ]
elsif body =~ /^ \// and not in_quote
! ary.last.push(body) # /q="data..., /q=data, /q
if body =~ /=" / and body !~ /"$/
***************
*** 274,278 ****
else
! @data['FT'].last.last << body # ...data..., ...data..."
if body =~ /"$/
--- 274,278 ----
else
! ary.last.last << body # ...data..., ...data..."
if body =~ /"$/
***************
*** 282,289 ****
end
! @data['FT'].map! do |subary|
parse_qualifiers(subary)
end
end
if block_given?
--- 282,290 ----
end
! ary.map! do |subary|
parse_qualifiers(subary)
end
+ @data['FT'] = ary.extend(Bio::Features::BackwardCompatibility)
end
if block_given?
***************
*** 445,447 ****
puts entry.to_biosequence.output(:embl)
end
! end
\ No newline at end of file
--- 446,448 ----
puts entry.to_biosequence.output(:embl)
end
! end
More information about the bioruby-cvs
mailing list