diff options
author | Christoph Helma <helma@in-silico.ch> | 2015-11-04 17:50:17 +0100 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2015-11-04 17:50:17 +0100 |
commit | ca2bb0f90335b1f2c4ecc28ee423e85b281ffcf0 (patch) | |
tree | 71f823d08e0799b8ebb59713f06f646888135cd7 /test/compound.rb | |
parent | 61fda66b5bc86e600b27f9a2c2eaea97603fbb92 (diff) |
neighbor search delegated to database backend
Diffstat (limited to 'test/compound.rb')
-rw-r--r-- | test/compound.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/test/compound.rb b/test/compound.rb index 22c152b..ff20c1c 100644 --- a/test/compound.rb +++ b/test/compound.rb @@ -162,7 +162,7 @@ print c.sdf end def test_fingerprint_db_neighbors - skip + #skip training_dataset = Dataset.from_csv_file File.join(DATA_DIR,"EPAFHM.csv") [ "CC(=O)CC(C)C#N", @@ -170,8 +170,18 @@ print c.sdf "C(=O)CC(C)C#N", ].each do |smi| c = OpenTox::Compound.from_smiles smi + t = Time.now neighbors = c.db_neighbors(:training_dataset_id => training_dataset.id, :min_sim => 0.2) - p neighbors + p Time.now - t + t = Time.now + neighbors2 = c.fingerprint_neighbors({:type => "MP2D", :training_dataset_id => training_dataset.id, :min_sim => 0.2}) + p Time.now - t + p neighbors.size + p neighbors2.size + #p neighbors + #p neighbors2 + #p neighbors2 - neighbors + #assert_equal neighbors, neighbors2 end end end |