bio 0.7.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. data/bin/bioruby +71 -27
  2. data/bin/br_biofetch.rb +5 -17
  3. data/bin/br_bioflat.rb +14 -26
  4. data/bin/br_biogetseq.rb +6 -18
  5. data/bin/br_pmfetch.rb +6 -16
  6. data/doc/Changes-0.7.rd +35 -0
  7. data/doc/KEGG_API.rd +287 -172
  8. data/doc/KEGG_API.rd.ja +273 -160
  9. data/doc/Tutorial.rd +18 -9
  10. data/doc/Tutorial.rd.ja +656 -138
  11. data/lib/bio.rb +6 -24
  12. data/lib/bio/alignment.rb +5 -5
  13. data/lib/bio/appl/blast.rb +132 -98
  14. data/lib/bio/appl/blast/format0.rb +9 -19
  15. data/lib/bio/appl/blast/wublast.rb +5 -18
  16. data/lib/bio/appl/emboss.rb +40 -47
  17. data/lib/bio/appl/hmmer.rb +116 -82
  18. data/lib/bio/appl/hmmer/report.rb +509 -364
  19. data/lib/bio/appl/spidey/report.rb +7 -18
  20. data/lib/bio/data/na.rb +3 -21
  21. data/lib/bio/db.rb +3 -21
  22. data/lib/bio/db/aaindex.rb +147 -52
  23. data/lib/bio/db/embl/common.rb +27 -6
  24. data/lib/bio/db/embl/embl.rb +18 -10
  25. data/lib/bio/db/embl/sptr.rb +87 -67
  26. data/lib/bio/db/embl/swissprot.rb +32 -3
  27. data/lib/bio/db/embl/trembl.rb +32 -3
  28. data/lib/bio/db/embl/uniprot.rb +32 -3
  29. data/lib/bio/db/fasta.rb +327 -289
  30. data/lib/bio/db/medline.rb +25 -4
  31. data/lib/bio/db/nbrf.rb +12 -20
  32. data/lib/bio/db/pdb.rb +4 -1
  33. data/lib/bio/db/pdb/chemicalcomponent.rb +240 -0
  34. data/lib/bio/db/pdb/pdb.rb +13 -8
  35. data/lib/bio/db/rebase.rb +93 -97
  36. data/lib/bio/feature.rb +2 -31
  37. data/lib/bio/io/ddbjxml.rb +167 -139
  38. data/lib/bio/io/fastacmd.rb +89 -56
  39. data/lib/bio/io/flatfile.rb +994 -278
  40. data/lib/bio/io/flatfile/index.rb +257 -194
  41. data/lib/bio/io/flatfile/indexer.rb +37 -29
  42. data/lib/bio/reference.rb +147 -64
  43. data/lib/bio/sequence.rb +57 -417
  44. data/lib/bio/sequence/aa.rb +64 -0
  45. data/lib/bio/sequence/common.rb +175 -0
  46. data/lib/bio/sequence/compat.rb +68 -0
  47. data/lib/bio/sequence/format.rb +134 -0
  48. data/lib/bio/sequence/generic.rb +24 -0
  49. data/lib/bio/sequence/na.rb +189 -0
  50. data/lib/bio/shell.rb +9 -23
  51. data/lib/bio/shell/core.rb +130 -125
  52. data/lib/bio/shell/demo.rb +143 -0
  53. data/lib/bio/shell/{session.rb → interface.rb} +42 -40
  54. data/lib/bio/shell/object.rb +52 -0
  55. data/lib/bio/shell/plugin/codon.rb +4 -22
  56. data/lib/bio/shell/plugin/emboss.rb +23 -0
  57. data/lib/bio/shell/plugin/entry.rb +34 -25
  58. data/lib/bio/shell/plugin/flatfile.rb +5 -23
  59. data/lib/bio/shell/plugin/keggapi.rb +11 -24
  60. data/lib/bio/shell/plugin/midi.rb +5 -23
  61. data/lib/bio/shell/plugin/obda.rb +4 -22
  62. data/lib/bio/shell/plugin/seq.rb +6 -24
  63. data/lib/bio/shell/rails/Rakefile +10 -0
  64. data/lib/bio/shell/rails/app/controllers/application.rb +4 -0
  65. data/lib/bio/shell/rails/app/controllers/shell_controller.rb +94 -0
  66. data/lib/bio/shell/rails/app/helpers/application_helper.rb +3 -0
  67. data/lib/bio/shell/rails/app/models/shell_connection.rb +30 -0
  68. data/lib/bio/shell/rails/app/views/layouts/shell.rhtml +37 -0
  69. data/lib/bio/shell/rails/app/views/shell/history.rhtml +5 -0
  70. data/lib/bio/shell/rails/app/views/shell/index.rhtml +2 -0
  71. data/lib/bio/shell/rails/app/views/shell/show.rhtml +13 -0
  72. data/lib/bio/shell/rails/config/boot.rb +19 -0
  73. data/lib/bio/shell/rails/config/database.yml +85 -0
  74. data/lib/bio/shell/rails/config/environment.rb +53 -0
  75. data/lib/bio/shell/rails/config/environments/development.rb +19 -0
  76. data/lib/bio/shell/rails/config/environments/production.rb +19 -0
  77. data/lib/bio/shell/rails/config/environments/test.rb +19 -0
  78. data/lib/bio/shell/rails/config/routes.rb +19 -0
  79. data/lib/bio/shell/rails/doc/README_FOR_APP +2 -0
  80. data/lib/bio/shell/rails/public/404.html +8 -0
  81. data/lib/bio/shell/rails/public/500.html +8 -0
  82. data/lib/bio/shell/rails/public/dispatch.cgi +10 -0
  83. data/lib/bio/shell/rails/public/dispatch.fcgi +24 -0
  84. data/lib/bio/shell/rails/public/dispatch.rb +10 -0
  85. data/lib/bio/shell/rails/public/favicon.ico +0 -0
  86. data/lib/bio/shell/rails/public/images/icon.png +0 -0
  87. data/lib/bio/shell/rails/public/images/rails.png +0 -0
  88. data/lib/bio/shell/rails/public/index.html +277 -0
  89. data/lib/bio/shell/rails/public/javascripts/controls.js +750 -0
  90. data/lib/bio/shell/rails/public/javascripts/dragdrop.js +584 -0
  91. data/lib/bio/shell/rails/public/javascripts/effects.js +854 -0
  92. data/lib/bio/shell/rails/public/javascripts/prototype.js +1785 -0
  93. data/lib/bio/shell/rails/public/robots.txt +1 -0
  94. data/lib/bio/shell/rails/public/stylesheets/main.css +187 -0
  95. data/lib/bio/shell/rails/script/about +3 -0
  96. data/lib/bio/shell/rails/script/breakpointer +3 -0
  97. data/lib/bio/shell/rails/script/console +3 -0
  98. data/lib/bio/shell/rails/script/destroy +3 -0
  99. data/lib/bio/shell/rails/script/generate +3 -0
  100. data/lib/bio/shell/rails/script/performance/benchmarker +3 -0
  101. data/lib/bio/shell/rails/script/performance/profiler +3 -0
  102. data/lib/bio/shell/rails/script/plugin +3 -0
  103. data/lib/bio/shell/rails/script/process/reaper +3 -0
  104. data/lib/bio/shell/rails/script/process/spawner +3 -0
  105. data/lib/bio/shell/rails/script/process/spinner +3 -0
  106. data/lib/bio/shell/rails/script/runner +3 -0
  107. data/lib/bio/shell/rails/script/server +42 -0
  108. data/lib/bio/shell/rails/test/test_helper.rb +28 -0
  109. data/lib/bio/shell/web.rb +90 -0
  110. data/lib/bio/util/contingency_table.rb +231 -225
  111. data/sample/any2fasta.rb +59 -0
  112. data/test/data/HMMER/hmmpfam.out +64 -0
  113. data/test/data/HMMER/hmmsearch.out +88 -0
  114. data/test/data/aaindex/DAYM780301 +30 -0
  115. data/test/data/aaindex/PRAM900102 +20 -0
  116. data/test/data/bl2seq/cd8a_cd8b_blastp.bl2seq +53 -0
  117. data/test/data/bl2seq/cd8a_p53_e-5blastp.bl2seq +37 -0
  118. data/test/data/blast/{eco:b0002.faa → b0002.faa} +0 -0
  119. data/test/data/blast/{eco:b0002.faa.m0 → b0002.faa.m0} +2 -2
  120. data/test/data/blast/{eco:b0002.faa.m7 → b0002.faa.m7} +1 -1
  121. data/test/data/blast/{eco:b0002.faa.m8 → b0002.faa.m8} +0 -0
  122. data/test/unit/bio/appl/bl2seq/test_report.rb +134 -0
  123. data/test/unit/bio/appl/blast/test_report.rb +15 -12
  124. data/test/unit/bio/appl/blast/test_xmlparser.rb +4 -4
  125. data/test/unit/bio/appl/hmmer/test_report.rb +355 -0
  126. data/test/unit/bio/appl/test_blast.rb +5 -5
  127. data/test/unit/bio/data/test_na.rb +9 -18
  128. data/test/unit/bio/db/pdb/test_pdb.rb +169 -0
  129. data/test/unit/bio/db/test_aaindex.rb +197 -0
  130. data/test/unit/bio/io/test_fastacmd.rb +55 -0
  131. data/test/unit/bio/sequence/test_aa.rb +102 -0
  132. data/test/unit/bio/sequence/test_common.rb +178 -0
  133. data/test/unit/bio/sequence/test_compat.rb +82 -0
  134. data/test/unit/bio/sequence/test_na.rb +242 -0
  135. data/test/unit/bio/shell/plugin/test_seq.rb +29 -19
  136. data/test/unit/bio/test_alignment.rb +15 -7
  137. data/test/unit/bio/test_reference.rb +198 -0
  138. data/test/unit/bio/test_sequence.rb +4 -49
  139. data/test/unit/bio/test_shell.rb +2 -2
  140. metadata +118 -15
  141. data/lib/bio/io/brdb.rb +0 -103
  142. data/lib/bioruby.rb +0 -34
