summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Maunz <andreas@maunz.de>2012-09-20 10:13:05 +0200
committerAndreas Maunz <andreas@maunz.de>2012-09-20 10:13:05 +0200
commit39a1abd863aaf1b26d86eb8d3c9f6e55086dbb3f (patch)
tree5caefdf8898bc4d99f0859a71b4742c212b1577b
parenta9a4d2f415743d88eb909e6a1761ad80bcccf844 (diff)
Corrected nr cols log
-rw-r--r--lib/utils.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/utils.rb b/lib/utils.rb
index 5efba3c..555ac17 100644
--- a/lib/utils.rb
+++ b/lib/utils.rb
@@ -60,7 +60,7 @@ module OpenTox
# # # fuse CSVs ("master" structures)
if jl_master && cdk_master
nr_cols = (jl_master[0].size)-1
- LOGGER.debug "Merging #{nr_cols} new columns"
+ LOGGER.debug "Merging #{nr_cols} new columns on #{cdk_master[0].size}"
cdk_master.each {|row| nr_cols.times { row.push(nil) } }
jl_master.each do |row|
temp = cdk_master.assoc(row[0]) # Finds the appropriate line in master
@@ -75,7 +75,7 @@ module OpenTox
if ob_master && master
nr_cols = (ob_master[0].size)-1
- LOGGER.debug "Merging #{nr_cols} new columns"
+ LOGGER.debug "Merging #{nr_cols} new columns on #{master[0].size}"
master.each {|row| nr_cols.times { row.push(nil) } } # Adds empty columns to all rows
ob_master.each do |row|
temp = master.assoc(row[0]) # Finds the appropriate line in master
@@ -180,7 +180,7 @@ module OpenTox
end
row << val
}
- LOGGER.debug "Compound #{c_idx+1} (#{inchis.size}), #{row.size} entries"
+ LOGGER.debug "Compound #{c_idx+1} (#{inchis.size}), #{row.size-1} entries"
csvfile.puts(row.join(","))
csvfile.flush
}
@@ -261,7 +261,7 @@ module OpenTox
end
end
end
- LOGGER.debug "Compound #{c_idx+1} (#{inchis.size}), #{row.size} entries"
+ LOGGER.debug "Compound #{c_idx+1} (#{inchis.size}), #{row.size-1} entries"
csvfile.puts(row.join(","))
csvfile.flush
@@ -341,6 +341,7 @@ module OpenTox
infile.close!
end
master = CSV::parse(File.open(csvfile, "rb").read)
+ LOGGER.debug "Compounds 1-#{master.size-1}, #{master[0].size-1} entries"
master.each_with_index { |row, idx|
if idx != 0 # not alter headers
row[0] = inchis[idx-1]