diff options
author | Andreas Maunz <andreas@maunz.de> | 2011-07-27 15:26:36 +0200 |
---|---|---|
committer | Andreas Maunz <andreas@maunz.de> | 2011-07-27 15:26:36 +0200 |
commit | b1b51fcef2a0640f46cdfd5c4ca116bc659c86b9 (patch) | |
tree | bb4713394cb29a090e87675422ca7b377410815b | |
parent | ade2d5104dc3e3b7e3bd4cae9c18bef49b78b4eb (diff) |
Fixed SDF
-rw-r--r-- | lib/dataset.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/dataset.rb b/lib/dataset.rb index 1d4ad55..d7a8e47 100644 --- a/lib/dataset.rb +++ b/lib/dataset.rb @@ -233,8 +233,18 @@ module OpenTox # Get SDF representation of compounds # @return [String] SDF representation def to_sdf + sum="" + @compounds.each{ |c| + sum << OpenTox::Compound.new(c).to_inchi + sum << OpenTox::Compound.new(c).to_sdf + } + sum + end + + def to_urilist @compounds.inject { |sum, c| - sum + OpenTox::Compound.new(c).to_sdf + sum << OpenTox::Compound.new(c).uri + sum + "\n" } end |