summaryrefslogtreecommitdiff
path: root/application.rb
diff options
context:
space:
mode:
Diffstat (limited to 'application.rb')
-rw-r--r--application.rb36
1 files changed, 26 insertions, 10 deletions
diff --git a/application.rb b/application.rb
index f5b331f..4908917 100644
--- a/application.rb
+++ b/application.rb
@@ -1,17 +1,33 @@
+# Java Klimbim
+ENV["JAVA_HOME"] = "/usr/lib/jvm/java-6-sun" unless ENV["JAVA_HOME"]
+ENV["JOELIB2"] = File.join File.expand_path(File.dirname(__FILE__)),"java"
+deps = []
+deps << "#{ENV["JAVA_HOME"]}/lib/tools.jar"
+deps << "#{ENV["JAVA_HOME"]}/lib/classes.jar"
+deps << "#{ENV["JOELIB2"]}"
+jars = Dir[ENV["JOELIB2"]+"/*.jar"].collect {|f| File.expand_path(f) }
+deps = deps + jars
+ENV["CLASSPATH"] = deps.join(":")
+
require 'rubygems'
-# AM LAST: can include both libs, no problems
-require File.join(File.expand_path(File.dirname(__FILE__)), 'libfminer/libbbrc/bbrc') # has to be included before openbabel, otherwise we have strange SWIG overloading problems
-require File.join(File.expand_path(File.dirname(__FILE__)), 'libfminer/liblast/last') # has to be included before openbabel, otherwise we have strange SWIG overloading problems
-require File.join(File.expand_path(File.dirname(__FILE__)), 'last-utils/lu.rb') # AM LAST
-gem "opentox-ruby", "~> 3"
+
+
+# fminer libs to be included before openbabel, otherwise strange SWIG overloading problems
+require File.join(File.expand_path(File.dirname(__FILE__)), 'libfminer/libbbrc/bbrc')
+require File.join(File.expand_path(File.dirname(__FILE__)), 'libfminer/liblast/last')
+require File.join(File.expand_path(File.dirname(__FILE__)), 'last-utils/lu.rb')
+
+gem "opentox-ruby", "~> 4"
require 'opentox-ruby'
+require 'rjb'
+require 'rinruby'
+
-#require 'smarts.rb'
-#require 'similarity.rb'
-require 'openbabel.rb'
+# main
require 'fminer.rb'
require 'lazar.rb'
-require 'feature_selection.rb'
+require 'fs.rb'
+require 'pc.rb'
set :lock, true
@@ -23,7 +39,7 @@ end
#
# @return [text/uri-list] algorithm URIs
get '/?' do
- list = [ url_for('/lazar', :full), url_for('/fminer/bbrc', :full), url_for('/fminer/last', :full), url_for('/feature_selection/rfe', :full) ].join("\n") + "\n"
+ list = [ url_for('/lazar', :full), url_for('/fminer/bbrc', :full), url_for('/fminer/bbrc/sample', :full), url_for('/fminer/last', :full), url_for('/fminer/bbrc/match', :full), url_for('/fminer/last/match', :full), url_for('/feature_selection/rfe', :full), url_for('/pc', :full) ].join("\n") + "\n"
case request.env['HTTP_ACCEPT']
when /text\/html/
content_type "text/html"