@@ -1,29 +1,11 @@
1
1
  #
2
2
  # = bio/shell/plugin/flatfile.rb - plugin for flatfile database
3
3
  #
4
- # Copyright:: Copyright (C) 2005
5
- # Toshiaki Katayama <k@bioruby.org>
6
- # License:: LGPL
4
+ # Copyright:: Copyright (C) 2005
5
+ # Toshiaki Katayama <k@bioruby.org>
6
+ # License: Ruby's
7
7
  #
8
- # $Id: flatfile.rb,v 1.11 2005/11/30 01:57:18 k Exp $
9
- #
10
- #--
11
- #
12
- # This library is free software; you can redistribute it and/or
13
- # modify it under the terms of the GNU Lesser General Public
14
- # License as published by the Free Software Foundation; either
15
- # version 2 of the License, or (at your option) any later version.
16
- #
17
- # This library is distributed in the hope that it will be useful,
18
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
19
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
- # Lesser General Public License for more details.
21
- #
22
- # You should have received a copy of the GNU Lesser General Public
23
- # License along with this library; if not, write to the Free Software
24
- # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25
- #
26
- #++
8
+ # $Id: flatfile.rb,v 1.12 2006/02/09 20:48:53 k Exp $
27
9
  #
28
10
 
29
11
  module Bio::Shell
