[BioRuby-cvs] bioruby/lib/bio/db/embl format_embl.rb, 1.1.2.1, 1.1.2.2

Naohisa Goto ngoto at dev.open-bio.org
Thu Mar 27 13:38:33 UTC 2008


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

Modified Files:
      Tag: BRANCH-biohackathon2008
	format_embl.rb 
Log Message:
Example code in sequence.rb written by Jan Aerts is moved to
test/functional/bio/sequence/test_output_embl.rb.
Fixed a bug in lib/bio/db/embl/format_embl.rb: failed to output when 
features or references are nil. This bug is found by above test code.


Index: format_embl.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/db/embl/Attic/format_embl.rb,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** format_embl.rb	4 Mar 2008 11:16:57 -0000	1.1.2.1
--- format_embl.rb	27 Mar 2008 13:38:31 -0000	1.1.2.2
***************
*** 56,64 ****
  <%= embl_wrap('OC   ', classification.join('; ') + '.') %>
  XX   
! <%= references.collect{|ref| ref.format('embl')}.join("\n") %>
  XX
  FH   Key             Location/Qualifiers
  FH
! <%= format_features_embl(features) %>XX
  SQ   Sequence <%= seq.length %> BP; <%= seq.composition.collect{|k,v| "#{v} #{k.upcase}"}.join('; ') + '; ' + (seq.gsub(/[ACTGactg]/, '').length.to_s ) + ' other;' %>
  <%= seq_format_embl(seq) %>
--- 56,64 ----
  <%= embl_wrap('OC   ', classification.join('; ') + '.') %>
  XX   
! <%= (references || []).collect{|ref| ref.format('embl')}.join("\n") %>
  XX
  FH   Key             Location/Qualifiers
  FH
! <%= format_features_embl(features || []) %>XX
  SQ   Sequence <%= seq.length %> BP; <%= seq.composition.collect{|k,v| "#{v} #{k.upcase}"}.join('; ') + '; ' + (seq.gsub(/[ACTGactg]/, '').length.to_s ) + ' other;' %>
  <%= seq_format_embl(seq) %>




More information about the bioruby-cvs mailing list