summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavor <vorgrimmlerdavid@gmx.de>2012-04-05 11:29:51 +0200
committerdavor <vorgrimmlerdavid@gmx.de>2012-04-05 11:29:51 +0200
commit9514a4647127c18bfb40f0008055e7aabd5ba607 (patch)
treec89a748c6d361183cfcb26ac1db8c932df8c72ed
parentad84654d513b68821496d2e08c1a399cf142910b (diff)
parent1111dbc2f0751802c63dd42f120d4cc64e4cc4d6 (diff)
Merge commit '1111dbc2f0751802c63dd42f120d4cc64e4cc4d6' into jl
Only merged lib/compound.rb
-rw-r--r--lib/compound.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/compound.rb b/lib/compound.rb
index 5024af1..6d3cb68 100644
--- a/lib/compound.rb
+++ b/lib/compound.rb
@@ -241,18 +241,16 @@ module OpenTox
# @param [String] Feature dataset uri
# @param [String] Comma separated pc types
# @return [Hash] Hash with feature name as key and value as value
- def lookup(feature_array,feature_dataset_uri,pc_type)
- ds = OpenTox::Dataset.find(feature_dataset_uri)
-
+ def lookup(feature_array,feature_dataset_uri,pc_type,subjectid=nil)
+ ds = OpenTox::Dataset.find(feature_dataset_uri,subjectid)
#entry = ds.data_entries[self.uri]
entry = nil
ds.data_entries.each { |c_uri, values|
if c_uri.split('/compound/').last == self.to_inchi
- entry = ds.data_entries[self.uri]
+ entry = ds.data_entries[c_uri]
break
end
}
-
LOGGER.debug "#{entry.size} entries in feature ds for query." unless entry.nil?
if entry.nil?
@@ -263,7 +261,6 @@ module OpenTox
ds.delete
temp_ds.delete
end
-
features = entry.keys
features.each { |feature|
new_feature = File.join(feature_dataset_uri, "feature", feature.split("/").last)