@@ -86,8 +68,8 @@ module Bio::Shell
86
68
  end
87
69
 
88
70
  def flatindex(dbname, *flatfiles)
89
- dir = Bio::Shell.create_flat_dir(dbname)
90
71
  begin
72
+ dir = Bio::Shell.create_flat_dir(dbname)
91
73
  print "Creating BioFlat index (#{dir}) ... "
92
74
  bdb = format = options = nil
93
75
  Bio::FlatFileIndex.makeindex(bdb, dir, format, options, *flatfiles)
@@ -1,29 +1,11 @@
1
1
  #
2
2
  # = bio/shell/plugin/keggapi.rb - plugin for KEGG API
3
3
  #
4
- # Copyright:: Copyright (C) 2005
5
- # Toshiaki Katayama <k@bioruby.org>
6
- # License:: LGPL
4
+ # Copyright:: Copyright (C) 2005
5
+ # Toshiaki Katayama <k@bioruby.org>
6
+ # License:: Ruby's
7
7
  #
8
- # $Id: keggapi.rb,v 1.8 2005/12/18 15:47:33 k Exp $
9
- #
10
- #--
11
- #
12
- # This library is free software; you can redistribute it and/or
13
- # modify it under the terms of the GNU Lesser General Public
14
- # License as published by the Free Software Foundation; either
15
- # version 2 of the License, or (at your option) any later version.
16
- #
17
- # This library is distributed in the hope that it will be useful,
18
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
19
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
- # Lesser General Public License for more details.
21
- #
22
- # You should have received a copy of the GNU Lesser General Public
23
- # License along with this library; if not, write to the Free Software
24
- # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25
- #
26
- #++
8
+ # $Id: keggapi.rb,v 1.10 2006/02/09 20:48:53 k Exp $
27
9
  #
