diff options
author | ot1 <andreas@maunz.de> | 2011-11-30 10:57:51 +0100 |
---|---|---|
committer | ot1 <andreas@maunz.de> | 2011-11-30 10:57:51 +0100 |
commit | cf51ec4c836a62bccd745593b6519d7b178d9f73 (patch) | |
tree | 14dd2bb9adbd98d267e1b439d3508031a4fe613a | |
parent | d90f40f0ed81f8ac6bdb81a5a1043cc564b76c95 (diff) |
Fixed bug: missing SMILES entry
-rw-r--r-- | lib/utils.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/utils.rb b/lib/utils.rb index f742fcc..0ff9d84 100644 --- a/lib/utils.rb +++ b/lib/utils.rb @@ -216,10 +216,12 @@ module OpenTox # build matrix in same order as input neighbors matrix = [] params[:neighbors].each { |c| - key = OpenTox::Compound.new(c[:compound]).to_smiles # extract connection table from Inchi + key = OpenTox::Compound.new(c[:compound]).to_smiles row = [] headers.each { |f| - row << ((pc_descriptors[key][f] == "") ? nil : pc_descriptors[key][f].to_f) + entry = nil + entry = ((pc_descriptors[key][f] == "") ? nil : pc_descriptors[key][f].to_f) if pc_descriptors[key] + row << entry } matrix << row } |