diff options
author | Christoph Helma <helma@in-silico.ch> | 2013-03-26 11:26:35 +0100 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2013-03-26 11:26:35 +0100 |
commit | bcd017268c5b3303c4f5540ef0a1b41cebf97522 (patch) | |
tree | bb00665c9a74a02c5349999f1f0899dc17d58833 | |
parent | 1d70fd3f71f8df9d01a9833f2fb8383b3ef3b6f3 (diff) |
warnings for empty csv compounds fixed
-rw-r--r-- | helper.rb | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -103,6 +103,7 @@ module OpenTox compound_uris = [] table.each_with_index do |values,j| compound = values.shift + puts "'#{compound}'" begin case compound_format when /URI|URL/i @@ -111,6 +112,9 @@ module OpenTox compound_uri = OpenTox::Compound.from_smiles(compound).uri when /InChI/i compound_uri = OpenTox::Compound.from_inchi(compound).uri + when "" + @warnings << "Cannot parse compound '#{compound}' at position #{j+2}, all entries are ignored." # be careful with double quotes in literals! \C in smiles is an illegal Turtle string + next end rescue @warnings << "Cannot parse compound '#{compound}' at position #{j+2}, all entries are ignored." # be careful with double quotes in literals! \C in smiles is an illegal Turtle string |