diff options
Diffstat (limited to 'lib/compound.rb')
-rw-r--r-- | lib/compound.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/compound.rb b/lib/compound.rb index 770f1b5..b180b15 100644 --- a/lib/compound.rb +++ b/lib/compound.rb @@ -246,8 +246,9 @@ module OpenTox 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 + ds.data_entries.each { |c_uri, values| + compound = OpenTox::Compound.new(c_uri) + if compound.to_inchi == self.to_inchi # Compare compounds by InChI entry = ds.data_entries[c_uri] break end |