summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Maunz <andreas@maunz.de>2011-05-11 01:37:47 -0700
committerAndreas Maunz <andreas@maunz.de>2011-05-11 01:37:47 -0700
commit5b9783ef4eee9a15e801c5781848d5bc9e488110 (patch)
tree6a775471f87fdbc53adacd5272da7a4e444b0cc0
parent4a47f3efb6f61b02b11f413ecf35705b0fac2ed9 (diff)
Hotfix: p_value and SMARTS matching
-rw-r--r--fminer.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/fminer.rb b/fminer.rb
index d706063..e0a0054 100644
--- a/fminer.rb
+++ b/fminer.rb
@@ -288,7 +288,7 @@ post '/fminer/last/?' do
smi = [] # AM LAST: needed for matching the patterns back
nr_active=0
nr_inactive=0
- all_activities = Hash.new# DV: for effect calculation in regression part
+ all_activities = Hash.new #DV: for effect calculation (class and regr)
training_dataset.data_entries.each do |compound,entry|
begin
@@ -332,6 +332,7 @@ post '/fminer/last/?' do
@@last.AddActivity(activity, id)
all_activities[id]=activity # DV: insert global information
compounds[id] = compound
+ smi[id] = smiles # AM LAST: changed this to store SMILES.
id += 1
rescue
LOGGER.warn "Could not add " + smiles + "\t" + value.to_s + " to fminer"
@@ -342,8 +343,6 @@ post '/fminer/last/?' do
end
end
- g_array=all_activities.values # DV: calculation of global median for effect calculation
- g_median=OpenTox::Algorithm.median(g_array)
raise "No compounds in dataset #{training_dataset.uri}" if compounds.size==0
@@ -375,7 +374,7 @@ post '/fminer/last/?' do
RDF.type => [OT.Substructure],
OT.hasSource => feature_dataset.uri,
OT.smarts => smarts,
- OT.pValue => p_value.to_f,
+ OT.pValue => p_value.to_f.abs,
OT.effect => effect,
OT.parameters => [
{ DC.title => "dataset_uri", OT.paramValue => params[:dataset_uri] },