summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2017-01-10 15:25:42 +0100
committerChristoph Helma <helma@in-silico.ch>2017-01-10 15:25:42 +0100
commit9636f06938619e7596ec19b65daba5dbe8c212c4 (patch)
tree9f71d1fdbf9cba100f28014e24876a3c9af049e3 /README.md
parentcdab5069ded9490afe81095059e9a407faf864d9 (diff)
Brief tutorial in README.md
Diffstat (limited to 'README.md')
-rw-r--r--README.md65
1 files changed, 64 insertions, 1 deletions
diff --git a/README.md b/README.md
index 431c8b9..6354606 100644
--- a/README.md
+++ b/README.md
@@ -26,10 +26,73 @@ Installation
The output should give you more verbose information that can help in debugging (e.g. to identify missing libraries).
+Tutorial
+--------
+
+Execute the following commands either from an interactive Ruby shell or a Ruby script:
+
+Create and use `lazar` models for small molecules
+.................................................
+
+#### Create a training dataset
+
+ Create a 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 [Github](https://github.com/opentox/lazar-public-data).
+
+#### Create and validate a `lazar` model with default algorithms and parameters
+
+ `validated_model = Model::Validation.create_from_csv_file EPAFHM_log10.csv`
+
+#### Inspect crossvalidation results
+
+ `validated_model.crossvalidations`
+
+#### Predict a new compound
+
+ Create a compound
+
+ `compound = Compound.from_smiles "NC(=O)OCCC"`
+
+ Predict Fathead Minnow Acute Toxicity
+
+ `validated_model.predict compound`
+
+#### Experiment with other algorithms
+
+ You can pass algorithms parameters to the `Model::Validation.create_from_csv_file` command. The [API documentation](http://rdoc.info/gems/lazar) provides detailed instructions.
+
+Create and use `lazar` nanoparticle models
+........................................
+
+#### Create and validate a `nano-lazar` model from eNanoMapper with default algorithms and parameters
+
+ `validated_model = Model::Validation.create_from_enanomapper`
+
+ This command will mirror the eNanoMapper database in the local database, create a `nano-lazar` model and validate it with five independent 10-fold crossvalidations.
+
+#### Inspect crossvalidation results
+
+ `validated_model.crossvalidations`
+
+#### Predict nanoparticle toxicities
+
+ Choose a random nanoparticle from the "Potein Corona" dataset
+ ```
+ training_dataset = Dataset.where(:name => "Protein Corona Fingerprinting Predicts the Cellular Interaction of Gold and Silver Nanoparticles").first
+ nanoparticle = training_dataset.substances.shuffle.first
+ ```
+
+ Predict the "Net Cell Association" endpoint
+
+ `validated_model.predict nanoparticle`
+
+#### Experiment with other datasets, endpoints and algorithms
+
+ You can pass training_dataset, prediction_feature and algorithms parameters to the `Model::Validation.create_from_enanomapper` command. The [API documentation](http://rdoc.info/gems/lazar) provides detailed instructions.
+
Documentation
-------------
* [API documentation](http://rdoc.info/gems/lazar)
Copyright
---------
-Copyright (c) 2009-2015 Christoph Helma, Martin Guetlein, Micha Rautenberg, Andreas Maunz, David Vorgrimmler, Denis Gebele. See LICENSE for details.
+Copyright (c) 2009-2017 Christoph Helma, Martin Guetlein, Micha Rautenberg, Andreas Maunz, David Vorgrimmler, Denis Gebele. See LICENSE for details.