From 34c6eb7840464d3d2b30982f4d51109faa1e8a3e Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Mon, 1 Oct 2012 17:35:21 +0200 Subject: Fixed row parsing --- lib/parser.rb | 3 ++- lib/utils.rb | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/parser.rb b/lib/parser.rb index 257d250..5ac934c 100644 --- a/lib/parser.rb +++ b/lib/parser.rb @@ -525,7 +525,8 @@ module OpenTox end def split_row(row) - row.chomp.gsub(/["']/,'').split(/\s*[,;\t]\s*/,-1) # -1: do not skip empty cells + CSV.parse(row)[0] + #row.chomp.gsub(/["']/,'').split(/\s*[,;\t]\s*/,-1) # -1: do not skip empty cells end end diff --git a/lib/utils.rb b/lib/utils.rb index 555ac17..d34081b 100644 --- a/lib/utils.rb +++ b/lib/utils.rb @@ -312,7 +312,8 @@ module OpenTox sdf_data = [] params[:compounds].each_with_index { |c_uri, c_idx| cmpd = OpenTox::Compound.new(c_uri) - LOGGER.debug "3D for #{cmpd.to_smiles}" + #LOGGER.debug "3D for #{cmpd.to_smiles}" + LOGGER.debug "3D for #{c_idx}" obconv = OpenBabel::OBConversion.new obmol = OpenBabel::OBMol.new obconv.set_in_format("smi") -- cgit v1.2.3