summaryrefslogtreecommitdiff
path: root/prediction.rb
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2018-11-26 15:29:26 +0000
committergebele <gebele@in-silico.ch>2018-11-26 15:29:26 +0000
commit9750e0309500259e9a56e267ce87984fb5bb5e53 (patch)
tree17db0a8246578729e5309ef3bf4f71404c3f7479 /prediction.rb
parente3ae34a75ed7a503078c3c2cdf95f1500d6e2b73 (diff)
clean out; better response codes; prepare for batch
Diffstat (limited to 'prediction.rb')
-rw-r--r--prediction.rb35
1 files changed, 35 insertions, 0 deletions
diff --git a/prediction.rb b/prediction.rb
new file mode 100644
index 0000000..afceb08
--- /dev/null
+++ b/prediction.rb
@@ -0,0 +1,35 @@
+module OpenTox
+
+ class Prediction
+
+ include OpenTox
+ include Mongoid::Document
+ include Mongoid::Timestamps
+ store_in collection: "predictions"
+ field :compound, type: BSON::ObjectId
+ field :model, type: BSON::ObjectId
+ field :prediction, type: Hash, default:{}
+ field :csv, type: String
+
+ attr_accessor :compound, :model, :prediction, :csv
+
+ def compound
+ self[:compound]
+ end
+
+ def model
+ self[:model]
+ end
+
+ def prediction
+ self[:prediction]
+ end
+
+ def csv
+ self[:csv]
+ end
+
+ end
+
+end
+