diff options
author | Christoph Helma <helma@in-silico.ch> | 2020-12-28 18:08:58 +0100 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2020-12-28 18:08:58 +0100 |
commit | 158e9a7ecbc467c3db77c354f203b1176b0fc3f2 (patch) | |
tree | 6bc54012c6327c740e5cc7240d476fc06607f89a /bin/batch_fingerprints.rb | |
parent | 9b0a5f37bdb0a5b80ace7cff559c1817d6916b8a (diff) |
batch processing scripts addedwithout_mongodb
Diffstat (limited to 'bin/batch_fingerprints.rb')
-rwxr-xr-x | bin/batch_fingerprints.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/batch_fingerprints.rb b/bin/batch_fingerprints.rb new file mode 100755 index 0000000..cd46ee2 --- /dev/null +++ b/bin/batch_fingerprints.rb @@ -0,0 +1,10 @@ +#!/usr/bin/env ruby +require_relative "../lib/lazar" +File.read(ARGV[0]).each_line do |line| + unless line.match(/SMILES/i) + id,smi = line.chomp.split(",") + puts smi + c = Compound.from_smiles(smi) + puts ([c.smiles] + c.fingerprint).join(",") + end +end |