summaryrefslogtreecommitdiff
path: root/scripts/efsa2csv.rb
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/efsa2csv.rb')
-rwxr-xr-xscripts/efsa2csv.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/efsa2csv.rb b/scripts/efsa2csv.rb
index 56c69df..247faac 100755
--- a/scripts/efsa2csv.rb
+++ b/scripts/efsa2csv.rb
@@ -4,10 +4,11 @@ require_relative '../../lazar/lib/lazar.rb'
i = 0
db = {}
-CSV.foreach(ARGV[0]) do |row|
+CSV.foreach(ARGV[0], :encoding => 'ISO-8859-1', :col_sep => "\t") do |row|
begin
if i > 0 and row[11]
c = OpenTox::Compound.from_smiles(row[11]).smiles
+ #c = row[11]
if row[24].match(/Salmonella/i)
if row[25].match("TA 98") or row[25].match("TA 100")
if row[33].match(/Positiv/i)
@@ -23,6 +24,6 @@ CSV.foreach(ARGV[0]) do |row|
i += 1
end
-dm.each do |s,v|
+db.each do |s,v|
puts [s,v].join ","
end