summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Maunz <andreas@maunz.de>2012-08-15 17:08:39 +0200
committerAndreas Maunz <andreas@maunz.de>2012-08-15 17:08:39 +0200
commit8aa613e3fc77fbb8372cc7d73e040841093e3a38 (patch)
tree5578d5ce1c34d19584351f6b6c9d1800bb5a9c01
parent703ed386347bfc32195e1dbda00b6d1391c481a8 (diff)
Adding only compounds found by BBRC
-rw-r--r--fminer.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/fminer.rb b/fminer.rb
index f796ee4..5fda98f 100644
--- a/fminer.rb
+++ b/fminer.rb
@@ -349,9 +349,9 @@ post '/fminer/bbrc/?' do
# Add fminer results to feature dataset along owd
which_row = @@fminer.training_dataset.compounds.inject({}) { |h,id| h[id]=0; h }
- fminer_compounds_owd.each { |compound|
+ unused_compounds = fminer_compounds_owd - fminer_results.keys
+ (fminer_compounds_owd - unused_compounds).each { |compound|
feature_dataset.add_compound(compound) # add compounds *in order*
- # select appropriate feature value
fminer_results[compound].each { |feature, values|
feature_dataset.add( compound, feature, values[which_row[compound]] )
}