diff options
author | Christoph Helma <helma@in-silico.ch> | 2011-04-05 19:14:37 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2011-04-05 19:14:37 +0200 |
commit | 7749e5dae00e0ef4a28ba9dd39182f6a5905a6bf (patch) | |
tree | 97a16e629d1ec1f3073c47635df2b180a128255c /lib/model.rb | |
parent | c0bef2dc83d2ce1fea6434ca73586d49865bb810 (diff) | |
parent | 80c2562c0f84f65b0e3ed02c3293c530d0dc4ce2 (diff) |
Merge branch 'feature/external' into development
Diffstat (limited to 'lib/model.rb')
-rw-r--r-- | lib/model.rb | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/model.rb b/lib/model.rb index 74408d8..422acd2 100644 --- a/lib/model.rb +++ b/lib/model.rb @@ -44,11 +44,10 @@ module OpenTox load_metadata(subjectid) if @metadata==nil or @metadata.size==0 or (@metadata.size==1 && @metadata.values[0]==@uri) algorithm = OpenTox::Algorithm::Generic.find(@metadata[OT.algorithm], subjectid) algorithm_title = algorithm ? algorithm.metadata[DC.title] : nil - algorithm_type = algorithm ? algorithm.metadata[OT.isA] : nil + algorithm_type = algorithm ? algorithm.metadata[RDF.type] : nil dependent_variable = OpenTox::Feature.find( @metadata[OT.dependentVariables],subjectid ) dependent_variable_type = dependent_variable ? dependent_variable.feature_type : nil - type_indicators = [dependent_variable_type, @metadata[OT.isA], @metadata[DC.title], - @uri, algorithm_type, algorithm_title] + type_indicators = [dependent_variable_type, @metadata[RDF.type], @metadata[DC.title], @uri, algorithm_type, algorithm_title].flatten type_indicators.each do |type| case type when /(?i)classification/ @@ -187,7 +186,7 @@ module OpenTox if @neighbors.size == 0 @prediction_dataset.add_feature(prediction_feature_uri, { - OT.isA => OT.MeasuredFeature, + RDF.type => [OT.MeasuredFeature], OT.hasSource => @uri, DC.creator => @uri, DC.title => URI.decode(File.basename( @metadata[OT.dependentVariables] )), @@ -198,7 +197,7 @@ module OpenTox else @prediction_dataset.add_feature(prediction_feature_uri, { - OT.isA => OT.ModelPrediction, + RDF.type => [OT.ModelPrediction], OT.hasSource => @uri, DC.creator => @uri, DC.title => URI.decode(File.basename( @metadata[OT.dependentVariables] )), @@ -215,7 +214,7 @@ module OpenTox feature_uri = File.join( @prediction_dataset.uri, "feature", "descriptor", f.to_s) features[feature] = feature_uri @prediction_dataset.add_feature(feature_uri, { - OT.isA => OT.Substructure, + RDF.type => [OT.Substructure], OT.smarts => feature, OT.pValue => @p_values[feature], OT.effect => @effects[feature] @@ -236,7 +235,7 @@ module OpenTox OT.compound => neighbor[:compound], OT.similarity => neighbor[:similarity], OT.measuredActivity => neighbor[:activity], - OT.isA => OT.Neighbor + RDF.type => [OT.Neighbor] }) @prediction_dataset.add @compound.uri, neighbor_uri, true f = 0 unless f @@ -250,7 +249,7 @@ module OpenTox unless features.has_key? feature features[feature] = feature_uri @prediction_dataset.add_feature(feature_uri, { - OT.isA => OT.Substructure, + RDF.type => [OT.Substructure], OT.smarts => feature, OT.pValue => @p_values[feature], OT.effect => @effects[feature] |