summaryrefslogtreecommitdiff
path: root/lib/model.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/model.rb
parent308ed58dc56815317f89654a0cc4ab7fb70a9f31 (diff)
Algorithms and Models are modules instead of classes.
Diffstat (limited to 'lib/model.rb')
-rw-r--r--lib/model.rb23
1 files changed, 21 insertions, 2 deletions
diff --git a/lib/model.rb b/lib/model.rb
index e49eff3..1dbac6d 100644
--- a/lib/model.rb
+++ b/lib/model.rb
@@ -1,7 +1,7 @@
module OpenTox
- class Model
-
+ module Model
+=begin
# Run a model with parameters
# @param params [Hash] Parameters for OpenTox model
# @param wait [optional,OpenTox::Task] waiting_task (can be a OpenTox::Subtask as well), progress is updated accordingly
@@ -10,6 +10,7 @@ module OpenTox
uri = RestClientWrapper.post @uri, params, { :content_type => "text/uri-list", :subjectid => @subjectid}
wait_for_task uri if wait
end
+=end
def feature_type # CH: subjectid is a object variable, no need to pass it as a parameter
unless @feature_type
@@ -41,5 +42,23 @@ module OpenTox
end
end
+ class Generic
+ include OpenTox
+ include OpenTox::Algorithm
+ end
+
+ class Lazar
+ include OpenTox
+ include OpenTox::Algorithm
+ def self.create params
+ Lazar.new(File.join($algorithm[:uri], "lazar")).run params
+ end
+
+ def predict params
+ run params
+ end
+
+ end
+
end
end