diff options
author | mr <mr@mrautenberg.de> | 2011-09-23 11:54:24 +0200 |
---|---|---|
committer | mr <mr@mrautenberg.de> | 2011-09-23 11:54:24 +0200 |
commit | 1492cf5ae9fd27a03b343d861673c33e55a2d135 (patch) | |
tree | 749a488abd5dd7fc2fc05fdd18c923c07a904b63 /fminer.rb | |
parent | fb072193eebcd9dc1d64e66456846c9a08297163 (diff) | |
parent | d6ddb236dbda13ba215e23ab8b1279874a8f380c (diff) |
Merge branch 'release/v3.0.0'
Diffstat (limited to 'fminer.rb')
-rw-r--r-- | fminer.rb | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |