summaryrefslogtreecommitdiff
path: root/lib/model.rb
diff options
context:
space:
mode:
authorhelma@in-silico.ch <helma@in-silico.ch>2018-11-13 14:32:09 +0100
committerhelma@in-silico.ch <helma@in-silico.ch>2018-11-13 14:32:09 +0100
commit6e23be652ad90c747aaccf15258bdaa4458185a4 (patch)
treebcd9fe38d492217d00f983bab119bbb44588a837 /lib/model.rb
parent8649795b3d5d63f227eed030286270b91ec39c68 (diff)
public dataset download
Diffstat (limited to 'lib/model.rb')
-rw-r--r--lib/model.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/model.rb b/lib/model.rb
index 966460b..70ae43c 100644
--- a/lib/model.rb
+++ b/lib/model.rb
@@ -422,6 +422,7 @@ module OpenTox
field :species, type: String
field :source, type: String
field :unit, type: String
+ field :warnings, type: Array
field :model_id, type: BSON::ObjectId
field :repeated_crossvalidation_id, type: BSON::ObjectId
@@ -494,7 +495,7 @@ module OpenTox
# Create and validate a lazar model from a csv file with training data and a json file with metadata
# @param [File] CSV file with two columns. The first line should contain either SMILES or InChI (first column) and the endpoint (second column). The first column should contain either the SMILES or InChI of the training compounds, the second column the training compounds toxic activities (qualitative or quantitative). Use -log10 transformed values for regression datasets. Add metadata to a JSON file with the same basename containing the fields "species", "endpoint", "source" and "unit" (regression only). You can find example training data at https://github.com/opentox/lazar-public-data.
- # @return [OpenTox::Model::Validation] lazar model with three independent 10-fold crossvalidations
+ # @return [OpenTox::Model::Validation] lazar model with five independent 10-fold crossvalidations
def self.from_csv_file file
metadata_file = file.sub(/csv$/,"json")
bad_request_error "No metadata file #{metadata_file}" unless File.exist? metadata_file