summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormguetlein <martin.guetlein@gmail.com>2011-02-13 13:28:11 +0100
committermguetlein <martin.guetlein@gmail.com>2011-02-13 13:28:11 +0100
commit38c437943716bba2b634edac26e949f60f47463d (patch)
treee59bb4d266e0919fe0c29721d36cade0962bc6b3
parent7856b7f17ff65bebe078115d32325bef3e9cebdf (diff)
adding ambit hack to allow validation
-rwxr-xr-xlib/ot_predictions.rb13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/ot_predictions.rb b/lib/ot_predictions.rb
index 0b40e97..a3d0d11 100755
--- a/lib/ot_predictions.rb
+++ b/lib/ot_predictions.rb
@@ -24,11 +24,6 @@ module Lib
"', prediction_feature: '"+prediction_feature.to_s+"' "+
"', predicted_variable: '"+predicted_variable.to_s+"'")
- if prediction_feature =~ /ambit.uni-plovdiv.bg.*feature.*264185/
- LOGGER.warn "HACK for report example"
- prediction_feature = "http://ambit.uni-plovdiv.bg:8080/ambit2/feature/264187"
- end
-
predicted_variable=prediction_feature if predicted_variable==nil
test_dataset = OpenTox::Dataset.find test_dataset_uri,subjectid
@@ -94,6 +89,14 @@ module Lib
raise msg
end
end
+
+ #AMBIT HACK
+ if @compounds[0]=~/ambit/ and @compounds[0]=~/conformer/
+ LOGGER.warn "AMBIT HACK, removing conformer endings in test-datset"
+ @compounds.each do |c|
+ c.gsub!(/\/conformer.*/,"")
+ end
+ end
raise "more predicted than test compounds test:"+@compounds.size.to_s+" < prediction:"+
prediction_dataset.compounds.size.to_s if @compounds.size < prediction_dataset.compounds.size