summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Maunz <andreas@maunz.de>2011-07-27 15:26:36 +0200
committerAndreas Maunz <andreas@maunz.de>2011-07-27 15:26:36 +0200
commitb1b51fcef2a0640f46cdfd5c4ca116bc659c86b9 (patch)
treebb4713394cb29a090e87675422ca7b377410815b
parentade2d5104dc3e3b7e3bd4cae9c18bef49b78b4eb (diff)
Fixed SDF
-rw-r--r--lib/dataset.rb12
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