diff options
author | Andreas Maunz <andreas@maunz.de> | 2012-10-12 10:18:48 +0200 |
---|---|---|
committer | Andreas Maunz <andreas@maunz.de> | 2012-10-12 10:18:48 +0200 |
commit | 7f444df4ebf060f8d175855d42c3cff69c6ab2de (patch) | |
tree | fae5e1683503bbdaa8a7c5236e3c79a0bfa0bc68 | |
parent | dc7ab074a06837544ae9fdc94d61640095d26271 (diff) |
Fixed last and match complete_entries
-rw-r--r-- | fminer.rb | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -603,7 +603,11 @@ post '/fminer/last/?' do feature_dataset.add_feature feature_uri, metadata @@fminer.compounds.collect.each_with_index { |cmpd,id| # This collects all cmpds that have an activity count_idx = matches[smarts].index(id) - feature_dataset.add_data_entry(cmpd, feature_uri, counts[smarts][count_idx]) if count_idx + if count_idx + feature_dataset.add_data_entry(cmpd, feature_uri, counts[smarts][count_idx]) + elsif complete_entries + feature_dataset.add_data_entry(cmpd, feature_uri, 0) + end } end @@ -671,7 +675,11 @@ post '/fminer/:method/match?' do feature_dataset.add_feature feature_uri, metadata @@fminer.compounds.collect.each_with_index { |cmpd,id| # This collects all cmpds that have an activity count_idx = matches[smarts].index(id) - feature_dataset.add_data_entry(cmpd, feature_uri, counts[smarts][count_idx]) if count_idx + if count_idx + feature_dataset.add_data_entry(cmpd, feature_uri, counts[smarts][count_idx]) + elsif complete_entries + feature_dataset.add_data_entry(cmpd, feature_uri, 0) + end } end |