summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2011-07-29 12:10:47 +0000
committerChristoph Helma <helma@in-silico.ch>2011-07-29 12:10:47 +0000
commitc5c944894def5f96307c042b4048eba963e7b86a (patch)
tree2e4183a188f29ee89e8c13f5a1248e3c0dea6715
parenta3f519bd945bcb2fce5bf587966ff746a03f0db9 (diff)
SDF export with data items
-rw-r--r--lib/dataset.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/dataset.rb b/lib/dataset.rb
index 05335dd..5ebad0f 100644
--- a/lib/dataset.rb
+++ b/lib/dataset.rb
@@ -243,7 +243,13 @@ module OpenTox
sum=""
@compounds.each{ |c|
sum << OpenTox::Compound.new(c).to_inchi
- sum << OpenTox::Compound.new(c).to_sdf
+ sum << OpenTox::Compound.new(c).to_sdf.sub(/\n\$\$\$\$/,'')
+ @data_entries[c].each{ |f,v|
+ sum << "> <\"#{f}\">\n"
+ sum << v.join(", ")
+ sum << "\n\n"
+ }
+ sum << "$$$$\n"
}
sum
end