28
10
 
29
11
  module Bio::Shell
@@ -40,8 +22,13 @@ module Bio::Shell
40
22
 
41
23
  private
42
24
 
43
- def keggapi
44
- @keggapi ||= Bio::KEGG::API.new
25
+ def keggapi(wsdl = nil)
26
+ if wsdl
27
+ @keggapi = Bio::KEGG::API.new(wsdl)
28
+ else
29
+ @keggapi ||= Bio::KEGG::API.new
30
+ end
31
+ return @keggapi
45
32
  end
46
33
 
47
34
  # DBGET
@@ -1,30 +1,12 @@
1
1
  #
2
2
  # = bio/shell/plugin/midi.rb - Sequence to MIDI converter
3
3
  #
4
- # Copyright:: Copyright (C) 2003, 2005
5
- # Natsuhiro Ichinose <ichinose@genome.ist.i.kyoto-u.ac.jp>,
6
- # Toshiaki Katayama <k@bioruby.org>
7
- # License:: LGPL
4
+ # Copyright:: Copyright (C) 2003, 2005
5
+ # Natsuhiro Ichinose <ichinose@genome.ist.i.kyoto-u.ac.jp>,
6
+ # Toshiaki Katayama <k@bioruby.org>
7
+ # License:: Ruby's
8
8
  #
9
- # $Id: midi.rb,v 1.6 2005/11/28 12:06:18 k Exp $
10
- #
11
- #--
12
- #
13
- # This library is free software; you can redistribute it and/or
14
- # modify it under the terms of the GNU Lesser General Public
15
- # License as published by the Free Software Foundation; either
16
- # version 2 of the License, or (at your option) any later version.
17
- #
18
- # This library is distributed in the hope that it will be useful,
19
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
20
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21
- # Lesser General Public License for more details.
22
- #
23
- # You should have received a copy of the GNU Lesser General Public
24
- # License along with this library; if not, write to the Free Software
25
- # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26
- #
27
- #++
9
+ # $Id: midi.rb,v 1.7 2006/02/09 20:48:53 k Exp $
28
10
  #
29
11
 
30
12
  #--
@@ -1,29 +1,11 @@
1
1
  #
2
2
  # = bio/shell/plugin/obda.rb - plugin for OBDA
3
3
  #
4
- # Copyright:: Copyright (C) 2005
5
- # Toshiaki Katayama <k@bioruby.org>
6
- # License:: LGPL
4
+ # Copyright:: Copyright (C) 2005
5
+ # Toshiaki Katayama <k@bioruby.org>
6
+ # License: Ruby's
7
7
  #
8
- # $Id: obda.rb,v 1.8 2005/11/30 02:01:04 k Exp $
9
- #
10
- #--
11
- #
12
- # This library is free software; you can redistribute it and/or
13
- # modify it under the terms of the GNU Lesser General Public
14
- # License as published by the Free Software Foundation; either
15
- # version 2 of the License, or (at your option) any later version.
16
- #
17
- # This library is distributed in the hope that it will be useful,
18
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
19
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
- # Lesser General Public License for more details.
21
- #
22
- # You should have received a copy of the GNU Lesser General Public
23
- # License along with this library; if not, write to the Free Software
24
- # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25
- #
26
- #++
8
+ # $Id: obda.rb,v 1.9 2006/02/09 20:48:53 k Exp $
27
9
  #
28
10
 
29
11
  module Bio::Shell
@@ -1,29 +1,11 @@
1
1
  #
2
2
  # = bio/shell/plugin/seq.rb - plugin for biological sequence manipulations
3
3
  #
4
- # Copyright:: Copyright (C) 2005
5
- # Toshiaki Katayama <k@bioruby.org>
6
- # License:: LGPL
4
+ # Copyright:: Copyright (C) 2005
5
+ # Toshiaki Katayama <k@bioruby.org>
6
+ # License:: Ruby's
7
7
  #
