From 158e9a7ecbc467c3db77c354f203b1176b0fc3f2 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Mon, 28 Dec 2020 18:08:58 +0100 Subject: batch processing scripts added --- bin/batch_fingerprint_classification.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 bin/batch_fingerprint_classification.rb (limited to 'bin/batch_fingerprint_classification.rb') diff --git a/bin/batch_fingerprint_classification.rb b/bin/batch_fingerprint_classification.rb new file mode 100755 index 0000000..318fae6 --- /dev/null +++ b/bin/batch_fingerprint_classification.rb @@ -0,0 +1,13 @@ +#!/usr/bin/env ruby +require_relative "../lib/lazar" +model = ClassificationModel.new ARGV[0] + +File.read(ARGV[1]).each_line do |line| + if line.match(/SMILES/i) + puts "ID,SMILES,experimental,classification,probability(0),probability(1),max_similarity,nr_neighbors" + else + id,smi = line.chomp.split(",") + puts ([id] + model.predict_smiles(smi)).join(",") + end +end + -- cgit v1.2.3