summaryrefslogtreecommitdiff
path: root/lib/opentox-client.rb
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2013-07-02 19:23:01 +0200
committerChristoph Helma <helma@in-silico.ch>2013-07-02 19:23:01 +0200
commit6c35e3f8369ba96cb251eac487424bd949fdcf6c (patch)
treeefb13808cfd022793800460a729bf0b583284d21 /lib/opentox-client.rb
parent308ed58dc56815317f89654a0cc4ab7fb70a9f31 (diff)
Algorithms and Models are modules instead of classes.
Diffstat (limited to 'lib/opentox-client.rb')
-rw-r--r--lib/opentox-client.rb12
1 files changed, 10 insertions, 2 deletions
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 }