summaryrefslogtreecommitdiff
path: root/fminer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'fminer.rb')
-rw-r--r--fminer.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/fminer.rb b/fminer.rb
index da04431..94284db 100644
--- a/fminer.rb
+++ b/fminer.rb
@@ -281,7 +281,7 @@ post '/fminer/last/?' do
lu = LU.new # AM LAST: uses last-utils here
dom=lu.read(xml) # AM LAST: parse GraphML
smarts=lu.smarts_rb(dom,'nls') # AM LAST: converts patterns to LAST-SMARTS using msa variant (see last-pm.maunz.de)
- params[:nr_hits] != "true" ? hit_count=false: hit_count=true
+ params[:nr_hits] == "true" ? hit_count=true: hit_count=false
matches, counts = lu.match_rb(fminer.smi,smarts,hit_count) # AM LAST: creates instantiations
matches.each do |smarts, ids|
@@ -314,7 +314,7 @@ post '/fminer/last/?' do
feature_dataset.add_feature feature_uri, metadata
end
if !hit_count
- ids.each { |id| feature_dataset.add(fminer.compounds[id], feature_uri, true)}
+ ids.each { |id| feature_dataset.add(fminer.compounds[id], feature_uri, 1)}
else
ids.each_with_index { |id,i| feature_dataset.add(fminer.compounds[id], feature_uri, counts[smarts][i])}
end