diff options
Diffstat (limited to 'scripts/convert_pa.rb')
-rwxr-xr-x | scripts/convert_pa.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/convert_pa.rb b/scripts/convert_pa.rb index 00b4831..779aded 100755 --- a/scripts/convert_pa.rb +++ b/scripts/convert_pa.rb @@ -1,11 +1,12 @@ #!/usr/bin/env ruby +require_relative '../../lazar/lib/lazar.rb' while STDIN.gets tokens = $_.chomp.encode("UTF-8", {:invalid => :replace, :undef => :replace}).split(";") begin - #puts "\"#{tokens[0]}\",\"#{tokens.last}\"" if tokens[3] - puts "#{tokens[0]},#{tokens.last}" if tokens[3] - #puts tokens.last if tokens[3] - rescue + c = OpenTox::Compound.from_smiles tokens.last + puts "#{tokens[0]},#{c.smiles}" + rescue #=> e + STDERR.puts $_ end end |