From 3fe0e8c735abd2cacc138f075b5a4af0c6359724 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Wed, 14 Jul 2010 13:56:50 +0200 Subject: model creation working, validation report generation fails for large datasets --- lib/compound.rb | 13 ++++++++++--- lib/templates/config.yaml | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/compound.rb b/lib/compound.rb index 7c7c3d8..a293df0 100644 --- a/lib/compound.rb +++ b/lib/compound.rb @@ -1,3 +1,6 @@ +@@cactus_uri="http://cactus.nci.nih.gov/chemical/structure/" +@@ambit_uri="http://ambit.uni-plovdiv.bg:8080/ambit2/depict/cdk?search=" + module OpenTox class Compound #< OpenTox @@ -6,7 +9,6 @@ module OpenTox # Initialize with :uri => uri, :smiles => smiles or :name => name (name can be also an InChI/InChiKey, CAS number, etc) def initialize(params) - @@cactus_uri="http://cactus.nci.nih.gov/chemical/structure/" if params[:smiles] @inchi = smiles2inchi(params[:smiles]) @uri = File.join(@@config[:services]["opentox-compound"],URI.escape(@inchi)) @@ -45,12 +47,17 @@ module OpenTox obconversion(@inchi,'inchi','sdf') end - def image + def gif RestClientWrapper.get("#{@@cactus_uri}#{@inchi}/image") end + def png + RestClientWrapper.get("#{@@ambit_uri}#{smiles}") + end + def image_uri - "#{@@cactus_uri}#{@inchi}/image" + "#{@@ambit_uri}#{smiles}" + #"#{@@cactus_uri}#{@inchi}/image" end # Matchs a smarts string diff --git a/lib/templates/config.yaml b/lib/templates/config.yaml index dba0bf3..b367af3 100644 --- a/lib/templates/config.yaml +++ b/lib/templates/config.yaml @@ -30,7 +30,7 @@ opentox-algorithm: "http://localhost/algorithm/" opentox-model: "http://localhost/model/" opentox-task: "http://localhost/task/" - opentox-validation: "http://opentox.informatik.uni-freiburg.de/validation/" + opentox-validation: "http://localhost/validation/" # # Accept headers: # -- cgit v1.2.3