summaryrefslogtreecommitdiff
path: root/bin/batch_fingerprints.rb
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2020-12-28 18:08:58 +0100
committerChristoph Helma <helma@in-silico.ch>2020-12-28 18:08:58 +0100
commit158e9a7ecbc467c3db77c354f203b1176b0fc3f2 (patch)
tree6bc54012c6327c740e5cc7240d476fc06607f89a /bin/batch_fingerprints.rb
parent9b0a5f37bdb0a5b80ace7cff559c1817d6916b8a (diff)
batch processing scripts addedwithout_mongodb
Diffstat (limited to 'bin/batch_fingerprints.rb')
-rwxr-xr-xbin/batch_fingerprints.rb10
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