From 5b9783ef4eee9a15e801c5781848d5bc9e488110 Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Wed, 11 May 2011 01:37:47 -0700 Subject: Hotfix: p_value and SMARTS matching --- fminer.rb | 7 +++---- 1 file 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] }, -- cgit v1.2.3