opentox-ruby 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,77 @@
1
+ require "ot-logger"
2
+ # set default environment
3
+ ENV['RACK_ENV'] = 'production' unless ENV['RACK_ENV']
4
+
5
+ # load/setup configuration
6
+ basedir = File.join(ENV['HOME'], ".opentox")
7
+ config_dir = File.join(basedir, "config")
8
+ config_file = File.join(config_dir, "#{ENV['RACK_ENV']}.yaml")
9
+ user_file = File.join(config_dir, "users.yaml")
10
+
11
+ TMP_DIR = File.join(basedir, "tmp")
12
+ LOG_DIR = File.join(basedir, "log")
13
+
14
+ if File.exist?(config_file)
15
+ @@config = YAML.load_file(config_file)
16
+ raise "could not load config, config file: "+config_file.to_s unless @@config
17
+ else
18
+ FileUtils.mkdir_p TMP_DIR
19
+ FileUtils.mkdir_p LOG_DIR
20
+ FileUtils.mkdir_p config_dir
21
+ FileUtils.cp(File.join(File.dirname(__FILE__), 'templates/config.yaml'), config_file)
22
+ puts "Please edit #{config_file} and restart your application."
23
+ exit
24
+ end
25
+
26
+ # database
27
+ if @@config[:database]
28
+ ['dm-core', 'dm-serializer', 'dm-timestamps', 'dm-types', 'dm-migrations', 'dm-validations' ].each{|lib| require lib }
29
+ case @@config[:database][:adapter]
30
+ when /sqlite/i
31
+ db_dir = File.join(basedir, "db")
32
+ FileUtils.mkdir_p db_dir
33
+ DataMapper::setup(:default, "sqlite3://#{db_dir}/opentox.sqlite3")
34
+ else
35
+ DataMapper.setup(:default, {
36
+ :adapter => @@config[:database][:adapter],
37
+ :database => @@config[:database][:database],
38
+ :username => @@config[:database][:username],
39
+ :password => @@config[:database][:password],
40
+ :host => @@config[:database][:host]})
41
+ end
42
+ end
43
+
44
+ # load mail settings for error messages
45
+ load File.join config_dir,"mail.rb" if File.exists?(File.join config_dir,"mail.rb")
46
+
47
+ logfile = "#{LOG_DIR}/#{ENV["RACK_ENV"]}.log"
48
+ #LOGGER = MyLogger.new(logfile,'daily') # daily rotation
49
+ LOGGER = MyLogger.new(logfile) # no rotation
50
+ LOGGER.formatter = Logger::Formatter.new #this is neccessary to restore the formating in case active-record is loaded
51
+ if @@config[:logger] and @@config[:logger] == "debug"
52
+ LOGGER.level = Logger::DEBUG
53
+ else
54
+ LOGGER.level = Logger::WARN
55
+ end
56
+
57
+ if File.exist?(user_file)
58
+ @@users = YAML.load_file(user_file)
59
+ else
60
+ FileUtils.cp(File.join(File.dirname(__FILE__), 'templates/users.yaml'), user_file)
61
+ puts "Please edit #{user_file} and restart your application."
62
+ exit
63
+ end
64
+
65
+ begin
66
+ 0 < @@users[:users].keys.length
67
+ rescue
68
+ raise "Please edit #{user_file} and restart your application. Create at least one user with password."
69
+ end
70
+
71
+ # Regular expressions for parsing classification data
72
+ TRUE_REGEXP = /^(true|active|1|1.0)$/i
73
+ FALSE_REGEXP = /^(false|inactive|0|0.0)$/i
74
+
75
+ # Task durations
76
+ DEFAULT_TASK_MAX_DURATION = 3600
77
+ EXTERNAL_TASK_MAX_DURATION = 3600
@@ -0,0 +1,26 @@
1
+ helpers do
2
+
3
+ # Authentification
4
+ def protected!
5
+ response['WWW-Authenticate'] = %(Basic realm="Testing HTTP Auth") and \
6
+ throw(:halt, [401, "Not authorized\n"]) and \
7
+ return unless authorized?
8
+ end
9
+
10
+ def authorized?
11
+ @auth ||= Rack::Auth::Basic::Request.new(request.env)
12
+ @auth.provided? && @auth.basic? && @auth.credentials && @auth.credentials == ['api', API_KEY]
13
+ end
14
+
15
+
16
+ =begin
17
+ def xml(object)
18
+ builder do |xml|
19
+ xml.instruct!
20
+ object.to_xml
21
+ end
22
+ end
23
+ =end
24
+
25
+ end
26
+
@@ -0,0 +1,143 @@
1
+ module OpenTox
2
+ module Model
3
+
4
+ class Generic
5
+
6
+ MODEL_ATTRIBS = [:uri, :title, :creator, :date, :format, :predictedVariables, :independentVariables, :dependentVariables, :trainingDataset, :algorithm]
7
+ MODEL_ATTRIBS.each{ |a| attr_accessor(a) }
8
+
9
+ def self.find(uri)
10
+ owl = OpenTox::Owl.from_uri(uri, "Model")
11
+ return self.new(owl)
12
+ end
13
+
14
+ def self.to_rdf(model)
15
+ owl = OpenTox::Owl.create 'Model', model.uri
16
+ (MODEL_ATTRIBS - [:uri]).each do |a|
17
+ owl.set(a.to_s,model.send(a.to_s))
18
+ end
19
+ owl.rdf
20
+ end
21
+
22
+ protected
23
+ def initialize(owl)
24
+ MODEL_ATTRIBS.each do |a|
25
+ self.send("#{a.to_s}=".to_sym, owl.get(a.to_s)) unless a==:uri
26
+ end
27
+ @uri = owl.uri
28
+ if ENV['RACK_ENV'] =~ /test|debug/
29
+ begin
30
+ raise "uri invalid" unless Utils.is_uri?(@uri)
31
+ raise "no predicted variables" unless @predictedVariables and @predictedVariables.size>0
32
+ rescue => ex
33
+ RestClientWrapper.raise_uri_error "invalid model: '"+ex.message+"'\n"+self.to_yaml+"\n",@uri.to_s
34
+ end
35
+ LOGGER.warn "model has no dependent variable" unless @dependentVariables and @dependentVariables.size>0
36
+ LOGGER.warn "model has no algorithm" unless @algorithm and @algorithm.size>0
37
+ LOGGER.warn "model has no indenpendent variables" unless @independentVariables
38
+ end
39
+ end
40
+ end
41
+
42
+ class PredictionModel < Generic
43
+
44
+ def self.build( algorithm_uri, algorithm_params )
45
+
46
+ LOGGER.debug "Build model, algorithm_uri:"+algorithm_uri.to_s+", algorithm_parms: "+algorithm_params.inspect.to_s
47
+ uri = OpenTox::RestClientWrapper.post(algorithm_uri,algorithm_params).to_s
48
+ LOGGER.debug "Build model done: "+uri.to_s
49
+ RestClientWrapper.raise_uri_error("Invalid build model result: '"+uri.to_s+"'", algorithm_uri, algorithm_params ) unless Utils.model_uri?(uri)
50
+ return PredictionModel.find(uri)
51
+ end
52
+
53
+ def predict_dataset( dataset_uri )
54
+
55
+ LOGGER.debug "Predict dataset: "+dataset_uri.to_s+" with model "+@uri.to_s
56
+ uri = RestClientWrapper.post(@uri, {:accept => "text/uri-list", :dataset_uri=>dataset_uri})
57
+ RestClientWrapper.raise_uri_error("Prediciton result no dataset uri: "+uri.to_s, @uri, {:dataset_uri=>dataset_uri} ) unless Utils.dataset_uri?(uri)
58
+ uri
59
+ end
60
+
61
+ def classification?
62
+ #HACK replace with request to ontology server
63
+ if @title =~ /(?i)classification/
64
+ return true
65
+ elsif @title =~ /(?i)regression/
66
+ return false
67
+ elsif @uri =~/ntua/ and @title =~ /mlr/
68
+ return false
69
+ elsif @uri =~/tu-muenchen/ and @title =~ /regression|M5P|GaussP/
70
+ return false
71
+ elsif @uri =~/ambit2/ and @title =~ /pKa/ || @title =~ /Regression|Caco/
72
+ return false
73
+ elsif @uri =~/majority/
74
+ return (@uri =~ /class/) != nil
75
+ else
76
+ raise "unknown model, uri:'"+@uri.to_s+"' title:'"+@title.to_s+"'"
77
+ end
78
+ end
79
+ end
80
+
81
+ class Lazar < Generic
82
+
83
+ attr_accessor :feature_dataset_uri, :effects, :activities, :p_values, :fingerprints, :features
84
+
85
+ def initialize
86
+ @source = "http://github.com/helma/opentox-model"
87
+ @algorithm = File.join(@@config[:services]["opentox-algorithm"],"lazar")
88
+ #@independent_variables = File.join(@@config[:services]["opentox-algorithm"],"fminer#BBRC_representative")
89
+ @features = []
90
+ @effects = {}
91
+ @activities = {}
92
+ @p_values = {}
93
+ @fingerprints = {}
94
+ end
95
+
96
+ def save
97
+ @features.uniq!
98
+ resource = RestClient::Resource.new(@@config[:services]["opentox-model"], :user => @@users[:users].keys[0], :password => @@users[:users].values[0])
99
+ resource.post(self.to_yaml, :content_type => "application/x-yaml").chomp.to_s
100
+ end
101
+
102
+ def self.find_all
103
+ RestClientWrapper.get(@@config[:services]["opentox-model"]).chomp.split("\n")
104
+ end
105
+
106
+ def self.predict(compound_uri,model_uri)
107
+ #RestClientWrapper.post(model_uri,{:compound_uri => compound_uri, :accept => 'application/x-yaml'})
108
+ `curl -X POST -d 'compound_uri=#{compound_uri}' -H 'Accept:application/x-yaml' #{model_uri}`
109
+ end
110
+ end
111
+
112
+ class PropertyLazar < Generic
113
+
114
+ attr_accessor :feature_dataset_uri, :properties, :features, :activities#, :effects, :p_values
115
+
116
+ def initialize
117
+ @source = "http://github.com/helma/opentox-model"
118
+ @algorithm = File.join(@@config[:services]["opentox-algorithm"],"property_lazar")
119
+ #@independent_variables = File.join(@@config[:services]["opentox-algorithm"],"fminer#BBRC_representative")
120
+ @features = []
121
+ #@effects = {}
122
+ @activities = {}
123
+ #@p_values = {}
124
+ @properties = {}
125
+ end
126
+
127
+ def save
128
+ @features.uniq!
129
+ resource = RestClient::Resource.new(@@config[:services]["opentox-model"], :user => @@users[:users].keys[0], :password => @@users[:users].values[0])
130
+ resource.post(self.to_yaml, :content_type => "application/x-yaml").chomp.to_s
131
+ end
132
+
133
+ def self.find_all
134
+ RestClientWrapper.get(@@config[:services]["opentox-model"]).chomp.split("\n")
135
+ end
136
+
137
+ def self.predict(compound_uri,model_uri)
138
+ #RestClientWrapper.post(model_uri,{:compound_uri => compound_uri, :accept => 'application/x-yaml'})
139
+ `curl -X POST -d 'compound_uri=#{compound_uri}' -H 'Accept:application/x-yaml' #{model_uri}`
140
+ end
141
+ end
142
+ end
143
+ end
@@ -0,0 +1,809 @@
1
+ <?xml version="1.0"?>
2
+ <rdf:RDF
3
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
4
+ xmlns:protege="http://protege.stanford.edu/plugins/owl/protege#"
5
+ xmlns:xsp="http://www.owl-ontologies.com/2005/08/07/xsp.owl#"
6
+ xmlns:ot="http://www.opentox.org/api/1.1#"
7
+ xmlns:owl="http://www.w3.org/2002/07/owl#"
8
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
9
+ xmlns:p1="http://purl.org/dc/elements/1.1/#"
10
+ xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#"
11
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
12
+ xmlns:swrl="http://www.w3.org/2003/11/swrl#"
13
+ xmlns:swrlb="http://www.w3.org/2003/11/swrlb#"
14
+ xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
15
+ xml:base="http://www.opentox.org/api/1.1">
16
+ <owl:Ontology rdf:about="">
17
+ <dc:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
18
+ >http://opentox.org/dev/apis/api-1.1</dc:identifier>
19
+ <dc:date rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
20
+ >2009-11-22</dc:date>
21
+ <dc:contributor rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
22
+ >martin.guetlein@gmail.com</dc:contributor>
23
+ <dc:contributor rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
24
+ >jeliazkova.nina@gmail.com</dc:contributor>
25
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
26
+ >OpenTox resource ontology</rdfs:comment>
27
+ <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
28
+ >OpenTox API</dc:title>
29
+ <dc:creator rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
30
+ >OpenTox</dc:creator>
31
+ </owl:Ontology>
32
+ <owl:Class rdf:ID="Dataset">
33
+ <dc:description rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
34
+ ></dc:description>
35
+ <rdfs:seeAlso rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
36
+ >http://opentox.org/dev/apis/api-1.1/dataset</rdfs:seeAlso>
37
+ <dc:creator rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
38
+ ></dc:creator>
39
+ <dc:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
40
+ >/dataset/{datasetid}</dc:identifier>
41
+ <dc:date rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
42
+ ></dc:date>
43
+ <dc:source rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
44
+ >Original source of the dataset</dc:source>
45
+ <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
46
+ ></dc:title>
47
+ <dc:publisher rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
48
+ ></dc:publisher>
49
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
50
+ >Provides access to chemical compounds and their features (e.g. structural, physical-chemical, biological, toxicological properties)</rdfs:comment>
51
+ <owl:disjointWith>
52
+ <owl:Class rdf:ID="Feature"/>
53
+ </owl:disjointWith>
54
+ <owl:disjointWith>
55
+ <owl:Class rdf:ID="Parameter"/>
56
+ </owl:disjointWith>
57
+ <dc:contributor rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
58
+ ></dc:contributor>
59
+ <rdfs:subClassOf>
60
+ <owl:Class rdf:ID="OpentoxResource"/>
61
+ </rdfs:subClassOf>
62
+ <owl:disjointWith>
63
+ <owl:Class rdf:ID="Model"/>
64
+ </owl:disjointWith>
65
+ <owl:disjointWith>
66
+ <owl:Class rdf:ID="FeatureValuePair"/>
67
+ </owl:disjointWith>
68
+ </owl:Class>
69
+ <owl:Class rdf:ID="FeatureValue">
70
+ <owl:disjointWith>
71
+ <owl:Class rdf:ID="Tuple"/>
72
+ </owl:disjointWith>
73
+ <rdfs:subClassOf>
74
+ <owl:Class rdf:about="#FeatureValuePair"/>
75
+ </rdfs:subClassOf>
76
+ </owl:Class>
77
+ <owl:Class rdf:about="#OpentoxResource">
78
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
79
+ >A generic OpenTox resource</rdfs:comment>
80
+ <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
81
+ >name of the resource</dc:title>
82
+ <dc:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
83
+ >URI of the resource</dc:identifier>
84
+ <owl:versionInfo rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
85
+ >1.1</owl:versionInfo>
86
+ </owl:Class>
87
+ <owl:Class rdf:ID="ConfusionMatrix">
88
+ <rdfs:subClassOf>
89
+ <owl:Class rdf:ID="ClassificationStatistics"/>
90
+ </rdfs:subClassOf>
91
+ </owl:Class>
92
+ <owl:Class rdf:about="#Model">
93
+ <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
94
+ ></dc:title>
95
+ <owl:versionInfo rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
96
+ >TODO: Specify allowed values for model content</owl:versionInfo>
97
+ <dc:format rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
98
+ >The native format of the model content (e.g. PMML, Weka model, etc.)</dc:format>
99
+ <owl:disjointWith>
100
+ <owl:Class rdf:about="#Parameter"/>
101
+ </owl:disjointWith>
102
+ <owl:versionInfo rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
103
+ >TODO: Introduce a link to User resource</owl:versionInfo>
104
+ <dc:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
105
+ >/model/{modelid}</dc:identifier>
106
+ <dc:creator rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
107
+ >The model creator (perhaps a link to User resource)</dc:creator>
108
+ <dc:rights rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
109
+ ></dc:rights>
110
+ <rdfs:subClassOf rdf:resource="#OpentoxResource"/>
111
+ <dc:date rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
112
+ >The date of model creation</dc:date>
113
+ </owl:Class>
114
+ <owl:Class rdf:ID="Validation">
115
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
116
+ >A validation corresponds to the validation of a model on a test dataset. The results are stored in another dataset. Parameters with default values are optional.</rdfs:comment>
117
+ <dc:date rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
118
+ >Datetime</dc:date>
119
+ <rdfs:seeAlso rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
120
+ >http://opentox.org/dev/apis/api-1.1/Validation</rdfs:seeAlso>
121
+ <rdfs:subClassOf rdf:resource="#OpentoxResource"/>
122
+ </owl:Class>
123
+ <owl:Class rdf:ID="Report">
124
+ <rdfs:seeAlso rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
125
+ >http://opentox.org/dev/apis/api-1.1/Validation#validation-report</rdfs:seeAlso>
126
+ <rdfs:subClassOf rdf:resource="#OpentoxResource"/>
127
+ </owl:Class>
128
+ <owl:Class rdf:ID="Algorithm">
129
+ <owl:versionInfo rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
130
+ >TODO: AlgorithmType, or link to Algorithm ontology</owl:versionInfo>
131
+ <owl:versionInfo rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
132
+ >1.1</owl:versionInfo>
133
+ <dc:source rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
134
+ >Reference</dc:source>
135
+ <owl:versionInfo rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
136
+ >TODO: statistics supported - is it possible to reuse ValidationInfo classes?</owl:versionInfo>
137
+ <dc:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
138
+ >/algorithm/{algorithmid}</dc:identifier>
139
+ <dc:description rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
140
+ ></dc:description>
141
+ <rdfs:seeAlso rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
142
+ >http://opentox.org/dev/apis/api-1.1/Algorithm</rdfs:seeAlso>
143
+ <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
144
+ >Name of the algorithm</dc:title>
145
+ <owl:disjointWith>
146
+ <owl:Class rdf:about="#Feature"/>
147
+ </owl:disjointWith>
148
+ <owl:disjointWith rdf:resource="#Model"/>
149
+ <owl:disjointWith>
150
+ <owl:Class rdf:ID="Compound"/>
151
+ </owl:disjointWith>
152
+ <owl:disjointWith rdf:resource="#Dataset"/>
153
+ <rdfs:subClassOf rdf:resource="#OpentoxResource"/>
154
+ <owl:disjointWith>
155
+ <owl:Class rdf:about="#Parameter"/>
156
+ </owl:disjointWith>
157
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
158
+ >Provides access to OpenTox algorithms</rdfs:comment>
159
+ <dc:publisher rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
160
+ ></dc:publisher>
161
+ <owl:disjointWith>
162
+ <owl:Class rdf:about="#FeatureValuePair"/>
163
+ </owl:disjointWith>
164
+ <owl:disjointWith>
165
+ <owl:Class rdf:ID="DataEntry"/>
166
+ </owl:disjointWith>
167
+ </owl:Class>
168
+ <owl:Class rdf:ID="CrossValidationInfo">
169
+ <rdfs:subClassOf>
170
+ <owl:Class rdf:ID="ValidationInfo"/>
171
+ </rdfs:subClassOf>
172
+ </owl:Class>
173
+ <owl:Class rdf:about="#ValidationInfo">
174
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
175
+ >encapsulates validation information</rdfs:comment>
176
+ <rdfs:subClassOf rdf:resource="#Validation"/>
177
+ </owl:Class>
178
+ <owl:Class rdf:about="#Compound">
179
+ <owl:disjointWith rdf:resource="#Model"/>
180
+ <owl:disjointWith>
181
+ <owl:Class rdf:about="#FeatureValuePair"/>
182
+ </owl:disjointWith>
183
+ <dc:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
184
+ >/compound/{compoundid}</dc:identifier>
185
+ <rdfs:seeAlso rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
186
+ >http://opentox.org/dev/apis/api-1.1/structure</rdfs:seeAlso>
187
+ <rdfs:subClassOf rdf:resource="#OpentoxResource"/>
188
+ <owl:disjointWith>
189
+ <owl:Class rdf:about="#Feature"/>
190
+ </owl:disjointWith>
191
+ <owl:versionInfo rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
192
+ >1.1</owl:versionInfo>
193
+ <owl:disjointWith>
194
+ <owl:Class rdf:about="#DataEntry"/>
195
+ </owl:disjointWith>
196
+ <owl:disjointWith>
197
+ <owl:Class rdf:about="#Parameter"/>
198
+ </owl:disjointWith>
199
+ <owl:disjointWith rdf:resource="#Dataset"/>
200
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
201
+ >API for OpenTox compound webservices</rdfs:comment>
202
+ </owl:Class>
203
+ <owl:Class rdf:ID="Conformer">
204
+ <rdfs:subClassOf>
205
+ <owl:Restriction>
206
+ <owl:onProperty>
207
+ <owl:FunctionalProperty rdf:ID="has3Dstructure"/>
208
+ </owl:onProperty>
209
+ <owl:hasValue rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean"
210
+ >true</owl:hasValue>
211
+ </owl:Restriction>
212
+ </rdfs:subClassOf>
213
+ <rdfs:subClassOf rdf:resource="#Compound"/>
214
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
215
+ >[Optional] support for multiple (e.g. 3D) structures per chemical compound (single structure by default)</rdfs:comment>
216
+ <dc:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
217
+ >/compound/{compoundid}/conformer/{conformerid}</dc:identifier>
218
+ </owl:Class>
219
+ <owl:Class rdf:about="#ClassificationStatistics">
220
+ <rdfs:subClassOf rdf:resource="#ValidationInfo"/>
221
+ </owl:Class>
222
+ <owl:Class rdf:about="#FeatureValuePair">
223
+ <dc:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
224
+ ></dc:identifier>
225
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
226
+ ></rdfs:comment>
227
+ <owl:disjointWith>
228
+ <owl:Class rdf:about="#Parameter"/>
229
+ </owl:disjointWith>
230
+ <owl:disjointWith rdf:resource="#Model"/>
231
+ <rdfs:subClassOf rdf:resource="#OpentoxResource"/>
232
+ </owl:Class>
233
+ <owl:Class rdf:about="#Feature">
234
+ <owl:disjointWith rdf:resource="#Model"/>
235
+ <owl:versionInfo rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
236
+ >1.1</owl:versionInfo>
237
+ <dc:source rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
238
+ ></dc:source>
239
+ <rdfs:subClassOf rdf:resource="#OpentoxResource"/>
240
+ <owl:disjointWith rdf:resource="#FeatureValuePair"/>
241
+ <dc:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
242
+ >/feature/{featureid}</dc:identifier>
243
+ <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
244
+ ></dc:title>
245
+ <owl:disjointWith>
246
+ <owl:Class rdf:about="#Parameter"/>
247
+ </owl:disjointWith>
248
+ <dc:description rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
249
+ ></dc:description>
250
+ </owl:Class>
251
+ <owl:Class rdf:about="#Parameter">
252
+ <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
253
+ ></dc:title>
254
+ <rdfs:subClassOf rdf:resource="#OpentoxResource"/>
255
+ </owl:Class>
256
+ <owl:Class rdf:ID="YScrambling">
257
+ <rdfs:subClassOf rdf:resource="#ValidationInfo"/>
258
+ </owl:Class>
259
+ <owl:Class rdf:about="#DataEntry">
260
+ <owl:disjointWith rdf:resource="#Feature"/>
261
+ <dc:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
262
+ >/dataset/{datasetid}/compound/{compoundid}?feature_uri[]=featureuris</dc:identifier>
263
+ <owl:disjointWith rdf:resource="#Model"/>
264
+ <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
265
+ ></dc:title>
266
+ <owl:versionInfo rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
267
+ >1.1</owl:versionInfo>
268
+ <owl:disjointWith rdf:resource="#Parameter"/>
269
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
270
+ >Encapsulates a dataset entry - defined by a single Compound (or conformer) and multiple FeatureValues. Could be regarded as "Compound with features"</rdfs:comment>
271
+ <owl:disjointWith rdf:resource="#FeatureValuePair"/>
272
+ <rdfs:subClassOf rdf:resource="#OpentoxResource"/>
273
+ <owl:disjointWith rdf:resource="#Dataset"/>
274
+ </owl:Class>
275
+ <owl:Class rdf:ID="Task">
276
+ <rdfs:subClassOf rdf:resource="#OpentoxResource"/>
277
+ </owl:Class>
278
+ <owl:Class rdf:ID="Crossvalidation">
279
+ <rdfs:subClassOf rdf:resource="#OpentoxResource"/>
280
+ </owl:Class>
281
+ <owl:Class rdf:ID="EmptyDataset">
282
+ <rdfs:subClassOf rdf:resource="#Dataset"/>
283
+ </owl:Class>
284
+ <owl:Class rdf:about="#Tuple">
285
+ <owl:disjointWith rdf:resource="#FeatureValue"/>
286
+ <rdfs:subClassOf rdf:resource="#FeatureValuePair"/>
287
+ </owl:Class>
288
+ <owl:Class rdf:ID="ClassValueStatistics">
289
+ <rdfs:subClassOf rdf:resource="#ClassificationStatistics"/>
290
+ </owl:Class>
291
+ <owl:Class rdf:ID="ConfusionMatrixCell">
292
+ <rdfs:subClassOf rdf:resource="#ConfusionMatrix"/>
293
+ </owl:Class>
294
+ <owl:Class rdf:ID="RegressionStatistics">
295
+ <rdfs:subClassOf rdf:resource="#ValidationInfo"/>
296
+ </owl:Class>
297
+ <owl:ObjectProperty rdf:ID="conformer">
298
+ <rdfs:domain rdf:resource="#Compound"/>
299
+ <rdfs:range rdf:resource="#Conformer"/>
300
+ </owl:ObjectProperty>
301
+ <owl:ObjectProperty rdf:ID="crossvalidationDataset">
302
+ <rdfs:range rdf:resource="#Dataset"/>
303
+ <rdfs:domain rdf:resource="#Crossvalidation"/>
304
+ </owl:ObjectProperty>
305
+ <owl:ObjectProperty rdf:ID="validation">
306
+ <rdfs:range rdf:resource="#ValidationInfo"/>
307
+ <rdfs:domain rdf:resource="#Validation"/>
308
+ </owl:ObjectProperty>
309
+ <owl:ObjectProperty rdf:ID="confusionMatrixPredicted">
310
+ <rdfs:range rdf:resource="#FeatureValuePair"/>
311
+ <rdfs:domain rdf:resource="#ConfusionMatrixCell"/>
312
+ <rdfs:subPropertyOf>
313
+ <owl:ObjectProperty rdf:ID="confusionMatrixEntry"/>
314
+ </rdfs:subPropertyOf>
315
+ </owl:ObjectProperty>
316
+ <owl:ObjectProperty rdf:ID="validationPredictionDataset">
317
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
318
+ >PredictionDatasetURI</rdfs:comment>
319
+ <rdfs:subPropertyOf rdf:resource="#validation"/>
320
+ <rdfs:domain rdf:resource="#Validation"/>
321
+ <rdfs:range rdf:resource="#Dataset"/>
322
+ </owl:ObjectProperty>
323
+ <owl:ObjectProperty rdf:ID="validationTrainingDataset">
324
+ <rdfs:subPropertyOf rdf:resource="#validation"/>
325
+ <rdfs:range rdf:resource="#Dataset"/>
326
+ <rdfs:domain rdf:resource="#Validation"/>
327
+ </owl:ObjectProperty>
328
+ <owl:ObjectProperty rdf:ID="complexValue">
329
+ <rdfs:range rdf:resource="#FeatureValue"/>
330
+ <rdfs:domain rdf:resource="#Tuple"/>
331
+ </owl:ObjectProperty>
332
+ <owl:ObjectProperty rdf:ID="model">
333
+ <rdfs:domain rdf:resource="#Model"/>
334
+ <rdfs:range rdf:resource="#Dataset"/>
335
+ </owl:ObjectProperty>
336
+ <owl:ObjectProperty rdf:ID="dependentVariables">
337
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
338
+ >A model can have one or more dependent variables, described as multiple features, specified by this relationship.</rdfs:comment>
339
+ <rdfs:domain rdf:resource="#Model"/>
340
+ <rdfs:subPropertyOf rdf:resource="#model"/>
341
+ <rdfs:range rdf:resource="#Feature"/>
342
+ </owl:ObjectProperty>
343
+ <owl:ObjectProperty rdf:ID="crossvalidationAlgorithm">
344
+ <rdfs:range rdf:resource="#Algorithm"/>
345
+ <rdfs:domain rdf:resource="#Crossvalidation"/>
346
+ </owl:ObjectProperty>
347
+ <owl:ObjectProperty rdf:ID="validationCrossvalidation">
348
+ <rdfs:range rdf:resource="#Crossvalidation"/>
349
+ <rdfs:domain rdf:resource="#CrossValidationInfo"/>
350
+ </owl:ObjectProperty>
351
+ <owl:ObjectProperty rdf:ID="parameters">
352
+ <rdfs:subPropertyOf rdf:resource="#model"/>
353
+ <rdfs:range rdf:resource="#Parameter"/>
354
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
355
+ >Algorithms and Models can have multiple parameters</rdfs:comment>
356
+ <rdfs:isDefinedBy rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
357
+ >http://opentox.org/api/1.1</rdfs:isDefinedBy>
358
+ <rdfs:domain>
359
+ <owl:Class>
360
+ <owl:unionOf rdf:parseType="Collection">
361
+ <owl:Class rdf:about="#Algorithm"/>
362
+ <owl:Class rdf:about="#Model"/>
363
+ </owl:unionOf>
364
+ </owl:Class>
365
+ </rdfs:domain>
366
+ </owl:ObjectProperty>
367
+ <owl:ObjectProperty rdf:ID="validationTestDataset">
368
+ <rdfs:range rdf:resource="#Dataset"/>
369
+ <rdfs:subPropertyOf rdf:resource="#validation"/>
370
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
371
+ >Test dataset , used in a validation exercise</rdfs:comment>
372
+ <rdfs:domain rdf:resource="#Validation"/>
373
+ </owl:ObjectProperty>
374
+ <owl:ObjectProperty rdf:ID="predictedVariables">
375
+ <rdfs:range rdf:resource="#Feature"/>
376
+ <rdfs:subPropertyOf rdf:resource="#model"/>
377
+ <rdfs:isDefinedBy rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
378
+ >http://opentox.org/api/1.1</rdfs:isDefinedBy>
379
+ <rdfs:domain rdf:resource="#Model"/>
380
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
381
+ >Variables, holding the predicted values, generated by the model</rdfs:comment>
382
+ </owl:ObjectProperty>
383
+ <owl:ObjectProperty rdf:ID="dataEntry">
384
+ <rdfs:isDefinedBy rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
385
+ >http://opentox.org/api/1.1</rdfs:isDefinedBy>
386
+ <rdfs:range rdf:resource="#DataEntry"/>
387
+ <rdfs:domain rdf:resource="#Dataset"/>
388
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
389
+ >A Dataset contains multiple DataEntries. This property specifies the relationship between Dataset and DataEntry.</rdfs:comment>
390
+ </owl:ObjectProperty>
391
+ <owl:ObjectProperty rdf:ID="unscrambledDatasetURI">
392
+ <rdfs:domain rdf:resource="#YScrambling"/>
393
+ <rdfs:subPropertyOf rdf:resource="#validation"/>
394
+ <rdfs:range rdf:resource="#Dataset"/>
395
+ <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
396
+ >a link to UnscrambledDataset</dc:title>
397
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
398
+ >UnscrambledDatasetURI</rdfs:comment>
399
+ </owl:ObjectProperty>
400
+ <owl:ObjectProperty rdf:ID="independentVariables">
401
+ <rdfs:domain rdf:resource="#Model"/>
402
+ <rdfs:isDefinedBy rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
403
+ >http://opentox.org/api/1.1</rdfs:isDefinedBy>
404
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
405
+ >A model can have multiple independent variables, described as multiple features, specified by this relationship.</rdfs:comment>
406
+ <rdfs:subPropertyOf rdf:resource="#model"/>
407
+ <rdfs:range rdf:resource="#Feature"/>
408
+ </owl:ObjectProperty>
409
+ <owl:ObjectProperty rdf:ID="hasValidationInfo">
410
+ <rdfs:subPropertyOf rdf:resource="#validation"/>
411
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
412
+ >Links Validation with Validation Info. One validation exercise may have multiple types of validation informaton</rdfs:comment>
413
+ <rdfs:domain rdf:resource="#Validation"/>
414
+ <rdfs:range rdf:resource="#ValidationInfo"/>
415
+ </owl:ObjectProperty>
416
+ <owl:ObjectProperty rdf:ID="predictedFeature">
417
+ <rdfs:domain rdf:resource="#Validation"/>
418
+ <rdfs:range rdf:resource="#Feature"/>
419
+ <rdfs:subPropertyOf rdf:resource="#validation"/>
420
+ </owl:ObjectProperty>
421
+ <owl:ObjectProperty rdf:ID="classValue">
422
+ <rdfs:domain rdf:resource="#ClassValueStatistics"/>
423
+ <rdfs:range rdf:resource="#FeatureValuePair"/>
424
+ <rdfs:subPropertyOf>
425
+ <owl:ObjectProperty rdf:ID="classValueStatistics"/>
426
+ </rdfs:subPropertyOf>
427
+ </owl:ObjectProperty>
428
+ <owl:ObjectProperty rdf:about="#confusionMatrixEntry">
429
+ <rdfs:range rdf:resource="#ConfusionMatrixCell"/>
430
+ <rdfs:domain rdf:resource="#ConfusionMatrix"/>
431
+ <rdfs:subPropertyOf>
432
+ <owl:ObjectProperty rdf:ID="confusionMatrix"/>
433
+ </rdfs:subPropertyOf>
434
+ </owl:ObjectProperty>
435
+ <owl:ObjectProperty rdf:ID="report">
436
+ <rdfs:domain rdf:resource="#Report"/>
437
+ <rdfs:range rdf:resource="#Validation"/>
438
+ </owl:ObjectProperty>
439
+ <owl:ObjectProperty rdf:ID="values">
440
+ <rdfs:range rdf:resource="#FeatureValuePair"/>
441
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
442
+ >A DataEntry is defined with a single compound and multiple feature values. This property sets the relationship between a DataEntry and multiple FeatureValues</rdfs:comment>
443
+ <rdfs:isDefinedBy rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
444
+ >http://opentox.org/api/1.1</rdfs:isDefinedBy>
445
+ <rdfs:domain rdf:resource="#DataEntry"/>
446
+ </owl:ObjectProperty>
447
+ <owl:ObjectProperty rdf:about="#classValueStatistics">
448
+ <rdfs:domain rdf:resource="#ClassificationStatistics"/>
449
+ <rdfs:range rdf:resource="#ClassValueStatistics"/>
450
+ </owl:ObjectProperty>
451
+ <owl:ObjectProperty rdf:about="#confusionMatrix">
452
+ <rdfs:domain rdf:resource="#ClassificationStatistics"/>
453
+ <rdfs:range rdf:resource="#ConfusionMatrix"/>
454
+ </owl:ObjectProperty>
455
+ <owl:ObjectProperty rdf:ID="confusionMatrixActual">
456
+ <rdfs:domain rdf:resource="#ConfusionMatrixCell"/>
457
+ <rdfs:subPropertyOf rdf:resource="#confusionMatrixEntry"/>
458
+ <rdfs:range rdf:resource="#FeatureValuePair"/>
459
+ </owl:ObjectProperty>
460
+ <owl:ObjectProperty rdf:ID="validationReport">
461
+ <rdfs:range rdf:resource="#Validation"/>
462
+ <rdfs:subPropertyOf rdf:resource="#report"/>
463
+ <rdfs:domain rdf:resource="#Report"/>
464
+ </owl:ObjectProperty>
465
+ <owl:DatatypeProperty rdf:ID="precision">
466
+ <rdfs:domain rdf:resource="#ClassValueStatistics"/>
467
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
468
+ </owl:DatatypeProperty>
469
+ <owl:DatatypeProperty rdf:ID="numFalsePositives">
470
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#int"/>
471
+ <rdfs:domain rdf:resource="#ClassValueStatistics"/>
472
+ </owl:DatatypeProperty>
473
+ <owl:DatatypeProperty rdf:ID="stratified">
474
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
475
+ <rdfs:domain rdf:resource="#Crossvalidation"/>
476
+ </owl:DatatypeProperty>
477
+ <owl:DatatypeProperty rdf:ID="numFolds">
478
+ <rdfs:domain rdf:resource="#Crossvalidation"/>
479
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#int"/>
480
+ </owl:DatatypeProperty>
481
+ <owl:DatatypeProperty rdf:ID="falsePositiveRate">
482
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
483
+ <rdfs:domain rdf:resource="#ClassValueStatistics"/>
484
+ </owl:DatatypeProperty>
485
+ <owl:DatatypeProperty rdf:ID="fMeasure">
486
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
487
+ <rdfs:domain rdf:resource="#ClassValueStatistics"/>
488
+ </owl:DatatypeProperty>
489
+ <owl:DatatypeProperty rdf:ID="yScramblingInfo">
490
+ <rdfs:domain rdf:resource="#YScrambling"/>
491
+ </owl:DatatypeProperty>
492
+ <owl:DatatypeProperty rdf:ID="falseNegativeRate">
493
+ <rdfs:domain rdf:resource="#ClassValueStatistics"/>
494
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
495
+ </owl:DatatypeProperty>
496
+ <owl:DatatypeProperty rdf:ID="hasStatus">
497
+ <rdfs:range>
498
+ <owl:DataRange>
499
+ <owl:oneOf rdf:parseType="Resource">
500
+ <rdf:first rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
501
+ >Cancelled</rdf:first>
502
+ <rdf:rest rdf:parseType="Resource">
503
+ <rdf:rest rdf:parseType="Resource">
504
+ <rdf:first rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
505
+ >Running</rdf:first>
506
+ <rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/>
507
+ </rdf:rest>
508
+ <rdf:first rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
509
+ >Completed</rdf:first>
510
+ </rdf:rest>
511
+ </owl:oneOf>
512
+ </owl:DataRange>
513
+ </rdfs:range>
514
+ <rdfs:domain rdf:resource="#Task"/>
515
+ </owl:DatatypeProperty>
516
+ <owl:DatatypeProperty rdf:ID="percentUnpredicted">
517
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
518
+ <rdfs:domain rdf:resource="#Validation"/>
519
+ </owl:DatatypeProperty>
520
+ <owl:DatatypeProperty rdf:ID="classificationStatistics">
521
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
522
+ <rdfs:domain rdf:resource="#ClassificationStatistics"/>
523
+ </owl:DatatypeProperty>
524
+ <owl:DatatypeProperty rdf:ID="rSquare">
525
+ <rdfs:subPropertyOf>
526
+ <owl:DatatypeProperty rdf:ID="regressionStatistics"/>
527
+ </rdfs:subPropertyOf>
528
+ <rdfs:domain rdf:resource="#RegressionStatistics"/>
529
+ </owl:DatatypeProperty>
530
+ <owl:DatatypeProperty rdf:ID="truePositiveRate">
531
+ <rdfs:domain rdf:resource="#ClassValueStatistics"/>
532
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
533
+ </owl:DatatypeProperty>
534
+ <owl:DatatypeProperty rdf:ID="percentWithoutClass">
535
+ <rdfs:domain rdf:resource="#Validation"/>
536
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
537
+ </owl:DatatypeProperty>
538
+ <owl:DatatypeProperty rdf:ID="numWithoutClass">
539
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#int"/>
540
+ <rdfs:domain rdf:resource="#Validation"/>
541
+ </owl:DatatypeProperty>
542
+ <owl:DatatypeProperty rdf:ID="paramValue">
543
+ <rdfs:domain rdf:resource="#Parameter"/>
544
+ <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
545
+ >Parameter value</dc:title>
546
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
547
+ >The value of a Parameter</rdfs:comment>
548
+ </owl:DatatypeProperty>
549
+ <owl:DatatypeProperty rdf:ID="statisticsSupported">
550
+ <rdfs:domain rdf:resource="#Algorithm"/>
551
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
552
+ </owl:DatatypeProperty>
553
+ <owl:DatatypeProperty rdf:ID="numUnpredicted">
554
+ <rdfs:domain rdf:resource="#Validation"/>
555
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#int"/>
556
+ </owl:DatatypeProperty>
557
+ <owl:DatatypeProperty rdf:ID="crossValidationInfo">
558
+ <rdfs:domain rdf:resource="#CrossValidationInfo"/>
559
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#int"/>
560
+ </owl:DatatypeProperty>
561
+ <owl:DatatypeProperty rdf:about="#regressionStatistics">
562
+ <rdfs:domain rdf:resource="#RegressionStatistics"/>
563
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
564
+ </owl:DatatypeProperty>
565
+ <owl:DatatypeProperty rdf:ID="numTrueNegatives">
566
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#int"/>
567
+ <rdfs:domain rdf:resource="#ClassValueStatistics"/>
568
+ </owl:DatatypeProperty>
569
+ <owl:DatatypeProperty rdf:ID="recall">
570
+ <rdfs:domain rdf:resource="#ClassValueStatistics"/>
571
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
572
+ </owl:DatatypeProperty>
573
+ <owl:DatatypeProperty rdf:ID="numInstances">
574
+ <rdfs:domain rdf:resource="#Validation"/>
575
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#int"/>
576
+ </owl:DatatypeProperty>
577
+ <owl:DatatypeProperty rdf:ID="numFalseNegatives">
578
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#int"/>
579
+ <rdfs:domain rdf:resource="#ClassValueStatistics"/>
580
+ </owl:DatatypeProperty>
581
+ <owl:DatatypeProperty rdf:ID="units">
582
+ <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
583
+ >Units</dc:title>
584
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
585
+ >Units for a feature value</rdfs:comment>
586
+ <owl:versionInfo rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
587
+ >TODO: make use of units ontology</owl:versionInfo>
588
+ </owl:DatatypeProperty>
589
+ <owl:DatatypeProperty rdf:ID="areaUnderROC">
590
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
591
+ <rdfs:domain rdf:resource="#ClassValueStatistics"/>
592
+ </owl:DatatypeProperty>
593
+ <owl:DatatypeProperty rdf:ID="randomSeed">
594
+ <rdfs:domain rdf:resource="#Crossvalidation"/>
595
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#long"/>
596
+ </owl:DatatypeProperty>
597
+ <owl:DatatypeProperty rdf:ID="trueNegativeRate">
598
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
599
+ <rdfs:domain rdf:resource="#ClassValueStatistics"/>
600
+ </owl:DatatypeProperty>
601
+ <owl:DatatypeProperty rdf:ID="confusionMatrixValue">
602
+ <rdfs:domain rdf:resource="#ConfusionMatrixCell"/>
603
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#int"/>
604
+ </owl:DatatypeProperty>
605
+ <owl:DatatypeProperty rdf:ID="numTruePositives">
606
+ <rdfs:domain rdf:resource="#ClassValueStatistics"/>
607
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#int"/>
608
+ </owl:DatatypeProperty>
609
+ <owl:TransitiveProperty rdf:ID="isA">
610
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
611
+ >Allows to define "is a" relationships outside of particular class hierarchy</rdfs:comment>
612
+ <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/>
613
+ </owl:TransitiveProperty>
614
+ <owl:FunctionalProperty rdf:ID="validationModel">
615
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
616
+ >Model used in a validation exercise</rdfs:comment>
617
+ <rdfs:subPropertyOf rdf:resource="#validation"/>
618
+ <rdfs:range rdf:resource="#Model"/>
619
+ <rdfs:domain rdf:resource="#Validation"/>
620
+ <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/>
621
+ </owl:FunctionalProperty>
622
+ <owl:FunctionalProperty rdf:ID="numIncorrect">
623
+ <rdfs:domain rdf:resource="#ClassificationStatistics"/>
624
+ <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
625
+ >Number incorrect</dc:title>
626
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#int"/>
627
+ <rdfs:subPropertyOf rdf:resource="#classificationStatistics"/>
628
+ <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
629
+ </owl:FunctionalProperty>
630
+ <owl:FunctionalProperty rdf:ID="percentCorrect">
631
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
632
+ <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
633
+ >Percent Correct</dc:title>
634
+ <rdfs:domain rdf:resource="#ClassificationStatistics"/>
635
+ <rdfs:subPropertyOf rdf:resource="#classificationStatistics"/>
636
+ <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
637
+ </owl:FunctionalProperty>
638
+ <owl:FunctionalProperty rdf:ID="rootMeanSquaredError">
639
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
640
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
641
+ >RootMeanSquaredError</rdfs:comment>
642
+ <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
643
+ <rdfs:subPropertyOf rdf:resource="#regressionStatistics"/>
644
+ </owl:FunctionalProperty>
645
+ <owl:FunctionalProperty rdf:ID="yScramblingEnabled">
646
+ <rdfs:subPropertyOf rdf:resource="#yScramblingInfo"/>
647
+ <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
648
+ <rdfs:domain rdf:resource="#YScrambling"/>
649
+ <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
650
+ >YScramblingEnabled</dc:title>
651
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
652
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
653
+ >YScramblingEnabled</rdfs:comment>
654
+ </owl:FunctionalProperty>
655
+ <owl:FunctionalProperty rdf:ID="yScramblingSeed">
656
+ <rdfs:subPropertyOf rdf:resource="#yScramblingInfo"/>
657
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#int"/>
658
+ <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
659
+ >YScramblingSeed</dc:title>
660
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
661
+ >YScramblingSeed</rdfs:comment>
662
+ <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
663
+ <rdfs:domain rdf:resource="#YScrambling"/>
664
+ </owl:FunctionalProperty>
665
+ <owl:FunctionalProperty rdf:ID="fold">
666
+ <rdfs:domain rdf:resource="#CrossValidationInfo"/>
667
+ <rdfs:subPropertyOf rdf:resource="#crossValidationInfo"/>
668
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#int"/>
669
+ <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
670
+ </owl:FunctionalProperty>
671
+ <owl:FunctionalProperty rdf:about="#has3Dstructure">
672
+ <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
673
+ >Has 3D structure</dc:title>
674
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
675
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
676
+ >True, if the compound has 3D structure</rdfs:comment>
677
+ <rdfs:domain rdf:resource="#Compound"/>
678
+ <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
679
+ </owl:FunctionalProperty>
680
+ <owl:FunctionalProperty rdf:ID="value">
681
+ <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
682
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
683
+ >Literal</rdfs:comment>
684
+ <rdfs:domain rdf:resource="#FeatureValue"/>
685
+ <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
686
+ >Feature value</dc:title>
687
+ </owl:FunctionalProperty>
688
+ <owl:FunctionalProperty rdf:ID="trainingDataset">
689
+ <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/>
690
+ <rdfs:domain rdf:resource="#Model"/>
691
+ <rdfs:subPropertyOf rdf:resource="#model"/>
692
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
693
+ >A model is derived by applying an Algorithm on a training Dataset.</rdfs:comment>
694
+ <rdfs:isDefinedBy rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
695
+ >http://opentox.org/api/1.1</rdfs:isDefinedBy>
696
+ <rdfs:range rdf:resource="#Dataset"/>
697
+ </owl:FunctionalProperty>
698
+ <owl:FunctionalProperty rdf:ID="realRuntime">
699
+ <rdfs:domain rdf:resource="#Validation"/>
700
+ <rdfs:domain rdf:resource="#Crossvalidation"/>
701
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#long"/>
702
+ <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
703
+ </owl:FunctionalProperty>
704
+ <owl:FunctionalProperty rdf:ID="algorithm">
705
+ <rdfs:isDefinedBy rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
706
+ >http://opentox.org/api/1.1</rdfs:isDefinedBy>
707
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
708
+ >The algorithm, used to create the Model</rdfs:comment>
709
+ <rdfs:range rdf:resource="#Algorithm"/>
710
+ <rdfs:subPropertyOf rdf:resource="#model"/>
711
+ <rdfs:domain rdf:resource="#Model"/>
712
+ <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/>
713
+ </owl:FunctionalProperty>
714
+ <owl:FunctionalProperty rdf:ID="numCorrect">
715
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#int"/>
716
+ <rdfs:subPropertyOf rdf:resource="#classificationStatistics"/>
717
+ <rdfs:domain rdf:resource="#ClassificationStatistics"/>
718
+ <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
719
+ >Number correct</dc:title>
720
+ <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
721
+ </owl:FunctionalProperty>
722
+ <owl:FunctionalProperty rdf:ID="hasSource">
723
+ <rdfs:domain rdf:resource="#Feature"/>
724
+ <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/>
725
+ <rdfs:range>
726
+ <owl:Class>
727
+ <owl:unionOf rdf:parseType="Collection">
728
+ <owl:Class rdf:about="#Algorithm"/>
729
+ <owl:Class rdf:about="#Dataset"/>
730
+ <owl:Class rdf:about="#Model"/>
731
+ </owl:unionOf>
732
+ </owl:Class>
733
+ </rdfs:range>
734
+ </owl:FunctionalProperty>
735
+ <owl:FunctionalProperty rdf:ID="paramScope">
736
+ <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
737
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
738
+ >specifies if a parameter is optional or mandatory</rdfs:comment>
739
+ <rdfs:domain rdf:resource="#Parameter"/>
740
+ <rdfs:range>
741
+ <owl:DataRange>
742
+ <owl:oneOf rdf:parseType="Resource">
743
+ <rdf:rest rdf:parseType="Resource">
744
+ <rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/>
745
+ <rdf:first rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
746
+ >optional</rdf:first>
747
+ </rdf:rest>
748
+ <rdf:first rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
749
+ >mandatory</rdf:first>
750
+ </owl:oneOf>
751
+ </owl:DataRange>
752
+ </rdfs:range>
753
+ <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
754
+ >Parameter scope</dc:title>
755
+ </owl:FunctionalProperty>
756
+ <owl:FunctionalProperty rdf:ID="percentageCompleted">
757
+ <rdfs:domain rdf:resource="#Task"/>
758
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
759
+ <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
760
+ >Percentage completed</dc:title>
761
+ <rdfs:subPropertyOf rdf:resource="#classificationStatistics"/>
762
+ <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
763
+ </owl:FunctionalProperty>
764
+ <owl:FunctionalProperty rdf:ID="compound">
765
+ <rdfs:isDefinedBy rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
766
+ >http://opentox.org/api/1.1</rdfs:isDefinedBy>
767
+ <rdfs:range rdf:resource="#Compound"/>
768
+ <rdfs:domain rdf:resource="#DataEntry"/>
769
+ <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/>
770
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
771
+ >A DataEntry is defined with a single compound and multiple feature values. This property sets the relationship between a DataEntry and a Compound</rdfs:comment>
772
+ </owl:FunctionalProperty>
773
+ <owl:FunctionalProperty rdf:ID="percentIncorrect">
774
+ <rdfs:subPropertyOf rdf:resource="#classificationStatistics"/>
775
+ <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
776
+ <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
777
+ >Percent Incorrect</dc:title>
778
+ <rdfs:domain rdf:resource="#ClassificationStatistics"/>
779
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
780
+ </owl:FunctionalProperty>
781
+ <owl:FunctionalProperty rdf:ID="meanAbsolutError">
782
+ <rdfs:subPropertyOf rdf:resource="#regressionStatistics"/>
783
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
784
+ >MeanAbsolutError</rdfs:comment>
785
+ <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
786
+ <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
787
+ </owl:FunctionalProperty>
788
+ <owl:FunctionalProperty rdf:ID="feature">
789
+ <rdfs:range rdf:resource="#Feature"/>
790
+ <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
791
+ >FeatureValue contains a value for specific Feature, specified by this relationship.</rdfs:comment>
792
+ <rdfs:domain rdf:resource="#FeatureValuePair"/>
793
+ <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/>
794
+ <rdfs:isDefinedBy rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
795
+ >http://opentox.org/api/1.1</rdfs:isDefinedBy>
796
+ </owl:FunctionalProperty>
797
+ <owl:AnnotationProperty rdf:about="http://purl.org/dc/elements/1.1/date"/>
798
+ <owl:AnnotationProperty rdf:about="http://purl.org/dc/elements/1.1/source"/>
799
+ <owl:AnnotationProperty rdf:about="http://purl.org/dc/elements/1.1/identifier"/>
800
+ <owl:AnnotationProperty rdf:about="http://purl.org/dc/elements/1.1/title"/>
801
+ <owl:AnnotationProperty rdf:about="http://purl.org/dc/elements/1.1/rights"/>
802
+ <owl:AnnotationProperty rdf:about="http://purl.org/dc/elements/1.1/publisher"/>
803
+ <owl:AnnotationProperty rdf:about="http://purl.org/dc/elements/1.1/description"/>
804
+ <owl:AnnotationProperty rdf:about="http://purl.org/dc/elements/1.1/format"/>
805
+ <owl:AnnotationProperty rdf:about="http://purl.org/dc/elements/1.1/creator"/>
806
+ <owl:AnnotationProperty rdf:about="http://purl.org/dc/elements/1.1/contributor"/>
807
+ </rdf:RDF>
808
+
809
+ <!-- Created with Protege (with OWL Plugin 3.4.1, Build 536) http://protege.stanford.edu -->