diff options
author | Christoph Helma <helma@in-silico.ch> | 2018-10-06 13:17:33 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2018-10-06 13:17:33 +0200 |
commit | ecc3b569aacdeea0c80af372a2fe70d8aea15f64 (patch) | |
tree | d038366bc436075e9e11cd8fc3f7988cb5dca191 /scripts | |
parent | b2f12e257037faa21c14a54eec0205c45c5686c6 (diff) |
PA's updated
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/carcinogenicity2csv.rb | 2 | ||||
-rwxr-xr-x | scripts/convert_pa.rb | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/scripts/carcinogenicity2csv.rb b/scripts/carcinogenicity2csv.rb index 9501bdc..bed0907 100755 --- a/scripts/carcinogenicity2csv.rb +++ b/scripts/carcinogenicity2csv.rb @@ -1,5 +1,5 @@ #!/usr/bin/env ruby -require_relative '../../lazar/lib/lazar.rb' +#require_relative '../../lazar/lib/lazar.rb' i = 0 activities = [] 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 |