diff options
author | Christoph Helma <helma@in-silico.ch> | 2017-09-12 16:24:49 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2017-09-12 16:24:49 +0200 |
commit | 0fb3651e65ab0a66710d5ad8aee978b08c4ac0c9 (patch) | |
tree | 9cb490b7f04bf3b7f6932d101badc6225c9f195d | |
parent | 23a612d1f266ee7ee2206d4430d39cd01050f3f5 (diff) |
-rw-r--r-- | kazius-alerts.gemspec | 2 | ||||
-rw-r--r-- | lib/kazius-alerts.rb | 21 |
2 files changed, 1 insertions, 22 deletions
diff --git a/kazius-alerts.gemspec b/kazius-alerts.gemspec index 1011dd5..0a2d0d1 100644 --- a/kazius-alerts.gemspec +++ b/kazius-alerts.gemspec @@ -1,6 +1,6 @@ Gem::Specification.new do |s| s.name = "kazius-alerts" - s.version = "0.0.3" + s.version = "0.0.4" s.authors = ["Christoph Helma"] s.email = ["helma@in-silico.ch"] s.homepage = "http://github.com/opentox/kazius-alerts" diff --git a/lib/kazius-alerts.rb b/lib/kazius-alerts.rb index 51811b7..e436739 100644 --- a/lib/kazius-alerts.rb +++ b/lib/kazius-alerts.rb @@ -83,24 +83,3 @@ class KaziusAlerts end end - -class ConsensusMutagenicity - - def self.predict smiles - sa_prediction = KaziusAlerts.predict smiles - lazar_prediction = Lazar.predict smiles - confidence = 0 - if sa_prediction[:prediction] == false && lazar_mutagenicity.prediction == 0 - confidence = 0.85 - elsif sa_prediction[:prediction] == true && lazar_mutagenicity.prediction == 1 - confidence = 0.85 * ( 1 - sa_prediction[:error_product] ) - elsif sa_prediction[:prediction] == false && lazar_mutagenicity.prediction == 1 - confidence = 0.11 - elsif sa_prediction[:prediction] == true && lazar_mutagenicity.prediction == 0 - confidence = ( 1 - sa_prediction[:error_product] ) - 0.57 - end - {:prediction => prediction, :confidence => confidence} - end - -end - |