diff options
author | Andreas Maunz <andreas@maunz.de> | 2011-05-11 01:37:47 -0700 |
---|---|---|
committer | Andreas Maunz <andreas@maunz.de> | 2011-05-11 01:37:47 -0700 |
commit | 5b9783ef4eee9a15e801c5781848d5bc9e488110 (patch) | |
tree | 6a775471f87fdbc53adacd5272da7a4e444b0cc0 | |
parent | 4a47f3efb6f61b02b11f413ecf35705b0fac2ed9 (diff) |
Hotfix: p_value and SMARTS matching
-rw-r--r-- | fminer.rb | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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] }, |