diff options
-rw-r--r-- | lib/dataset.rb | 167 | ||||
-rw-r--r-- | lib/opentox.owl | 809 | ||||
-rw-r--r-- | lib/owl.rb | 8 |
3 files changed, 885 insertions, 99 deletions
diff --git a/lib/dataset.rb b/lib/dataset.rb index b96f3e9..225b900 100644 --- a/lib/dataset.rb +++ b/lib/dataset.rb @@ -7,17 +7,57 @@ module OpenTox super end - def add(compound_uri,feature_uri,value) - c = self.find_or_create_compound compound_uri - f = self.find_or_create_feature feature_uri - v = self.find_or_create_value value - self.add_data_entry(c,f,v) + # create/add to entry from uris or Redland::Resources + # TODO add tuple + def add(compound,feature,value) + compound = self.find_or_create_compound compound unless compound.class == Redland::Resource + feature = self.find_or_create_feature feature unless feature.class == Redland::Resource + data_entry = @model.subject OT['compound'], compound + if data_entry.nil? + data_entry = @model.create_resource + @model.add data_entry, RDF['type'], OT["DataEntry"] + @model.add data_entry, OT['compound'], compound + end + values = @model.create_resource + @model.add data_entry, OT['values'], values + @model.add values, RDF['type'], OT['FeatureValue'] + @model.add values, OT['feature'], feature + @model.add values, OT['value'], value.to_s + end + + def add_tuple(compound,tuple) + compound = self.find_or_create_compound compound unless compound.class == Redland::Resource + data_entry = @model.subject OT['compound'], compound + if data_entry.nil? + data_entry = @model.create_resource + @model.add data_entry, RDF['type'], OT["DataEntry"] + @model.add data_entry, OT['compound'], compound + end + @model.add data_entry, OT['values'], tuple + end + + def create_tuple(feature,t) + feature = self.find_or_create_feature feature unless feature.class == Redland::Resource + tuple = @model.create_resource + @model.add tuple, RDF['type'], OT["Tuple"] + @model.add tuple, OT['feature'], feature + t.each do |name,value| + f = self.find_or_create_feature name unless name.class == Redland::Resource + complex_value = @model.create_resource + feature = self.find_or_create_feature(name) + @model.add tuple, OT['complexValue'], complex_value + @model.add complex_value, RDF['type'], OT["FeatureValue"] + @model.add complex_value, OT['feature'], f + @model.add complex_value, OT['value'], value.to_s + end + tuple end # find or create a new compound and return the resource def find_or_create_compound(uri) compound = @model.subject(DC["identifier"], uri) if compound.nil? + #puts uri compound = @model.create_resource @model.add compound, RDF['type'], OT["Compound"] @model.add compound, DC["identifier"], uri @@ -32,13 +72,14 @@ module OpenTox feature = @model.create_resource @model.add feature, RDF['type'], OT["Feature"] @model.add feature, DC["identifier"], uri - @model.add feature, DC["title"], File.basename(uri) + @model.add feature, DC["title"], File.basename(uri).split(/#/)[1] @model.add feature, DC['source'], uri end feature end # find or create a new value and return the resource +=begin def find_or_create_value(v) value = @model.subject OT["value"], v.to_s if value.nil? @@ -48,47 +89,9 @@ module OpenTox end value end +=end - def tuple?(t) - statements = [] - has_tuple = true - t.each do |name,v| - feature = self.find_or_create_feature(:name => name) - value = self.find_or_create_value(v) - tuple = @model.subject(feature,value) - has_tuple = false if tuple.nil? - statements << [tuple,feature,value] - end - tuples_found = statements.collect{|s| s[0]}.uniq - has_tuple = false unless tuples_found.size == 1 - has_tuple - end - - def create_tuple(t) - tuple = @model.create_resource - @model.add tuple, RDF['type'], OT["Tuple"] - t.each do |name,value| - feature = self.find_or_create_feature(:name => name) - value = self.find_or_create_value(value) - pair = @model.create_resource - @model.add pair, RDF['type'], OT['FeatureValue'] - @model.add tuple, OT['complexValue'], pair - @model.add pair, OT['feature'], feature - @model.add pair, OT['value'], value #FIX - #@model.add tuple, OT['feature'], feature - #@model.add tuple, OT['values'], value - end - tuple - end - - def find_or_create_tuple(t) - if self.tuple?(t) - t - else - self.create_tuple(t) - end - end - +=begin def add_data_entry(compound,feature,value) data_entry = @model.create_resource @model.add data_entry, RDF['type'], OT["DataEntry"] @@ -96,6 +99,7 @@ module OpenTox @model.add data_entry, OT['feature'], feature @model.add data_entry, OT['values'], value end +=end def self.create(data, content_type = 'application/rdf+xml') uri = RestClient.post @@config[:services]["opentox-dataset"], data, :content_type => content_type @@ -254,57 +258,28 @@ module OpenTox end end - - -# def tanimoto(dataset) -# RestClient.get(File.join(@uri,'tanimoto',dataset.path)) -# end -# -# def weighted_tanimoto(dataset) -# RestClient.get(File.join(@uri,'weighted_tanimoto',dataset.path)) -# end =begin - def data_entries - data = {} - @model.subjects(RDF['type'], OT["Compound"]).each do |compound_node| - compound = @model.object(compound_node, DC["identifier"]).to_s#.sub(/^\[(.*)\]$/,'\1') - #compound = OpenTox::Compound.new(:inchi => compound).smiles - data[compound] = [] unless data[compound] - #puts compound - @model.subjects(OT['compound'], compound_node).each do |data_entry| - feature_node = @model.object(data_entry, OT['feature']) - feature = @model.object(feature_node, DC["identifier"]).to_s - values_node = @model.object(data_entry, OT['values']) - type = @model.object(values_node,RDF['type']).to_s - case type - when /FeatureValue/ - @model.find(values_node, OT['value'], nil) do |s,p,value| - case value.to_s - when "true" - data[compound] << {feature => true} - when "false" - data[compound] << {feature => false} - else - data[compound] << {feature => value.to_s} - end - end - when /Tuple/ # this is really slow - t = {} - @model.find(values_node, OT['tuple'], nil) do |s,p,tuple| - @model.find(tuple, OT['feature'], nil) do |s,p,feature| - @name = @model.object(feature,DC['title']).to_s - end - @model.find(tuple, OT['value'], nil) do |s,p,value| - v = @model.object(value,OT['value']).to_s - t[@name] = v - #print @name + ": " - #puts v - end - end - data[compound] << t - end - end + def tuple?(t) + statements = [] + has_tuple = true + t.each do |name,v| + feature = self.find_or_create_feature(:name => name) + value = self.find_or_create_value(v) + tuple = @model.subject(feature,value) + has_tuple = false if tuple.nil? + statements << [tuple,feature,value] + end + tuples_found = statements.collect{|s| s[0]}.uniq + has_tuple = false unless tuples_found.size == 1 + has_tuple + end + + def find_or_create_tuple(t) + if self.tuple?(t) + t + else + self.create_tuple(t) end - data end =end + diff --git a/lib/opentox.owl b/lib/opentox.owl new file mode 100644 index 0000000..4760055 --- /dev/null +++ b/lib/opentox.owl @@ -0,0 +1,809 @@ +<?xml version="1.0"?> +<rdf:RDF + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:protege="http://protege.stanford.edu/plugins/owl/protege#" + xmlns:xsp="http://www.owl-ontologies.com/2005/08/07/xsp.owl#" + xmlns:ot="http://www.opentox.org/api/1.1#" + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:p1="http://purl.org/dc/elements/1.1/#" + xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#" + xmlns:xsd="http://www.w3.org/2001/XMLSchema#" + xmlns:swrl="http://www.w3.org/2003/11/swrl#" + xmlns:swrlb="http://www.w3.org/2003/11/swrlb#" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" + xml:base="http://www.opentox.org/api/1.1"> + <owl:Ontology rdf:about=""> + <dc:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >http://opentox.org/dev/apis/api-1.1</dc:identifier> + <dc:date rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >2009-11-22</dc:date> + <dc:contributor rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >martin.guetlein@gmail.com</dc:contributor> + <dc:contributor rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >jeliazkova.nina@gmail.com</dc:contributor> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >OpenTox resource ontology</rdfs:comment> + <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >OpenTox API</dc:title> + <dc:creator rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >OpenTox</dc:creator> + </owl:Ontology> + <owl:Class rdf:ID="Dataset"> + <dc:description rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + ></dc:description> + <rdfs:seeAlso rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >http://opentox.org/dev/apis/api-1.1/dataset</rdfs:seeAlso> + <dc:creator rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + ></dc:creator> + <dc:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >/dataset/{datasetid}</dc:identifier> + <dc:date rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + ></dc:date> + <dc:source rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >Original source of the dataset</dc:source> + <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + ></dc:title> + <dc:publisher rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + ></dc:publisher> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >Provides access to chemical compounds and their features (e.g. structural, physical-chemical, biological, toxicological properties)</rdfs:comment> + <owl:disjointWith> + <owl:Class rdf:ID="Feature"/> + </owl:disjointWith> + <owl:disjointWith> + <owl:Class rdf:ID="Parameter"/> + </owl:disjointWith> + <dc:contributor rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + ></dc:contributor> + <rdfs:subClassOf> + <owl:Class rdf:ID="OpentoxResource"/> + </rdfs:subClassOf> + <owl:disjointWith> + <owl:Class rdf:ID="Model"/> + </owl:disjointWith> + <owl:disjointWith> + <owl:Class rdf:ID="FeatureValuePair"/> + </owl:disjointWith> + </owl:Class> + <owl:Class rdf:ID="FeatureValue"> + <owl:disjointWith> + <owl:Class rdf:ID="Tuple"/> + </owl:disjointWith> + <rdfs:subClassOf> + <owl:Class rdf:about="#FeatureValuePair"/> + </rdfs:subClassOf> + </owl:Class> + <owl:Class rdf:about="#OpentoxResource"> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >A generic OpenTox resource</rdfs:comment> + <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >name of the resource</dc:title> + <dc:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >URI of the resource</dc:identifier> + <owl:versionInfo rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >1.1</owl:versionInfo> + </owl:Class> + <owl:Class rdf:ID="ConfusionMatrix"> + <rdfs:subClassOf> + <owl:Class rdf:ID="ClassificationStatistics"/> + </rdfs:subClassOf> + </owl:Class> + <owl:Class rdf:about="#Model"> + <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + ></dc:title> + <owl:versionInfo rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >TODO: Specify allowed values for model content</owl:versionInfo> + <dc:format rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >The native format of the model content (e.g. PMML, Weka model, etc.)</dc:format> + <owl:disjointWith> + <owl:Class rdf:about="#Parameter"/> + </owl:disjointWith> + <owl:versionInfo rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >TODO: Introduce a link to User resource</owl:versionInfo> + <dc:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >/model/{modelid}</dc:identifier> + <dc:creator rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >The model creator (perhaps a link to User resource)</dc:creator> + <dc:rights rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + ></dc:rights> + <rdfs:subClassOf rdf:resource="#OpentoxResource"/> + <dc:date rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >The date of model creation</dc:date> + </owl:Class> + <owl:Class rdf:ID="Validation"> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >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> + <dc:date rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >Datetime</dc:date> + <rdfs:seeAlso rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >http://opentox.org/dev/apis/api-1.1/Validation</rdfs:seeAlso> + <rdfs:subClassOf rdf:resource="#OpentoxResource"/> + </owl:Class> + <owl:Class rdf:ID="Report"> + <rdfs:seeAlso rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >http://opentox.org/dev/apis/api-1.1/Validation#validation-report</rdfs:seeAlso> + <rdfs:subClassOf rdf:resource="#OpentoxResource"/> + </owl:Class> + <owl:Class rdf:ID="Algorithm"> + <owl:versionInfo rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >TODO: AlgorithmType, or link to Algorithm ontology</owl:versionInfo> + <owl:versionInfo rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >1.1</owl:versionInfo> + <dc:source rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >Reference</dc:source> + <owl:versionInfo rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >TODO: statistics supported - is it possible to reuse ValidationInfo classes?</owl:versionInfo> + <dc:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >/algorithm/{algorithmid}</dc:identifier> + <dc:description rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + ></dc:description> + <rdfs:seeAlso rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >http://opentox.org/dev/apis/api-1.1/Algorithm</rdfs:seeAlso> + <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >Name of the algorithm</dc:title> + <owl:disjointWith> + <owl:Class rdf:about="#Feature"/> + </owl:disjointWith> + <owl:disjointWith rdf:resource="#Model"/> + <owl:disjointWith> + <owl:Class rdf:ID="Compound"/> + </owl:disjointWith> + <owl:disjointWith rdf:resource="#Dataset"/> + <rdfs:subClassOf rdf:resource="#OpentoxResource"/> + <owl:disjointWith> + <owl:Class rdf:about="#Parameter"/> + </owl:disjointWith> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >Provides access to OpenTox algorithms</rdfs:comment> + <dc:publisher rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + ></dc:publisher> + <owl:disjointWith> + <owl:Class rdf:about="#FeatureValuePair"/> + </owl:disjointWith> + <owl:disjointWith> + <owl:Class rdf:ID="DataEntry"/> + </owl:disjointWith> + </owl:Class> + <owl:Class rdf:ID="CrossValidationInfo"> + <rdfs:subClassOf> + <owl:Class rdf:ID="ValidationInfo"/> + </rdfs:subClassOf> + </owl:Class> + <owl:Class rdf:about="#ValidationInfo"> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >encapsulates validation information</rdfs:comment> + <rdfs:subClassOf rdf:resource="#Validation"/> + </owl:Class> + <owl:Class rdf:about="#Compound"> + <owl:disjointWith rdf:resource="#Model"/> + <owl:disjointWith> + <owl:Class rdf:about="#FeatureValuePair"/> + </owl:disjointWith> + <dc:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >/compound/{compoundid}</dc:identifier> + <rdfs:seeAlso rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >http://opentox.org/dev/apis/api-1.1/structure</rdfs:seeAlso> + <rdfs:subClassOf rdf:resource="#OpentoxResource"/> + <owl:disjointWith> + <owl:Class rdf:about="#Feature"/> + </owl:disjointWith> + <owl:versionInfo rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >1.1</owl:versionInfo> + <owl:disjointWith> + <owl:Class rdf:about="#DataEntry"/> + </owl:disjointWith> + <owl:disjointWith> + <owl:Class rdf:about="#Parameter"/> + </owl:disjointWith> + <owl:disjointWith rdf:resource="#Dataset"/> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >API for OpenTox compound webservices</rdfs:comment> + </owl:Class> + <owl:Class rdf:ID="Conformer"> + <rdfs:subClassOf> + <owl:Restriction> + <owl:onProperty> + <owl:FunctionalProperty rdf:ID="has3Dstructure"/> + </owl:onProperty> + <owl:hasValue rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean" + >true</owl:hasValue> + </owl:Restriction> + </rdfs:subClassOf> + <rdfs:subClassOf rdf:resource="#Compound"/> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >[Optional] support for multiple (e.g. 3D) structures per chemical compound (single structure by default)</rdfs:comment> + <dc:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >/compound/{compoundid}/conformer/{conformerid}</dc:identifier> + </owl:Class> + <owl:Class rdf:about="#ClassificationStatistics"> + <rdfs:subClassOf rdf:resource="#ValidationInfo"/> + </owl:Class> + <owl:Class rdf:about="#FeatureValuePair"> + <dc:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + ></dc:identifier> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + ></rdfs:comment> + <owl:disjointWith> + <owl:Class rdf:about="#Parameter"/> + </owl:disjointWith> + <owl:disjointWith rdf:resource="#Model"/> + <rdfs:subClassOf rdf:resource="#OpentoxResource"/> + </owl:Class> + <owl:Class rdf:about="#Feature"> + <owl:disjointWith rdf:resource="#Model"/> + <owl:versionInfo rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >1.1</owl:versionInfo> + <dc:source rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + ></dc:source> + <rdfs:subClassOf rdf:resource="#OpentoxResource"/> + <owl:disjointWith rdf:resource="#FeatureValuePair"/> + <dc:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >/feature/{featureid}</dc:identifier> + <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + ></dc:title> + <owl:disjointWith> + <owl:Class rdf:about="#Parameter"/> + </owl:disjointWith> + <dc:description rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + ></dc:description> + </owl:Class> + <owl:Class rdf:about="#Parameter"> + <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + ></dc:title> + <rdfs:subClassOf rdf:resource="#OpentoxResource"/> + </owl:Class> + <owl:Class rdf:ID="YScrambling"> + <rdfs:subClassOf rdf:resource="#ValidationInfo"/> + </owl:Class> + <owl:Class rdf:about="#DataEntry"> + <owl:disjointWith rdf:resource="#Feature"/> + <dc:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >/dataset/{datasetid}/compound/{compoundid}?feature_uri[]=featureuris</dc:identifier> + <owl:disjointWith rdf:resource="#Model"/> + <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + ></dc:title> + <owl:versionInfo rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >1.1</owl:versionInfo> + <owl:disjointWith rdf:resource="#Parameter"/> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >Encapsulates a dataset entry - defined by a single Compound (or conformer) and multiple FeatureValues. Could be regarded as "Compound with features"</rdfs:comment> + <owl:disjointWith rdf:resource="#FeatureValuePair"/> + <rdfs:subClassOf rdf:resource="#OpentoxResource"/> + <owl:disjointWith rdf:resource="#Dataset"/> + </owl:Class> + <owl:Class rdf:ID="Task"> + <rdfs:subClassOf rdf:resource="#OpentoxResource"/> + </owl:Class> + <owl:Class rdf:ID="Crossvalidation"> + <rdfs:subClassOf rdf:resource="#OpentoxResource"/> + </owl:Class> + <owl:Class rdf:ID="EmptyDataset"> + <rdfs:subClassOf rdf:resource="#Dataset"/> + </owl:Class> + <owl:Class rdf:about="#Tuple"> + <owl:disjointWith rdf:resource="#FeatureValue"/> + <rdfs:subClassOf rdf:resource="#FeatureValuePair"/> + </owl:Class> + <owl:Class rdf:ID="ClassValueStatistics"> + <rdfs:subClassOf rdf:resource="#ClassificationStatistics"/> + </owl:Class> + <owl:Class rdf:ID="ConfusionMatrixCell"> + <rdfs:subClassOf rdf:resource="#ConfusionMatrix"/> + </owl:Class> + <owl:Class rdf:ID="RegressionStatistics"> + <rdfs:subClassOf rdf:resource="#ValidationInfo"/> + </owl:Class> + <owl:ObjectProperty rdf:ID="conformer"> + <rdfs:domain rdf:resource="#Compound"/> + <rdfs:range rdf:resource="#Conformer"/> + </owl:ObjectProperty> + <owl:ObjectProperty rdf:ID="crossvalidationDataset"> + <rdfs:range rdf:resource="#Dataset"/> + <rdfs:domain rdf:resource="#Crossvalidation"/> + </owl:ObjectProperty> + <owl:ObjectProperty rdf:ID="validation"> + <rdfs:range rdf:resource="#ValidationInfo"/> + <rdfs:domain rdf:resource="#Validation"/> + </owl:ObjectProperty> + <owl:ObjectProperty rdf:ID="confusionMatrixPredicted"> + <rdfs:range rdf:resource="#FeatureValuePair"/> + <rdfs:domain rdf:resource="#ConfusionMatrixCell"/> + <rdfs:subPropertyOf> + <owl:ObjectProperty rdf:ID="confusionMatrixEntry"/> + </rdfs:subPropertyOf> + </owl:ObjectProperty> + <owl:ObjectProperty rdf:ID="validationPredictionDataset"> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >PredictionDatasetURI</rdfs:comment> + <rdfs:subPropertyOf rdf:resource="#validation"/> + <rdfs:domain rdf:resource="#Validation"/> + <rdfs:range rdf:resource="#Dataset"/> + </owl:ObjectProperty> + <owl:ObjectProperty rdf:ID="validationTrainingDataset"> + <rdfs:subPropertyOf rdf:resource="#validation"/> + <rdfs:range rdf:resource="#Dataset"/> + <rdfs:domain rdf:resource="#Validation"/> + </owl:ObjectProperty> + <owl:ObjectProperty rdf:ID="complexValue"> + <rdfs:range rdf:resource="#FeatureValue"/> + <rdfs:domain rdf:resource="#Tuple"/> + </owl:ObjectProperty> + <owl:ObjectProperty rdf:ID="model"> + <rdfs:domain rdf:resource="#Model"/> + <rdfs:range rdf:resource="#Dataset"/> + </owl:ObjectProperty> + <owl:ObjectProperty rdf:ID="dependentVariables"> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >A model can have one or more dependent variables, described as multiple features, specified by this relationship.</rdfs:comment> + <rdfs:domain rdf:resource="#Model"/> + <rdfs:subPropertyOf rdf:resource="#model"/> + <rdfs:range rdf:resource="#Feature"/> + </owl:ObjectProperty> + <owl:ObjectProperty rdf:ID="crossvalidationAlgorithm"> + <rdfs:range rdf:resource="#Algorithm"/> + <rdfs:domain rdf:resource="#Crossvalidation"/> + </owl:ObjectProperty> + <owl:ObjectProperty rdf:ID="validationCrossvalidation"> + <rdfs:range rdf:resource="#Crossvalidation"/> + <rdfs:domain rdf:resource="#CrossValidationInfo"/> + </owl:ObjectProperty> + <owl:ObjectProperty rdf:ID="parameters"> + <rdfs:subPropertyOf rdf:resource="#model"/> + <rdfs:range rdf:resource="#Parameter"/> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >Algorithms and Models can have multiple parameters</rdfs:comment> + <rdfs:isDefinedBy rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >http://opentox.org/api/1.1</rdfs:isDefinedBy> + <rdfs:domain> + <owl:Class> + <owl:unionOf rdf:parseType="Collection"> + <owl:Class rdf:about="#Algorithm"/> + <owl:Class rdf:about="#Model"/> + </owl:unionOf> + </owl:Class> + </rdfs:domain> + </owl:ObjectProperty> + <owl:ObjectProperty rdf:ID="validationTestDataset"> + <rdfs:range rdf:resource="#Dataset"/> + <rdfs:subPropertyOf rdf:resource="#validation"/> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >Test dataset , used in a validation exercise</rdfs:comment> + <rdfs:domain rdf:resource="#Validation"/> + </owl:ObjectProperty> + <owl:ObjectProperty rdf:ID="predictedVariables"> + <rdfs:range rdf:resource="#Feature"/> + <rdfs:subPropertyOf rdf:resource="#model"/> + <rdfs:isDefinedBy rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >http://opentox.org/api/1.1</rdfs:isDefinedBy> + <rdfs:domain rdf:resource="#Model"/> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >Variables, holding the predicted values, generated by the model</rdfs:comment> + </owl:ObjectProperty> + <owl:ObjectProperty rdf:ID="dataEntry"> + <rdfs:isDefinedBy rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >http://opentox.org/api/1.1</rdfs:isDefinedBy> + <rdfs:range rdf:resource="#DataEntry"/> + <rdfs:domain rdf:resource="#Dataset"/> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >A Dataset contains multiple DataEntries. This property specifies the relationship between Dataset and DataEntry.</rdfs:comment> + </owl:ObjectProperty> + <owl:ObjectProperty rdf:ID="unscrambledDatasetURI"> + <rdfs:domain rdf:resource="#YScrambling"/> + <rdfs:subPropertyOf rdf:resource="#validation"/> + <rdfs:range rdf:resource="#Dataset"/> + <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >a link to UnscrambledDataset</dc:title> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >UnscrambledDatasetURI</rdfs:comment> + </owl:ObjectProperty> + <owl:ObjectProperty rdf:ID="independentVariables"> + <rdfs:domain rdf:resource="#Model"/> + <rdfs:isDefinedBy rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >http://opentox.org/api/1.1</rdfs:isDefinedBy> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >A model can have multiple independent variables, described as multiple features, specified by this relationship.</rdfs:comment> + <rdfs:subPropertyOf rdf:resource="#model"/> + <rdfs:range rdf:resource="#Feature"/> + </owl:ObjectProperty> + <owl:ObjectProperty rdf:ID="hasValidationInfo"> + <rdfs:subPropertyOf rdf:resource="#validation"/> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >Links Validation with Validation Info. One validation exercise may have multiple types of validation informaton</rdfs:comment> + <rdfs:domain rdf:resource="#Validation"/> + <rdfs:range rdf:resource="#ValidationInfo"/> + </owl:ObjectProperty> + <owl:ObjectProperty rdf:ID="predictedFeature"> + <rdfs:domain rdf:resource="#Validation"/> + <rdfs:range rdf:resource="#Feature"/> + <rdfs:subPropertyOf rdf:resource="#validation"/> + </owl:ObjectProperty> + <owl:ObjectProperty rdf:ID="classValue"> + <rdfs:domain rdf:resource="#ClassValueStatistics"/> + <rdfs:range rdf:resource="#FeatureValuePair"/> + <rdfs:subPropertyOf> + <owl:ObjectProperty rdf:ID="classValueStatistics"/> + </rdfs:subPropertyOf> + </owl:ObjectProperty> + <owl:ObjectProperty rdf:about="#confusionMatrixEntry"> + <rdfs:range rdf:resource="#ConfusionMatrixCell"/> + <rdfs:domain rdf:resource="#ConfusionMatrix"/> + <rdfs:subPropertyOf> + <owl:ObjectProperty rdf:ID="confusionMatrix"/> + </rdfs:subPropertyOf> + </owl:ObjectProperty> + <owl:ObjectProperty rdf:ID="report"> + <rdfs:domain rdf:resource="#Report"/> + <rdfs:range rdf:resource="#Validation"/> + </owl:ObjectProperty> + <owl:ObjectProperty rdf:ID="values"> + <rdfs:range rdf:resource="#FeatureValuePair"/> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >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> + <rdfs:isDefinedBy rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >http://opentox.org/api/1.1</rdfs:isDefinedBy> + <rdfs:domain rdf:resource="#DataEntry"/> + </owl:ObjectProperty> + <owl:ObjectProperty rdf:about="#classValueStatistics"> + <rdfs:domain rdf:resource="#ClassificationStatistics"/> + <rdfs:range rdf:resource="#ClassValueStatistics"/> + </owl:ObjectProperty> + <owl:ObjectProperty rdf:about="#confusionMatrix"> + <rdfs:domain rdf:resource="#ClassificationStatistics"/> + <rdfs:range rdf:resource="#ConfusionMatrix"/> + </owl:ObjectProperty> + <owl:ObjectProperty rdf:ID="confusionMatrixActual"> + <rdfs:domain rdf:resource="#ConfusionMatrixCell"/> + <rdfs:subPropertyOf rdf:resource="#confusionMatrixEntry"/> + <rdfs:range rdf:resource="#FeatureValuePair"/> + </owl:ObjectProperty> + <owl:ObjectProperty rdf:ID="validationReport"> + <rdfs:range rdf:resource="#Validation"/> + <rdfs:subPropertyOf rdf:resource="#report"/> + <rdfs:domain rdf:resource="#Report"/> + </owl:ObjectProperty> + <owl:DatatypeProperty rdf:ID="precision"> + <rdfs:domain rdf:resource="#ClassValueStatistics"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/> + </owl:DatatypeProperty> + <owl:DatatypeProperty rdf:ID="numFalsePositives"> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#int"/> + <rdfs:domain rdf:resource="#ClassValueStatistics"/> + </owl:DatatypeProperty> + <owl:DatatypeProperty rdf:ID="stratified"> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/> + <rdfs:domain rdf:resource="#Crossvalidation"/> + </owl:DatatypeProperty> + <owl:DatatypeProperty rdf:ID="numFolds"> + <rdfs:domain rdf:resource="#Crossvalidation"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#int"/> + </owl:DatatypeProperty> + <owl:DatatypeProperty rdf:ID="falsePositiveRate"> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/> + <rdfs:domain rdf:resource="#ClassValueStatistics"/> + </owl:DatatypeProperty> + <owl:DatatypeProperty rdf:ID="fMeasure"> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/> + <rdfs:domain rdf:resource="#ClassValueStatistics"/> + </owl:DatatypeProperty> + <owl:DatatypeProperty rdf:ID="yScramblingInfo"> + <rdfs:domain rdf:resource="#YScrambling"/> + </owl:DatatypeProperty> + <owl:DatatypeProperty rdf:ID="falseNegativeRate"> + <rdfs:domain rdf:resource="#ClassValueStatistics"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/> + </owl:DatatypeProperty> + <owl:DatatypeProperty rdf:ID="hasStatus"> + <rdfs:range> + <owl:DataRange> + <owl:oneOf rdf:parseType="Resource"> + <rdf:first rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >Cancelled</rdf:first> + <rdf:rest rdf:parseType="Resource"> + <rdf:rest rdf:parseType="Resource"> + <rdf:first rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >Running</rdf:first> + <rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/> + </rdf:rest> + <rdf:first rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >Completed</rdf:first> + </rdf:rest> + </owl:oneOf> + </owl:DataRange> + </rdfs:range> + <rdfs:domain rdf:resource="#Task"/> + </owl:DatatypeProperty> + <owl:DatatypeProperty rdf:ID="percentUnpredicted"> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/> + <rdfs:domain rdf:resource="#Validation"/> + </owl:DatatypeProperty> + <owl:DatatypeProperty rdf:ID="classificationStatistics"> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/> + <rdfs:domain rdf:resource="#ClassificationStatistics"/> + </owl:DatatypeProperty> + <owl:DatatypeProperty rdf:ID="rSquare"> + <rdfs:subPropertyOf> + <owl:DatatypeProperty rdf:ID="regressionStatistics"/> + </rdfs:subPropertyOf> + <rdfs:domain rdf:resource="#RegressionStatistics"/> + </owl:DatatypeProperty> + <owl:DatatypeProperty rdf:ID="truePositiveRate"> + <rdfs:domain rdf:resource="#ClassValueStatistics"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/> + </owl:DatatypeProperty> + <owl:DatatypeProperty rdf:ID="percentWithoutClass"> + <rdfs:domain rdf:resource="#Validation"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/> + </owl:DatatypeProperty> + <owl:DatatypeProperty rdf:ID="numWithoutClass"> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#int"/> + <rdfs:domain rdf:resource="#Validation"/> + </owl:DatatypeProperty> + <owl:DatatypeProperty rdf:ID="paramValue"> + <rdfs:domain rdf:resource="#Parameter"/> + <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >Parameter value</dc:title> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >The value of a Parameter</rdfs:comment> + </owl:DatatypeProperty> + <owl:DatatypeProperty rdf:ID="statisticsSupported"> + <rdfs:domain rdf:resource="#Algorithm"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/> + </owl:DatatypeProperty> + <owl:DatatypeProperty rdf:ID="numUnpredicted"> + <rdfs:domain rdf:resource="#Validation"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#int"/> + </owl:DatatypeProperty> + <owl:DatatypeProperty rdf:ID="crossValidationInfo"> + <rdfs:domain rdf:resource="#CrossValidationInfo"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#int"/> + </owl:DatatypeProperty> + <owl:DatatypeProperty rdf:about="#regressionStatistics"> + <rdfs:domain rdf:resource="#RegressionStatistics"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/> + </owl:DatatypeProperty> + <owl:DatatypeProperty rdf:ID="numTrueNegatives"> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#int"/> + <rdfs:domain rdf:resource="#ClassValueStatistics"/> + </owl:DatatypeProperty> + <owl:DatatypeProperty rdf:ID="recall"> + <rdfs:domain rdf:resource="#ClassValueStatistics"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/> + </owl:DatatypeProperty> + <owl:DatatypeProperty rdf:ID="numInstances"> + <rdfs:domain rdf:resource="#Validation"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#int"/> + </owl:DatatypeProperty> + <owl:DatatypeProperty rdf:ID="numFalseNegatives"> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#int"/> + <rdfs:domain rdf:resource="#ClassValueStatistics"/> + </owl:DatatypeProperty> + <owl:DatatypeProperty rdf:ID="units"> + <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >Units</dc:title> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >Units for a feature value</rdfs:comment> + <owl:versionInfo rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >TODO: make use of units ontology</owl:versionInfo> + </owl:DatatypeProperty> + <owl:DatatypeProperty rdf:ID="areaUnderROC"> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/> + <rdfs:domain rdf:resource="#ClassValueStatistics"/> + </owl:DatatypeProperty> + <owl:DatatypeProperty rdf:ID="randomSeed"> + <rdfs:domain rdf:resource="#Crossvalidation"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#long"/> + </owl:DatatypeProperty> + <owl:DatatypeProperty rdf:ID="trueNegativeRate"> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/> + <rdfs:domain rdf:resource="#ClassValueStatistics"/> + </owl:DatatypeProperty> + <owl:DatatypeProperty rdf:ID="confusionMatrixValue"> + <rdfs:domain rdf:resource="#ConfusionMatrixCell"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#int"/> + </owl:DatatypeProperty> + <owl:DatatypeProperty rdf:ID="numTruePositives"> + <rdfs:domain rdf:resource="#ClassValueStatistics"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#int"/> + </owl:DatatypeProperty> + <owl:TransitiveProperty rdf:ID="isA"> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >Allows to define "is a" relationships outside of particular class hierarchy</rdfs:comment> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> + </owl:TransitiveProperty> + <owl:FunctionalProperty rdf:ID="validationModel"> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >Model used in a validation exercise</rdfs:comment> + <rdfs:subPropertyOf rdf:resource="#validation"/> + <rdfs:range rdf:resource="#Model"/> + <rdfs:domain rdf:resource="#Validation"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> + </owl:FunctionalProperty> + <owl:FunctionalProperty rdf:ID="numIncorrect"> + <rdfs:domain rdf:resource="#ClassificationStatistics"/> + <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >Number incorrect</dc:title> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#int"/> + <rdfs:subPropertyOf rdf:resource="#classificationStatistics"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/> + </owl:FunctionalProperty> + <owl:FunctionalProperty rdf:ID="percentCorrect"> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/> + <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >Percent Correct</dc:title> + <rdfs:domain rdf:resource="#ClassificationStatistics"/> + <rdfs:subPropertyOf rdf:resource="#classificationStatistics"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/> + </owl:FunctionalProperty> + <owl:FunctionalProperty rdf:ID="rootMeanSquaredError"> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >RootMeanSquaredError</rdfs:comment> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/> + <rdfs:subPropertyOf rdf:resource="#regressionStatistics"/> + </owl:FunctionalProperty> + <owl:FunctionalProperty rdf:ID="yScramblingEnabled"> + <rdfs:subPropertyOf rdf:resource="#yScramblingInfo"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/> + <rdfs:domain rdf:resource="#YScrambling"/> + <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >YScramblingEnabled</dc:title> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >YScramblingEnabled</rdfs:comment> + </owl:FunctionalProperty> + <owl:FunctionalProperty rdf:ID="yScramblingSeed"> + <rdfs:subPropertyOf rdf:resource="#yScramblingInfo"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#int"/> + <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >YScramblingSeed</dc:title> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >YScramblingSeed</rdfs:comment> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/> + <rdfs:domain rdf:resource="#YScrambling"/> + </owl:FunctionalProperty> + <owl:FunctionalProperty rdf:ID="fold"> + <rdfs:domain rdf:resource="#CrossValidationInfo"/> + <rdfs:subPropertyOf rdf:resource="#crossValidationInfo"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#int"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/> + </owl:FunctionalProperty> + <owl:FunctionalProperty rdf:about="#has3Dstructure"> + <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >Has 3D structure</dc:title> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >True, if the compound has 3D structure</rdfs:comment> + <rdfs:domain rdf:resource="#Compound"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/> + </owl:FunctionalProperty> + <owl:FunctionalProperty rdf:ID="value"> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >Literal</rdfs:comment> + <rdfs:domain rdf:resource="#FeatureValue"/> + <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >Feature value</dc:title> + </owl:FunctionalProperty> + <owl:FunctionalProperty rdf:ID="trainingDataset"> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> + <rdfs:domain rdf:resource="#Model"/> + <rdfs:subPropertyOf rdf:resource="#model"/> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >A model is derived by applying an Algorithm on a training Dataset.</rdfs:comment> + <rdfs:isDefinedBy rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >http://opentox.org/api/1.1</rdfs:isDefinedBy> + <rdfs:range rdf:resource="#Dataset"/> + </owl:FunctionalProperty> + <owl:FunctionalProperty rdf:ID="realRuntime"> + <rdfs:domain rdf:resource="#Validation"/> + <rdfs:domain rdf:resource="#Crossvalidation"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#long"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/> + </owl:FunctionalProperty> + <owl:FunctionalProperty rdf:ID="algorithm"> + <rdfs:isDefinedBy rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >http://opentox.org/api/1.1</rdfs:isDefinedBy> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >The algorithm, used to create the Model</rdfs:comment> + <rdfs:range rdf:resource="#Algorithm"/> + <rdfs:subPropertyOf rdf:resource="#model"/> + <rdfs:domain rdf:resource="#Model"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> + </owl:FunctionalProperty> + <owl:FunctionalProperty rdf:ID="numCorrect"> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#int"/> + <rdfs:subPropertyOf rdf:resource="#classificationStatistics"/> + <rdfs:domain rdf:resource="#ClassificationStatistics"/> + <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >Number correct</dc:title> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/> + </owl:FunctionalProperty> + <owl:FunctionalProperty rdf:ID="hasSource"> + <rdfs:domain rdf:resource="#Feature"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> + <rdfs:range> + <owl:Class> + <owl:unionOf rdf:parseType="Collection"> + <owl:Class rdf:about="#Algorithm"/> + <owl:Class rdf:about="#Dataset"/> + <owl:Class rdf:about="#Model"/> + </owl:unionOf> + </owl:Class> + </rdfs:range> + </owl:FunctionalProperty> + <owl:FunctionalProperty rdf:ID="paramScope"> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >specifies if a parameter is optional or mandatory</rdfs:comment> + <rdfs:domain rdf:resource="#Parameter"/> + <rdfs:range> + <owl:DataRange> + <owl:oneOf rdf:parseType="Resource"> + <rdf:rest rdf:parseType="Resource"> + <rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/> + <rdf:first rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >optional</rdf:first> + </rdf:rest> + <rdf:first rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >mandatory</rdf:first> + </owl:oneOf> + </owl:DataRange> + </rdfs:range> + <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >Parameter scope</dc:title> + </owl:FunctionalProperty> + <owl:FunctionalProperty rdf:ID="percentageCompleted"> + <rdfs:domain rdf:resource="#Task"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/> + <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >Percentage completed</dc:title> + <rdfs:subPropertyOf rdf:resource="#classificationStatistics"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/> + </owl:FunctionalProperty> + <owl:FunctionalProperty rdf:ID="compound"> + <rdfs:isDefinedBy rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >http://opentox.org/api/1.1</rdfs:isDefinedBy> + <rdfs:range rdf:resource="#Compound"/> + <rdfs:domain rdf:resource="#DataEntry"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >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> + </owl:FunctionalProperty> + <owl:FunctionalProperty rdf:ID="percentIncorrect"> + <rdfs:subPropertyOf rdf:resource="#classificationStatistics"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/> + <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >Percent Incorrect</dc:title> + <rdfs:domain rdf:resource="#ClassificationStatistics"/> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/> + </owl:FunctionalProperty> + <owl:FunctionalProperty rdf:ID="meanAbsolutError"> + <rdfs:subPropertyOf rdf:resource="#regressionStatistics"/> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >MeanAbsolutError</rdfs:comment> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/> + </owl:FunctionalProperty> + <owl:FunctionalProperty rdf:ID="feature"> + <rdfs:range rdf:resource="#Feature"/> + <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >FeatureValue contains a value for specific Feature, specified by this relationship.</rdfs:comment> + <rdfs:domain rdf:resource="#FeatureValuePair"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> + <rdfs:isDefinedBy rdf:datatype="http://www.w3.org/2001/XMLSchema#string" + >http://opentox.org/api/1.1</rdfs:isDefinedBy> + </owl:FunctionalProperty> + <owl:AnnotationProperty rdf:about="http://purl.org/dc/elements/1.1/date"/> + <owl:AnnotationProperty rdf:about="http://purl.org/dc/elements/1.1/source"/> + <owl:AnnotationProperty rdf:about="http://purl.org/dc/elements/1.1/identifier"/> + <owl:AnnotationProperty rdf:about="http://purl.org/dc/elements/1.1/title"/> + <owl:AnnotationProperty rdf:about="http://purl.org/dc/elements/1.1/rights"/> + <owl:AnnotationProperty rdf:about="http://purl.org/dc/elements/1.1/publisher"/> + <owl:AnnotationProperty rdf:about="http://purl.org/dc/elements/1.1/description"/> + <owl:AnnotationProperty rdf:about="http://purl.org/dc/elements/1.1/format"/> + <owl:AnnotationProperty rdf:about="http://purl.org/dc/elements/1.1/creator"/> + <owl:AnnotationProperty rdf:about="http://purl.org/dc/elements/1.1/contributor"/> +</rdf:RDF> + +<!-- Created with Protege (with OWL Plugin 3.4.1, Build 536) http://protege.stanford.edu --> @@ -21,7 +21,6 @@ module OpenTox end def uri=(uri) - puts "assigning uri" @uri = uri uri = Redland::Uri.new(uri) # rewrite uri @@ -40,8 +39,11 @@ module OpenTox end def title - me = @model.subject(RDF['type'],OT[self.owl_class]) - @model.object(me, DC['title']).to_s unless me.nil? + # I have no idea, why 2 subjects are returned + # iterating over all subjects leads to memory allocation problems + # SPARQL queries also do not work + me = @model.subjects(RDF['type'],OT[self.owl_class])[1] + @model.object(me, DC['title']).to_s end def title=(title) |