summaryrefslogtreecommitdiff
path: root/test/compound.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/compound.rb')
-rw-r--r--test/compound.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/compound.rb b/test/compound.rb
index 036f384..24356d3 100644
--- a/test/compound.rb
+++ b/test/compound.rb
@@ -160,4 +160,17 @@ print c.sdf
end
end
end
+
+ def test_fingerprint_db_neighbors
+ training_dataset = Dataset.from_csv_file File.join(DATA_DIR,"EPAFHM.csv")
+ [
+ "CC(=O)CC(C)C#N",
+ "CC(=O)CC(C)C",
+ "C(=O)CC(C)C#N",
+ ].each do |smi|
+ c = OpenTox::Compound.from_smiles smi
+ neighbors = c.db_neighbors(:training_dataset_id => training_dataset.id, :min_sim => 0.2)
+ p neighbors
+ end
+ end
end