summaryrefslogtreecommitdiff
path: root/scripts/hansen2csv.rb
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/hansen2csv.rb')
-rwxr-xr-xscripts/hansen2csv.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/hansen2csv.rb b/scripts/hansen2csv.rb
new file mode 100755
index 0000000..3ae22ee
--- /dev/null
+++ b/scripts/hansen2csv.rb
@@ -0,0 +1,10 @@
+#!/usr/bin/env ruby
+require 'csv'
+require_relative '../../lazar/lib/lazar.rb'
+
+puts "ID,SMILES,Mutagenicity"
+i = 0
+CSV.foreach(ARGV[0]) do |row|
+ puts [row[0],row[5],row[2]].join "," if i > 0
+ i += 1
+end