From 6c35e3f8369ba96cb251eac487424bd949fdcf6c Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Tue, 2 Jul 2013 19:23:01 +0200 Subject: Algorithms and Models are modules instead of classes. --- lib/opentox-client.rb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'lib/opentox-client.rb') diff --git a/lib/opentox-client.rb b/lib/opentox-client.rb index 02724c2..f25f05a 100644 --- a/lib/opentox-client.rb +++ b/lib/opentox-client.rb @@ -10,6 +10,13 @@ require 'json' require 'logger' require "securerandom" +default_config = File.join(ENV["HOME"],".opentox","config","default.rb") +client_config = File.join(ENV["HOME"],".opentox","config","opentox-client.rb") + +puts "Could not find configuration files #{default_config} or #{client_config}" unless File.exist? default_config or File.exist? client_config +require default_config if File.exist? default_config +require client_config if File.exist? client_config + # define constants and global variables RDF::OT = RDF::Vocabulary.new 'http://www.opentox.org/api/1.2#' RDF::OT1 = RDF::Vocabulary.new 'http://www.opentox.org/api/1.1#' @@ -19,7 +26,8 @@ RDF::TB = RDF::Vocabulary.new "http://onto.toxbank.net/api/" RDF::ISA = RDF::Vocabulary.new "http://onto.toxbank.net/isa/" RDF::OWL = RDF::Vocabulary.new "http://www.w3.org/2002/07/owl#" -CLASSES = ["Generic", "Compound", "Feature", "Dataset", "Algorithm", "Model", "Validation", "Task", "Investigation"] +#CLASSES = ["Generic", "Compound", "Feature", "Dataset", "Algorithm", "Model", "Validation", "Task", "Investigation"] +CLASSES = ["Compound", "Feature", "Dataset", "Validation", "Task", "Investigation"] RDF_FORMATS = [:rdfxml,:ntriples,:turtle] # Regular expressions for parsing classification data @@ -38,8 +46,8 @@ FALSE_REGEXP = /^(false|inactive|0|0.0|low tox|deactivating|non-carcinogen|non-m "compound.rb", "feature.rb", "dataset.rb", - "model.rb", "algorithm.rb", + "model.rb", "validation.rb" ].each{ |f| require_relative f } -- cgit v1.2.3