diff options
author | rautenberg <rautenberg@in-silico.ch> | 2016-03-14 16:13:33 +0100 |
---|---|---|
committer | rautenberg <rautenberg@in-silico.ch> | 2016-03-14 16:13:33 +0100 |
commit | 647e9a00b97259de3fbe89aba3ebfd5b1f489fe4 (patch) | |
tree | 68154a8bb592bf6b9829a555daf66f140bf08882 | |
parent | 8772e255c7613e25ad68550911b3d646bba5f05f (diff) |
add list of SMILES to prediction
-rw-r--r-- | api/api.json | 4 | ||||
-rw-r--r-- | application.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/api/api.json b/api/api.json index 1c79845..c90e814 100644 --- a/api/api.json +++ b/api/api.json @@ -113,7 +113,7 @@ { "name": "identifier", "in": "formData", - "description": "SMILES identifier", + "description": "SMILES identifier or comma seperated list of SMILES identifiers", "required": true, "type": "string" }, @@ -431,4 +431,4 @@ "description": "Compound" } ] -}
\ No newline at end of file +} diff --git a/application.rb b/application.rb index 93447cf..c60d4fc 100644 --- a/application.rb +++ b/application.rb @@ -61,10 +61,10 @@ end post "/model/:id/?" do - identifier = params[:identifier] + identifier = params[:identifier].split(",") begin # get compound from SMILES - compound = Compound.from_smiles identifier + compound = identifier.collect{ |i| Compound.from_smiles i.strip } rescue @error_report = "Attention, '#{params[:identifier]}' is not a valid SMILES string." return @error_report |