From 9e99495ecbff147218023c136bade9e56a502fed Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Thu, 13 Oct 2016 14:39:04 +0200 Subject: descriptor tests fixed --- lib/model.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/model.rb') diff --git a/lib/model.rb b/lib/model.rb index 859df8b..7029c31 100644 --- a/lib/model.rb +++ b/lib/model.rb @@ -131,7 +131,7 @@ module OpenTox end else # parse independent_variables - if (model.algorithms[:descriptors] & ["PhysChem::OPENBABEL","PhysChem::CDK","PhysChem::JOELIB"]).empty? + if (model.algorithms[:descriptors] & [PhysChem::OPENBABEL,PhysChem::CDK,PhysChem::JOELIB]).empty? properties = model.substances.collect { |s| s.properties } all_property_ids = properties.collect{|p| p.keys}.flatten.uniq model.descriptor_ids = all_property_ids.select{|id| model.algorithms[:descriptors].include? Feature.find(id).category } @@ -139,7 +139,7 @@ module OpenTox # calculate physchem properties else - properties = model.substances.collect { |s| s.calculated_properties(model.algorithms[:descriptors]) } + properties = model.substances.collect { |s| s.calculate_properties(model.algorithms[:descriptors]) } model.descriptor_ids = properties.collect{|p| p.keys}.flatten.uniq model.independent_variables = model.descriptor_ids.collect{|i| properties.collect{|p| p[i]}} end -- cgit v1.2.3