8
- # $Id: seq.rb,v 1.16 2005/12/19 01:20:06 k Exp $
9
- #
10
- #--
11
- #
12
- # This library is free software; you can redistribute it and/or
13
- # modify it under the terms of the GNU Lesser General Public
14
- # License as published by the Free Software Foundation; either
15
- # version 2 of the License, or (at your option) any later version.
16
- #
17
- # This library is distributed in the hope that it will be useful,
18
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
19
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
- # Lesser General Public License for more details.
21
- #
22
- # You should have received a copy of the GNU Lesser General Public
23
- # License along with this library; if not, write to the Free Software
24
- # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25
- #
26
- #++
8
+ # $Id: seq.rb,v 1.17 2006/02/09 20:48:53 k Exp $
27
9
  #
28
10
 
29
11
  module Bio::Shell
@@ -210,14 +192,14 @@ class String
210
192
  while n < self.length
211
193
  pos = self[n, size].rindex(separater)
212
194
 
213
- if self[n, size].length < size # last line of the folded str
195
+ if self[n, size].length < size # last line of the folded str
214
196
  pos = nil
215
197
  end
216
198
 
217
199
  if pos
218
200
  ary << self[n, pos+separater.length]
219
201
  n += pos + separater.length
220
- else # line too long or the last line
202
+ else # line too long or the last line
221
203
  ary << self[n, size]
222
204
  n += size
223
205
  end
