blob: 6c6ba733a38aad01ba3ce4c82ba617271f4b35fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
require 'rubygems'
require 'opentox-ruby'
require 'test/unit'
require "./validate-owl.rb"
class AlgorithmTest < Test::Unit::TestCase
def setup
@@subjectid = OpenTox::Authorization.authenticate(TEST_USER,TEST_PW)
@algorithms = [
File.join(CONFIG[:services]["opentox-algorithm"],"fminer","bbrc"),
File.join(CONFIG[:services]["opentox-algorithm"],"fminer","last"),
File.join(CONFIG[:services]["opentox-algorithm"],"lazar")
#"http://apps.ideaconsult.net:8080/ambit2/algorithm/J48",
]
end
def teardown
end
def test_metadata
@algorithms.each do |algorithm|
validate_owl(algorithm, @@subjectid) unless CONFIG[:services]["opentox-algorithm"].match(/localhost/)
end
end
=begin
def test_clustering
# Parameters
dataset_uri = @@classification_training_dataset.uri
query_compound = OpenTox::Compound.from_smiles("O1COc2cc(ccc12)C")
c = OpenTox::Algorithm::Similarity::StructuralClustering.new dataset_uri
cluster_datasets = Array.new
if c.trained?
c.get_clusters query_compound.uri
cluster_datasets = c.target_clusters_array
end
assert_equal cluster_datasets.size, 2
end
=end
end
|