summaryrefslogtreecommitdiff
path: root/bin/batch_fingerprints.rb
diff options
context:
space:
mode:
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