@@ -0,0 +1,10 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/switchtower.rake, and they will automatically be available to Rake.
3
+
4
+ require(File.join(File.dirname(__FILE__), 'config', 'boot'))
5
+
6
+ require 'rake'
7
+ require 'rake/testtask'
8
+ require 'rake/rdoctask'
9
+
10
+ require 'tasks/rails'
@@ -0,0 +1,4 @@
1
+ # Filters added to this controller will be run for all controllers in the application.
2
+ # Likewise, all the methods added will be available for all controllers.
3
+ class ApplicationController < ActionController::Base
4
+ end
@@ -0,0 +1,94 @@
1
+ class DocumentRegistry
2
+
3
+ @@registry = []
4
+
5
+ def self.[](class_name)
6
+ @@registry.each do |block|
7
+ url = block.call(class_name)
8
+ return url if url
9
+ end
10
+ ""
11
+ end
12
+
13
+ def self.register &block
14
+ @@registry.push(block)
15
+ end
16
+
17
+ end
18
+
19
+ DocumentRegistry.register() do |class_name|
20
+ if m = /Bio::(.+)/.match(class_name)
21
+ "http://bioruby.org/rdoc/classes/Bio/#{m[1].split('::').join('/')}.html"
22
+ else
23
+ false
24
+ end
25
+ end
26
+
27
+ DocumentRegistry.register do |class_name|
28
+ if m = /Chem::(.+)/.match(class_name)
29
+ "http://chemruby.org/rdoc/classes/Chem/#{m[1].split('::').join('/')}.html"
30
+ else
31
+ false
32
+ end
33
+ end
34
+
35
+ DocumentRegistry.register do |class_name|
36
+ "http://www.ruby-doc.org/core/classes/#{class_name.split('::').join('/')}.html"
37
+ end
38
+
39
+
40
+ class ShellController < ApplicationController
41
+
42
+ layout 'shell' #, :except => [:rss_feed, :rss_with_content]
43
+
44
+ def index
45
+ setup
46
+ end
47
+
48
+ def show
49
+ setup
50
+ @obj = $drb_server[params[:id]]
51
+ if @obj.nil?
52
+ @inheritance = "<h1>Unknown local variable! : #{params[:var]}</h1>"
53
+ else
54
+ @inheritance = get_inheritance @obj.class
55
+ if @obj.respond_to?(:to_html)
56
+ @contents = @obj.to_html
57
+ else
58
+ @contents = "Undefined :to_html"
59
+ end
60
+ end
61
+ @title = params[:id]
62
+ end
63
+
64
+ =begin
65
+ def history
66
+ setup
67
+ @history = File.read("session/history")
68
+ end
69
+ =end
70
+
71
+ private
72
+
73
+ def setup
74
+ @local_vars = $drb_server.registry
75
+ end
76
+
77
+ def get_inheritance obj
78
+ # mods = obj.included_modules - [PP::ObjectMixin, Bio::Shell, WEBrick]
79
+ mods = obj.included_modules
80
+ module_links = mods.collect{|m|
81
+ " [<a href=#{DocumentRegistry[m.to_s]}>#{m.to_s}</a>] "
82
+ }.join("|")
83
+
84
+ inherit = []
85
+ loop do
86
+ inherit.push(" [<a href=#{DocumentRegistry[obj.to_s]}>#{obj.to_s}</a>] ")
87
+ break if obj == Object
88
+ obj = obj.superclass
89
+ end
90
+ "<table><tr><th>Inheritance</th><td>" + inherit.join(" &lt; ") + "</td></tr>" +
91
+ "<tr><th>Mix-in</th><td>" + module_links + "</td</tr></table>"
92
+ end
93
+
94
+ end
@@ -0,0 +1,3 @@
1
+ # Methods added to this helper will be available to all templates in the application.
2
+ module ApplicationHelper
3
+ end
@@ -0,0 +1,30 @@
1
+ # Model object for rails
2
+ class ShellConnection
3
+
4
+ # include DRb::DRbObservable
5
+
6
+ attr_reader :registry
7
+
8
+ def puts_remote(str)
9
+ STDOUT.puts(str)
10
+ end
11
+
12
+ def initialize
13
+ @connected = false
14
+ @registry = {}
15
+ end
16
+
17
+ def [] o_id
18
+ @registry[o_id]
19
+ end
20
+
21
+ def []=(name, obj)
22
+ @registry[name] = obj
23
+ end
24
+
25
+ def delete(name)
26
+ @registry.delete(name)
27
+ end
28
+
29
+ end
30
+
@@ -0,0 +1,37 @@
1
+ <html>
2
+ <head>
3
+ <title>BioRuby shell on Rails</title>
4
+ <link href="/stylesheets/main.css" media="screen" rel="Stylesheet" type="text/css" />
5
+ </head>
6
+ <body>
7
+
8
+ <div id="side">
9
+ <img src="/images/icon.png">
10
+ <br>
11
+ <!--
12
+ <h2>Status</h2>
13
+ <ul><li><%= @connected ? "Not Connected" : "Connected" %></li></ul>
14
+ <h2>History</h2>
15
+ <ul>
16
+ <li>
17
+ <%= link_to "History", :action => "history" %>
18
+ </li>
19
+ </ul>
20
+ -->
21
+ <h2>Local variables</h2>
22
+ <ul>
23
+ <% @local_vars.each do |idx, var| %>
24
+ <li><%= link_to idx, {:action => "show", :id => idx}%></li>
25
+ <% end %>
26
+ </ul>
27
+
28
+ </div>
29
+
30
+ <div id="banner">
31
+ BioRuby shell on Rails
32
+ </div>
33
+
34
+ <div id="main">
35
+ <%= @content_for_layout %>
36
+ </div>
37
+ </body>
@@ -0,0 +1,5 @@
1
+ <!-- this file is temprally not used -- see shell_controller.rb#history -->
2
+ <pre>
3
+ <%= @history %>
4
+ </pre>
5
+
@@ -0,0 +1,2 @@
1
+
2
+ <h2>Connected!</h2>
@@ -0,0 +1,13 @@
1
+ <%= @inheritance %>
2
+
3
+ <%= @contents %>
4
+
5
+ <%= form_tag(:action => "show")%>
6
+ <!--
7
+ <table>
8
+ <tr><th>Memo</th></tr>
9
+ <tr><td><input type="submit"></td></tr>
10
+ </table>
11
+ -->
12
+ <%= end_form_tag %>
13
+
@@ -0,0 +1,19 @@
1
+ # Don't change this file. Configuration is done in config/environment.rb and config/environments/*.rb
2
+
3
+ unless defined?(RAILS_ROOT)
4
+ root_path = File.join(File.dirname(__FILE__), '..')
5
+ unless RUBY_PLATFORM =~ /mswin32/
6
+ require 'pathname'
7
+ root_path = Pathname.new(root_path).cleanpath(true).to_s
8
+ end
9
+ RAILS_ROOT = root_path
10
+ end
11
+
12
+ if File.directory?("#{RAILS_ROOT}/vendor/rails")
13
+ require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
14
+ else
15
+ require 'rubygems'
16
+ require 'initializer'
17
+ end
18
+
19
+ Rails::Initializer.run(:set_load_path)