From 647e9a00b97259de3fbe89aba3ebfd5b1f489fe4 Mon Sep 17 00:00:00 2001 From: rautenberg Date: Mon, 14 Mar 2016 16:13:33 +0100 Subject: add list of SMILES to prediction --- api/api.json | 4 ++-- 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 -- cgit v1.2.3