summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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