Fixed row parsing master
authorAndreas Maunz <andreas@maunz.de>
Mon, 1 Oct 2012 15:35:21 +0000 (17:35 +0200)
committerAndreas Maunz <andreas@maunz.de>
Mon, 1 Oct 2012 15:35:21 +0000 (17:35 +0200)
lib/parser.rb
lib/utils.rb

index 257d250..5ac934c 100644 (file)
@@ -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
index 555ac17..d34081b 100644 (file)
@@ -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")