From 5d5688fbe43806af8523e5481715b5969feeab60 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Tue, 6 Oct 2009 10:39:43 +0200 Subject: Passes tests in opentox-test --- lib/compound.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/compound.rb') diff --git a/lib/compound.rb b/lib/compound.rb index 67c8004..c4ba8d9 100644 --- a/lib/compound.rb +++ b/lib/compound.rb @@ -10,13 +10,13 @@ module OpenTox @@cactus_uri="http://cactus.nci.nih.gov/chemical/structure/" if params[:smiles] @inchi = smiles2inchi(params[:smiles]) - @uri = File.join(@@config[:services]["opentox-dataset"],"compound",@inchi) + @uri = File.join(@@config[:services]["opentox-compound"],URI.escape(@inchi)) elsif params[:inchi] - @inchi = inchi - @uri = File.join(@@config[:services]["opentox-dataset"],"compound",@inchi) + @inchi = params[:inchi] + @uri = File.join(@@config[:services]["opentox-compound"],URI.escape(@inchi)) elsif params[:name] @inchi = RestClient.get "#{@@cactus_uri}#{params[:name]}/stdinchi" - @uri = File.join(@@config[:services]["opentox-dataset"],"compound",@inchi) + @uri = File.join(@@config[:services]["opentox-compound"],URI.escape(@inchi)) elsif params[:uri] @inchi = params[:uri].sub(/^.*InChI/, 'InChI') @uri = params[:uri] -- cgit v1.2.3