From 4b0b5c10f74da95c1814716536891c802f20f7f3 Mon Sep 17 00:00:00 2001 From: davor Date: Fri, 20 Apr 2012 13:06:18 +0300 Subject: Added pc/jl log. --- ChangeLog | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5872d56..3e0f421 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,13 +1,17 @@ +2012-04-20 + * Support for joelib and openbabel descriptors in a completely unified interface with CDK (Ambit) + * Features can have multiple types (nominal and numeric), PC descriptors have detailed meta data + * Myriads of bugfixes to CSV download code (e.g. missing descriptors, handling of duplicates) + v3.1.0 2012-02-24 - * utils.rb: added for special routines (e.g. descriptor calculation) - * task.rb: Polling with increasing interval - * parser.rb: CSV up and download fixed - * transform.rb: routines to create machine learning data matrices - * algorithm.rb: SVM parameter grid search, cos similarity as algorithm, - gauss() removed + * utils.rb: added for special routines (e.g. descriptor calculation) + * task.rb: Polling with increasing interval + * parser.rb: CSV up and download fixed + * transform.rb: routines to create machine learning data matrices + * algorithm.rb: SVM parameter grid search, cos similarity as algorithm, gauss() removed v3.0.1 2011-10-19 - * feature: model registration to ontology service - * ontology lib gets endpoints from ontology service + * feature: model registration to ontology service + * ontology lib gets endpoints from ontology service v3.0.0 2011-09-23 - * datasets stored as json (with Yajl) to improve performance + * datasets stored as json (with Yajl) to improve performance -- cgit v1.2.3 From 34c95c24282adb28b4b347ad739da87914f4b338 Mon Sep 17 00:00:00 2001 From: davor Date: Fri, 20 Apr 2012 13:17:34 +0300 Subject: Undo changes (wrong branch). --- ChangeLog | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3e0f421..343cf37 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,3 @@ -2012-04-20 - * Support for joelib and openbabel descriptors in a completely unified interface with CDK (Ambit) - * Features can have multiple types (nominal and numeric), PC descriptors have detailed meta data - * Myriads of bugfixes to CSV download code (e.g. missing descriptors, handling of duplicates) - v3.1.0 2012-02-24 * utils.rb: added for special routines (e.g. descriptor calculation) * task.rb: Polling with increasing interval @@ -13,5 +8,6 @@ v3.1.0 2012-02-24 v3.0.1 2011-10-19 * feature: model registration to ontology service * ontology lib gets endpoints from ontology service + v3.0.0 2011-09-23 * datasets stored as json (with Yajl) to improve performance -- cgit v1.2.3 From 6e016d24bf6d0272d235c466e0dab3f196f0c0d4 Mon Sep 17 00:00:00 2001 From: davor Date: Tue, 15 May 2012 11:25:49 +0200 Subject: Checks if given URI is valid. At the beginning of the compound initialization. --- lib/compound.rb | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/lib/compound.rb b/lib/compound.rb index 8928081..16d266c 100644 --- a/lib/compound.rb +++ b/lib/compound.rb @@ -17,16 +17,20 @@ module OpenTox # @return [Compound] Compound def initialize(uri=nil) @uri = uri - case @uri - when /InChI/ # shortcut for IST services - @inchi = @uri.sub(/^.*InChI/, 'InChI') + if (@uri =~ URI::regexp) || @uri.nil? + case @uri + when /InChI/ # shortcut for IST services + @inchi = @uri.sub(/^.*InChI/, 'InChI') + else + @inchi = RestClientWrapper.get(@uri, :accept => 'chemical/x-inchi').to_s.chomp if @uri + end + + if @uri and @inchi.to_s.size==0 + LOGGER.warn "REMOVE ABMIT HACK: no inchi for compound "+@uri.to_s+", load via smiles" + @inchi = Compound.smiles2inchi(Compound.smiles(@uri)) + end else - @inchi = RestClientWrapper.get(@uri, :accept => 'chemical/x-inchi').to_s.chomp if @uri - end - - if @uri and @inchi.to_s.size==0 - LOGGER.warn "REMOVE ABMIT HACK: no inchi for compound "+@uri.to_s+", load via smiles" - @inchi = Compound.smiles2inchi(Compound.smiles(@uri)) + raise "Not able to create compound with uri: #{@uri}" end end -- cgit v1.2.3