diff options
Diffstat (limited to 'application.rb')
-rw-r--r-- | application.rb | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/application.rb b/application.rb index f5b331f..ef123da 100644 --- a/application.rb +++ b/application.rb @@ -1,17 +1,32 @@ +# 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 + + +# 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", "~> 3" require 'opentox-ruby' +require 'rjb' + -#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 +38,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/last', :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" |