diff options
author | Christoph Helma <helma@in-silico.ch> | 2016-06-02 17:54:48 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2016-06-02 17:54:48 +0200 |
commit | eec5bddbd35c9ecee8021128508d8718bccb4fe3 (patch) | |
tree | 93765b1f0b97415e7df5abdbcab7086f8c2fa7cf /lib/nanoparticle.rb | |
parent | 85f2308c101b4778508c2d767e08af4cfd671b7b (diff) |
local pls regression for nanoparticle proteomics
Diffstat (limited to 'lib/nanoparticle.rb')
-rw-r--r-- | lib/nanoparticle.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/nanoparticle.rb b/lib/nanoparticle.rb index 65aab23..3e29ae1 100644 --- a/lib/nanoparticle.rb +++ b/lib/nanoparticle.rb @@ -10,6 +10,7 @@ module OpenTox attr_accessor :scaled_values def physchem_neighbors min_sim: 0.9, dataset_id:, prediction_feature_id: + p name dataset = Dataset.find(dataset_id) relevant_features = {} measurements = [] @@ -46,6 +47,7 @@ module OpenTox end end end + #p relevant_features.keys.collect{|i| Feature.find(i).name} neighbors = [] substances.each do |substance| values = dataset.values(substance,prediction_feature_id) @@ -86,9 +88,12 @@ module OpenTox physchem_descriptors[feature.id.to_s] << value physchem_descriptors[feature.id.to_s].uniq! when "Proteomics" - proteomics[feature.id.to_s] ||= [] - proteomics[feature.id.to_s] << value - proteomics[feature.id.to_s].uniq! + #proteomics[feature.id.to_s] ||= [] + #proteomics[feature.id.to_s] << value + #proteomics[feature.id.to_s].uniq! + physchem_descriptors[feature.id.to_s] ||= [] + physchem_descriptors[feature.id.to_s] << value + physchem_descriptors[feature.id.to_s].uniq! when "TOX" if feature.name == "Total protein (BCA assay)" physchem_descriptors[feature.id.to_s] ||= [] @@ -109,6 +114,7 @@ module OpenTox def parse_ambit_value feature, v, dataset #p dataset #p feature + # TODO add study id to warnings v.delete "unit" # TODO: ppm instead of weights if v.keys == ["textValue"] |