bel 0.7.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{bel.gemspec → .gemspec} +8 -4
- data/README.md +3 -3
- data/VERSION +1 -0
- data/bin/bel +8 -8
- data/bin/bel2rdf.rb +1 -1
- data/bin/bel_summarize.rb +4 -4
- data/bin/bel_upgrade.rb +6 -6
- data/lib/bel.rb +3 -2
- data/lib/bel/completion.rb +13 -10
- data/lib/bel/completion_rule.rb +29 -21
- data/lib/bel/dsl.rb +75 -0
- data/lib/bel/gen.rb +2 -2
- data/lib/bel/gen/annotation.rb +2 -2
- data/lib/bel/gen/citation.rb +6 -6
- data/lib/bel/gen/document_header.rb +1 -1
- data/lib/bel/gen/{evidence.rb → nanopub.rb} +15 -15
- data/lib/bel/gen/parameter.rb +6 -6
- data/lib/bel/gen/sample_resources.rb +4 -4
- data/lib/bel/gen/statement.rb +1 -1
- data/lib/bel/gen/term.rb +1 -1
- data/lib/bel/language.rb +0 -20
- data/lib/bel/namespace.rb +7 -3
- data/lib/bel/nanopub.rb +15 -0
- data/lib/bel/{evidence_model/buffering_evidence_combiner.rb → nanopub/buffering_nanopub_combiner.rb} +39 -45
- data/lib/bel/{evidence_model → nanopub}/citation.rb +2 -2
- data/lib/bel/{evidence_model → nanopub}/experiment_context.rb +7 -1
- data/lib/bel/{evidence_model → nanopub}/hash_map_references.rb +1 -1
- data/lib/bel/{evidence_model → nanopub}/map_references.rb +1 -1
- data/lib/bel/nanopub/map_references_combiner.rb +30 -0
- data/lib/bel/nanopub/metadata.rb +102 -0
- data/lib/bel/nanopub/nanopub.rb +122 -0
- data/lib/bel/{evidence_model → nanopub}/references.rb +50 -38
- data/lib/bel/{evidence_model/streaming_evidence_combiner.rb → nanopub/streaming_nanopub_combiner.rb} +8 -8
- data/lib/bel/{evidence_model/summary_text.rb → nanopub/support.rb} +8 -2
- data/lib/bel/{evidence_model → nanopub}/util.rb +10 -10
- data/lib/bel/resource/annotation.rb +15 -24
- data/lib/bel/resource/annotation_value.rb +24 -20
- data/lib/bel/resource/annotations.rb +12 -11
- data/lib/bel/resource/concept.rb +62 -0
- data/lib/bel/resource/concept_scheme.rb +49 -0
- data/lib/bel/resource/namespace.rb +15 -24
- data/lib/bel/resource/namespace_value.rb +26 -23
- data/lib/bel/resource/namespaces.rb +11 -11
- data/lib/bel/script.rb +367 -367
- data/lib/bel/translate.rb +7 -7
- data/lib/bel/translator.rb +10 -10
- data/lib/bel/translator/plugins/bnj.rb +37 -0
- data/lib/bel/translator/plugins/{json_evidence → bnj}/translator.rb +17 -34
- data/lib/bel/translator/plugins/jgf.rb +1 -1
- data/lib/bel/translator/plugins/jgf/translator.rb +10 -10
- data/lib/bel/translator/plugins/jsonld.rb +1 -1
- data/lib/bel/translator/plugins/nquads.rb +1 -1
- data/lib/bel/translator/plugins/ntriples.rb +1 -1
- data/lib/bel/translator/plugins/rdf/bel_schema.rb +134 -126
- data/lib/bel/translator/plugins/rdf/graph_translator.rb +6 -6
- data/lib/bel/translator/plugins/rdf/monkey_patch.rb +50 -49
- data/lib/bel/translator/plugins/rdf/reader.rb +42 -42
- data/lib/bel/translator/plugins/rdf/translator.rb +6 -6
- data/lib/bel/translator/plugins/rdf/writer.rb +4 -4
- data/lib/bel/translator/plugins/rdf2/belv2_0.rb +416 -0
- data/lib/bel/translator/plugins/rdf2/converter.rb +13 -0
- data/lib/bel/translator/plugins/rdf2/namespace_converter.rb +24 -0
- data/lib/bel/translator/plugins/rdf2/nanopub_converter.rb +82 -0
- data/lib/bel/translator/plugins/rdf2/parameter_converter.rb +50 -0
- data/lib/bel/translator/plugins/rdf2/rdf_converter.rb +13 -0
- data/lib/bel/translator/plugins/rdf2/rdf_writer.rb +63 -0
- data/lib/bel/translator/plugins/rdf2/reader.rb +172 -0
- data/lib/bel/translator/plugins/rdf2/relationship_converter.rb +49 -0
- data/lib/bel/translator/plugins/rdf2/statement_converter.rb +65 -0
- data/lib/bel/translator/plugins/rdf2/term_converter.rb +262 -0
- data/lib/bel/translator/plugins/rdf2/translator.rb +51 -0
- data/lib/bel/translator/plugins/rdf2/uuid.rb +20 -0
- data/lib/bel/translator/plugins/rdf2/writer.rb +53 -0
- data/lib/bel/translator/plugins/rdfa.rb +1 -1
- data/lib/bel/translator/plugins/rdfxml.rb +1 -1
- data/lib/bel/translator/plugins/rj.rb +1 -1
- data/lib/bel/translator/plugins/trig.rb +1 -1
- data/lib/bel/translator/plugins/trix.rb +1 -1
- data/lib/bel/translator/plugins/turtle.rb +3 -6
- data/lib/bel/translator/plugins/xbel.rb +5 -6
- data/lib/bel/translator/plugins/xbel/nanopub_handler.rb +625 -0
- data/lib/bel/translator/plugins/xbel/{evidence_yielder.rb → nanopub_yielder.rb} +3 -3
- data/lib/bel/translator/plugins/xbel/translator.rb +2 -5
- data/lib/bel/translator/plugins/xbel/xbel_yielder.rb +135 -74
- data/lib/bel/version.rb +31 -1
- metadata +81 -33
- data/lib/bel/evidence_model.rb +0 -15
- data/lib/bel/evidence_model/bel_parameter.rb +0 -56
- data/lib/bel/evidence_model/bel_statement.rb +0 -97
- data/lib/bel/evidence_model/bel_term.rb +0 -87
- data/lib/bel/evidence_model/evidence.rb +0 -127
- data/lib/bel/evidence_model/map_references_combiner.rb +0 -30
- data/lib/bel/evidence_model/metadata.rb +0 -49
- data/lib/bel/parser.rb +0 -39
- data/lib/bel/translator/plugins/bel_script.rb +0 -36
- data/lib/bel/translator/plugins/bel_script/bel_citation_serialization.rb +0 -125
- data/lib/bel/translator/plugins/bel_script/bel_discrete_serialization.rb +0 -109
- data/lib/bel/translator/plugins/bel_script/bel_top_down_serialization.rb +0 -100
- data/lib/bel/translator/plugins/bel_script/bel_yielder.rb +0 -180
- data/lib/bel/translator/plugins/bel_script/evidence_serialization.rb +0 -79
- data/lib/bel/translator/plugins/bel_script/evidence_yielder.rb +0 -87
- data/lib/bel/translator/plugins/bel_script/translator.rb +0 -35
- data/lib/bel/translator/plugins/json_evidence.rb +0 -38
- data/lib/bel/translator/plugins/xbel/evidence_handler.rb +0 -495
data/lib/bel/translate.rb
CHANGED
@@ -10,7 +10,7 @@ module BEL
|
|
10
10
|
# mixin.
|
11
11
|
module ClassMethods
|
12
12
|
|
13
|
-
# Return a stream of {::BEL::
|
13
|
+
# Return a stream of {::BEL::Nanopub::Nanopub} objects for the input.
|
14
14
|
#
|
15
15
|
# @param [IO] input the IO to read from
|
16
16
|
# @param [Symbol] input_format the symbol that can be
|
@@ -18,18 +18,18 @@ module BEL
|
|
18
18
|
# +input+
|
19
19
|
# @param [Hash{Symbol => Object}] options
|
20
20
|
# @return [#each] an object that responds to +each+ and
|
21
|
-
# provides {::BEL::
|
22
|
-
def
|
21
|
+
# provides {::BEL::Nanopub::Nanopub} objects
|
22
|
+
def nanopub(input, input_format, options = {})
|
23
23
|
prepared_input = process_input(input)
|
24
24
|
|
25
25
|
in_translator = self.translator(input_format) or
|
26
26
|
raise TranslateError.new(input_format)
|
27
27
|
|
28
|
-
in_translator.read(prepared_input)
|
28
|
+
in_translator.read(prepared_input, options)
|
29
29
|
end
|
30
30
|
|
31
31
|
# Translate from one file format to another using
|
32
|
-
# {::BEL::
|
32
|
+
# {::BEL::Nanopub::Nanopub} as a shared model. The translation is written
|
33
33
|
# to the IO +writer+ directly.
|
34
34
|
#
|
35
35
|
# @param [IO] input the IO to read from
|
@@ -49,8 +49,8 @@ module BEL
|
|
49
49
|
out_translator = self.translator(output_format, options) or
|
50
50
|
raise TranslateError.new(output_format)
|
51
51
|
|
52
|
-
|
53
|
-
out_translator.write(
|
52
|
+
nanopub = in_translator.read(prepared_input, options)
|
53
|
+
out_translator.write(nanopub, writer, options)
|
54
54
|
writer
|
55
55
|
end
|
56
56
|
|
data/lib/bel/translator.rb
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
module BEL
|
2
2
|
|
3
3
|
# The Translator module defines a plugin that reads a specific document
|
4
|
-
# format into BEL
|
4
|
+
# format into BEL nanopubs and writes BEL nanopubs back to this document
|
5
5
|
# format.
|
6
6
|
#
|
7
7
|
# - Read
|
8
8
|
# - {#read}: read the input format and parse to
|
9
|
-
# {::BEL::
|
9
|
+
# {::BEL::Nanopub::Nanopub} objects
|
10
10
|
# - Write
|
11
|
-
# - {#write}: write {::BEL::
|
11
|
+
# - {#write}: write {::BEL::Nanopub::Nanopub} objects to the
|
12
12
|
# output format
|
13
13
|
#
|
14
|
-
# @example Create a translator for conversion of YAML <-> BEL
|
14
|
+
# @example Create a translator for conversion of YAML <-> BEL nanopub.
|
15
15
|
# module Translator
|
16
16
|
#
|
17
17
|
# include ::BEL::Translator
|
18
18
|
#
|
19
19
|
# def read(data, options = {})
|
20
20
|
# objects = YAML.load(data)
|
21
|
-
# # map objects to BEL
|
21
|
+
# # map objects to BEL nanopub
|
22
22
|
# # return enumerator
|
23
23
|
# end
|
24
24
|
#
|
25
25
|
# def write(data, writer = nil, options = {})
|
26
|
-
# # map BEL
|
26
|
+
# # map BEL nanopub to YAML objects
|
27
27
|
# YAML.dump(data)
|
28
28
|
# end
|
29
29
|
# end
|
@@ -80,20 +80,20 @@ module BEL
|
|
80
80
|
:module => BEL::Translator::Plugins
|
81
81
|
)
|
82
82
|
|
83
|
-
# Read BEL
|
83
|
+
# Read BEL nanopubs from this translator's supported file format.
|
84
84
|
#
|
85
85
|
# @param [IO, String] data the data to read
|
86
86
|
# @param [Hash{Symbol => Object}] options
|
87
87
|
# @return [#each] an object that responds to +each+ and
|
88
|
-
# provides {::BEL::
|
88
|
+
# provides {::BEL::Nanopub::Nanopub} objects
|
89
89
|
def read(data, options = {})
|
90
90
|
raise NotImplementedError.new("#{__method__} is not implemented.")
|
91
91
|
end
|
92
92
|
|
93
|
-
# Writes BEL
|
93
|
+
# Writes BEL nanopubs to the provided IO +writer+.
|
94
94
|
#
|
95
95
|
# @param [#each] data an object that responds to +each+ and
|
96
|
-
# provides {::BEL::
|
96
|
+
# provides {::BEL::Nanopub::Nanopub} objects
|
97
97
|
# @param [IO] writer an IO to write to
|
98
98
|
# @param [Hash{Symbol => Object}] options
|
99
99
|
# @return [IO] the IO that was written to
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module BEL::Translator::Plugins
|
2
|
+
|
3
|
+
module Bnj
|
4
|
+
|
5
|
+
ID = :bnj
|
6
|
+
NAME = 'BEL Nanopub JSON Translator'
|
7
|
+
DESCRIPTION = 'A translator that can read/write BEL nanopubs to BNJ.'
|
8
|
+
MEDIA_TYPES = %i(application/json)
|
9
|
+
EXTENSIONS = %i(json)
|
10
|
+
NANOPUB_ROOT = :nanopub
|
11
|
+
|
12
|
+
def self.create_translator(options = {})
|
13
|
+
require_relative 'bnj/translator'
|
14
|
+
BnjTranslator.new
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.id
|
18
|
+
ID
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.name
|
22
|
+
NAME
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.description
|
26
|
+
DESCRIPTION
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.media_types
|
30
|
+
MEDIA_TYPES
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.file_extensions
|
34
|
+
EXTENSIONS
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -3,15 +3,15 @@ require 'bel/json'
|
|
3
3
|
|
4
4
|
module BEL::Translator::Plugins
|
5
5
|
|
6
|
-
module
|
6
|
+
module Bnj
|
7
7
|
|
8
|
-
class
|
8
|
+
class BnjTranslator
|
9
9
|
|
10
10
|
include ::BEL::Translator
|
11
11
|
|
12
12
|
def read(data, options = {})
|
13
13
|
::BEL::JSON.read(data, options).lazy.select { |obj|
|
14
|
-
obj.include?(
|
14
|
+
obj.include?(Bnj::NANOPUB_ROOT)
|
15
15
|
}.map { |json_obj|
|
16
16
|
unwrap(json_obj)
|
17
17
|
}
|
@@ -21,20 +21,20 @@ module BEL::Translator::Plugins
|
|
21
21
|
json_strings = Enumerator.new { |yielder|
|
22
22
|
yielder << '['
|
23
23
|
begin
|
24
|
-
|
24
|
+
nanopub_enum = objects.each
|
25
25
|
|
26
|
-
# write first
|
27
|
-
|
28
|
-
yielder << ::BEL::JSON.write(wrap(
|
26
|
+
# write first nanopub object
|
27
|
+
nanopub = nanopub_enum.next
|
28
|
+
yielder << ::BEL::JSON.write(wrap(nanopub), nil)
|
29
29
|
|
30
|
-
# each successive
|
30
|
+
# each successive nanopub starts with a comma
|
31
31
|
while true
|
32
|
-
|
32
|
+
nanopub = nanopub_enum.next
|
33
33
|
yielder << ','
|
34
|
-
yielder << ::BEL::JSON.write(wrap(
|
34
|
+
yielder << ::BEL::JSON.write(wrap(nanopub), nil)
|
35
35
|
end
|
36
36
|
rescue StopIteration
|
37
|
-
# end of
|
37
|
+
# end of nanopub hashes
|
38
38
|
end
|
39
39
|
yielder << ']'
|
40
40
|
}
|
@@ -66,13 +66,13 @@ module BEL::Translator::Plugins
|
|
66
66
|
writer << ']'
|
67
67
|
end
|
68
68
|
|
69
|
-
def wrap(
|
70
|
-
hash =
|
69
|
+
def wrap(nanopub)
|
70
|
+
hash = nanopub.to_h
|
71
71
|
{
|
72
|
-
|
72
|
+
NANOPUB_ROOT => {
|
73
73
|
:bel_statement => hash[:bel_statement].to_s,
|
74
74
|
:citation => hash[:citation],
|
75
|
-
:
|
75
|
+
:support => escape_newlines(hash[:support]),
|
76
76
|
:experiment_context => hash[:experiment_context],
|
77
77
|
:references => hash[:references],
|
78
78
|
:metadata => hash[:metadata].to_a
|
@@ -81,28 +81,11 @@ module BEL::Translator::Plugins
|
|
81
81
|
end
|
82
82
|
|
83
83
|
def unwrap(hash)
|
84
|
-
|
85
|
-
evidence = ::BEL::Model::Evidence.create(evidence_hash)
|
86
|
-
|
87
|
-
evidence.bel_statement = parse_statement(evidence)
|
88
|
-
evidence
|
89
|
-
end
|
90
|
-
|
91
|
-
def parse_statement(evidence)
|
92
|
-
namespaces = evidence.references.namespaces
|
93
|
-
::BEL::Script.parse(
|
94
|
-
"#{evidence.bel_statement}\n",
|
95
|
-
Hash[
|
96
|
-
namespaces.map { |k, v|
|
97
|
-
[k, ::BEL::Namespace::NamespaceDefinition.new(k, v)]
|
98
|
-
}
|
99
|
-
]
|
100
|
-
).select { |obj|
|
101
|
-
obj.is_a? ::BEL::Model::Statement
|
102
|
-
}.first
|
84
|
+
::BEL::Nanopub::Nanopub.create(hash[NANOPUB_ROOT])
|
103
85
|
end
|
104
86
|
|
105
87
|
def escape_newlines(value)
|
88
|
+
return nil if value.nil?
|
106
89
|
value.gsub(/\n/, "\\n").gsub(/\r/, "\\r")
|
107
90
|
end
|
108
91
|
end
|
@@ -4,7 +4,7 @@ module BEL::Translator::Plugins
|
|
4
4
|
|
5
5
|
ID = :jgf
|
6
6
|
NAME = 'JSON Graph Format Translator'
|
7
|
-
DESCRIPTION = 'A translator that can read
|
7
|
+
DESCRIPTION = 'A translator that can read/write BEL nanopubs to JGF.'
|
8
8
|
MEDIA_TYPES = %i(application/vnd.jgf+json)
|
9
9
|
EXTENSIONS = %i(jgf.json)
|
10
10
|
|
@@ -28,12 +28,12 @@ module BEL::Translator::Plugins
|
|
28
28
|
:edges => []
|
29
29
|
}
|
30
30
|
|
31
|
-
objects.each do |
|
32
|
-
unless
|
33
|
-
|
31
|
+
objects.each do |nanopub|
|
32
|
+
unless nanopub.bel_statement.is_a?(::BEL::Nanopub::Statement)
|
33
|
+
nanopub.bel_statement = ::BEL::Nanopub::Nanopub.parse_statement(nanopub)
|
34
34
|
end
|
35
35
|
|
36
|
-
stmt =
|
36
|
+
stmt = nanopub.bel_statement
|
37
37
|
subject = stmt.subject.to_bel
|
38
38
|
|
39
39
|
graph[:nodes] << {
|
@@ -87,7 +87,7 @@ module BEL::Translator::Plugins
|
|
87
87
|
rel = 'association' unless rel
|
88
88
|
|
89
89
|
bel_statement = ::BEL::Script.parse(
|
90
|
-
"#{source_node} #{rel} #{target_node}\n").select { |obj| obj.is_a? ::BEL::
|
90
|
+
"#{source_node} #{rel} #{target_node}\n").select { |obj| obj.is_a? ::BEL::Nanopub::Statement }.first
|
91
91
|
end
|
92
92
|
}.compact
|
93
93
|
|
@@ -98,17 +98,17 @@ module BEL::Translator::Plugins
|
|
98
98
|
::BEL::Script.parse(
|
99
99
|
"#{id_nodes[id]}\n"
|
100
100
|
).select { |obj|
|
101
|
-
obj.is_a? ::BEL::
|
101
|
+
obj.is_a? ::BEL::Nanopub::Statement
|
102
102
|
}.first
|
103
103
|
}
|
104
104
|
)
|
105
105
|
end
|
106
106
|
|
107
|
-
# map statements to
|
107
|
+
# map statements to nanopub objects
|
108
108
|
bel_statements.map { |bel_statement|
|
109
109
|
graph_name = graph[:label] || graph[:id] || 'BEL Graph'
|
110
|
-
metadata = ::BEL::
|
111
|
-
references = ::BEL::
|
110
|
+
metadata = ::BEL::Nanopub::Metadata.new
|
111
|
+
references = ::BEL::Nanopub::References.new
|
112
112
|
|
113
113
|
# establish document header
|
114
114
|
metadata.document_header[:Name] = graph_name
|
@@ -152,7 +152,7 @@ module BEL::Translator::Plugins
|
|
152
152
|
end
|
153
153
|
references.namespaces = namespaces if namespaces
|
154
154
|
|
155
|
-
::BEL::
|
155
|
+
::BEL::Nanopub::Nanopub.create(
|
156
156
|
:bel_statement => bel_statement,
|
157
157
|
:metadata => metadata,
|
158
158
|
:references => references
|
@@ -4,7 +4,7 @@ module BEL::Translator::Plugins
|
|
4
4
|
|
5
5
|
ID = :jsonld
|
6
6
|
NAME = 'JSON-LD RDF Translator'
|
7
|
-
DESCRIPTION = 'A translator that can read
|
7
|
+
DESCRIPTION = 'A translator that can read/write BEL nanopubs to JSON-LD.'
|
8
8
|
MEDIA_TYPES = %i(application/ld+json)
|
9
9
|
EXTENSIONS = %i(jsonld)
|
10
10
|
|
@@ -4,7 +4,7 @@ module BEL::Translator::Plugins
|
|
4
4
|
|
5
5
|
ID = :nquads
|
6
6
|
NAME = 'N-quads RDF Translator'
|
7
|
-
DESCRIPTION = 'A translator that can read
|
7
|
+
DESCRIPTION = 'A translator that can read/write BEL nanopubs to N-quads.'
|
8
8
|
MEDIA_TYPES = %i(application/n-quads)
|
9
9
|
EXTENSIONS = %i(nq)
|
10
10
|
|
@@ -4,7 +4,7 @@ module BEL::Translator::Plugins
|
|
4
4
|
|
5
5
|
ID = :ntriples
|
6
6
|
NAME = 'N-triples RDF Translator'
|
7
|
-
DESCRIPTION = 'A translator that can read
|
7
|
+
DESCRIPTION = 'A translator that can read/write BEL nanopubs to N-triples.'
|
8
8
|
MEDIA_TYPES = %i(application/n-triples)
|
9
9
|
EXTENSIONS = %i(nt)
|
10
10
|
|
@@ -1,13 +1,21 @@
|
|
1
|
+
require 'rdf'
|
2
|
+
require 'rdf/vocab'
|
3
|
+
|
1
4
|
# Defines the RDF vocabulary for BEL structures.
|
2
5
|
module BELRDF
|
3
6
|
|
4
7
|
# uri prefixes
|
5
|
-
BELR
|
6
|
-
BELV
|
7
|
-
BELE
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
BELR = ::RDF::Vocabulary.new('http://www.openbel.org/bel/')
|
9
|
+
BELV = ::RDF::Vocabulary.new('http://www.openbel.org/vocabulary/')
|
10
|
+
BELE = ::RDF::Vocabulary.new('http://www.openbel.org/evidence/')
|
11
|
+
DC = ::RDF::Vocab::DC
|
12
|
+
FOAF = ::RDF::Vocab::FOAF
|
13
|
+
PUBMED = ::RDF::Vocabulary.new('http://bio2rdf.org/pubmed:')
|
14
|
+
RDF = ::RDF
|
15
|
+
RDFS = ::RDF::Vocab::RDFS
|
16
|
+
SKOS = ::RDF::Vocab::SKOS
|
17
|
+
VOID = ::RDF::Vocab::VOID
|
18
|
+
XSD = ::RDF::Vocab::XSD
|
11
19
|
|
12
20
|
# annotations
|
13
21
|
Anatomy = 'http://www.openbel.org/bel/annotation/anatomy/'
|
@@ -194,152 +202,152 @@ module BELRDF
|
|
194
202
|
|
195
203
|
RDFS_SCHEMA = deep_freeze([
|
196
204
|
# Classes - Annotation Concept
|
197
|
-
[BELV.AnnotationConcept,
|
198
|
-
[BELV.AnnotationConceptScheme,
|
205
|
+
[BELV.AnnotationConcept, RDFS.subClassOf, SKOS.Concept],
|
206
|
+
[BELV.AnnotationConceptScheme, RDFS.subClassOf, SKOS.ConceptScheme],
|
199
207
|
|
200
208
|
# Classes - Namespace Concept
|
201
|
-
[BELV.AbundanceConcept,
|
202
|
-
[BELV.BiologicalProcessConcept,
|
203
|
-
[BELV.ComplexConcept,
|
204
|
-
[BELV.GeneConcept,
|
205
|
-
[BELV.MicroRNAConcept,
|
206
|
-
[BELV.NamespaceConceptScheme,
|
207
|
-
[BELV.NamespaceConcept,
|
208
|
-
[BELV.ProteinConcept,
|
209
|
-
[BELV.RNAConcept,
|
210
|
-
[BELV.PathologyConcept,
|
209
|
+
[BELV.AbundanceConcept, RDFS.subClassOf, BELV.NamespaceConcept],
|
210
|
+
[BELV.BiologicalProcessConcept, RDFS.subClassOf, BELV.NamespaceConcept],
|
211
|
+
[BELV.ComplexConcept, RDFS.subClassOf, BELV.AbundanceConcept],
|
212
|
+
[BELV.GeneConcept, RDFS.subClassOf, BELV.AbundanceConcept],
|
213
|
+
[BELV.MicroRNAConcept, RDFS.subClassOf, BELV.RNAConcept],
|
214
|
+
[BELV.NamespaceConceptScheme, RDFS.subClassOf, SKOS.ConceptScheme],
|
215
|
+
[BELV.NamespaceConcept, RDFS.subClassOf, SKOS.Concept],
|
216
|
+
[BELV.ProteinConcept, RDFS.subClassOf, BELV.AbundanceConcept],
|
217
|
+
[BELV.RNAConcept, RDFS.subClassOf, BELV.AbundanceConcept],
|
218
|
+
[BELV.PathologyConcept, RDFS.subClassOf, BELV.BiologicalProcessConcept],
|
211
219
|
|
212
220
|
# Classes - Language Concepts
|
213
|
-
[BELV.Abundance, RDF.type,
|
214
|
-
[BELV.Activity, RDF.type,
|
215
|
-
[BELV.
|
216
|
-
[BELV.Modification, RDF.type,
|
217
|
-
[BELV.Relationship, RDF.type,
|
218
|
-
[BELV.Statement, RDF.type,
|
219
|
-
[BELV.Term, RDF.type,
|
221
|
+
[BELV.Abundance, RDF.type, RDFS.Class],
|
222
|
+
[BELV.Activity, RDF.type, RDFS.Class],
|
223
|
+
[BELV.Nanopub, RDF.type, RDFS.Class],
|
224
|
+
[BELV.Modification, RDF.type, RDFS.Class],
|
225
|
+
[BELV.Relationship, RDF.type, RDFS.Class],
|
226
|
+
[BELV.Statement, RDF.type, RDFS.Class],
|
227
|
+
[BELV.Term, RDF.type, RDFS.Class],
|
220
228
|
|
221
229
|
# Classes - Relationships
|
222
|
-
[BELV.Association,
|
223
|
-
[BELV.BiomarkerFor,
|
224
|
-
[BELV.CausesNoChange,
|
225
|
-
[BELV.CausalRelationship,
|
226
|
-
[BELV.CorrelativeRelationship,
|
227
|
-
[BELV.Decreases,
|
228
|
-
[BELV.Decreases,
|
229
|
-
[BELV.DirectlyDecreases,
|
230
|
-
[BELV.DirectlyDecreases,
|
231
|
-
[BELV.DirectlyDecreases,
|
232
|
-
[BELV.DirectlyDecreases,
|
233
|
-
[BELV.DirectlyIncreases,
|
234
|
-
[BELV.DirectlyIncreases,
|
235
|
-
[BELV.DirectlyIncreases,
|
236
|
-
[BELV.DirectlyIncreases,
|
237
|
-
[BELV.DirectRelationship,
|
238
|
-
[BELV.HasComponent,
|
239
|
-
[BELV.HasMember,
|
240
|
-
[BELV.Increases,
|
241
|
-
[BELV.Increases,
|
242
|
-
[BELV.IsA,
|
243
|
-
[BELV.MembershipRelationship,
|
244
|
-
[BELV.NegativeCorrelation,
|
245
|
-
[BELV.NegativeCorrelation,
|
246
|
-
[BELV.NegativeRelationship,
|
247
|
-
[BELV.PositiveCorrelation,
|
248
|
-
[BELV.PositiveCorrelation,
|
249
|
-
[BELV.PositiveRelationship,
|
250
|
-
[BELV.PrognosticBiomarkerFor,
|
251
|
-
[BELV.RateLimitingStepOf,
|
252
|
-
[BELV.RateLimitingStepOf,
|
253
|
-
[BELV.RateLimitingStepOf,
|
254
|
-
[BELV.SubProcessOf,
|
230
|
+
[BELV.Association, RDFS.subClassOf, BELV.CorrelativeRelationship],
|
231
|
+
[BELV.BiomarkerFor, RDFS.subClassOf, BELV.Relationship],
|
232
|
+
[BELV.CausesNoChange, RDFS.subClassOf, BELV.CausalRelationship],
|
233
|
+
[BELV.CausalRelationship, RDFS.subClassOf, BELV.Relationship],
|
234
|
+
[BELV.CorrelativeRelationship, RDFS.subClassOf, BELV.Relationship],
|
235
|
+
[BELV.Decreases, RDFS.subClassOf, BELV.CausalRelationship],
|
236
|
+
[BELV.Decreases, RDFS.subClassOf, BELV.NegativeRelationship],
|
237
|
+
[BELV.DirectlyDecreases, RDFS.subClassOf, BELV.CausalRelationship],
|
238
|
+
[BELV.DirectlyDecreases, RDFS.subClassOf, BELV.NegativeRelationship],
|
239
|
+
[BELV.DirectlyDecreases, RDFS.subClassOf, BELV.DirectRelationship],
|
240
|
+
[BELV.DirectlyDecreases, RDFS.subClassOf, BELV.Decreases],
|
241
|
+
[BELV.DirectlyIncreases, RDFS.subClassOf, BELV.CausalRelationship],
|
242
|
+
[BELV.DirectlyIncreases, RDFS.subClassOf, BELV.PositiveRelationship],
|
243
|
+
[BELV.DirectlyIncreases, RDFS.subClassOf, BELV.DirectRelationship],
|
244
|
+
[BELV.DirectlyIncreases, RDFS.subClassOf, BELV.Increases],
|
245
|
+
[BELV.DirectRelationship, RDFS.subClassOf, BELV.Relationship],
|
246
|
+
[BELV.HasComponent, RDFS.subClassOf, BELV.MembershipRelationship],
|
247
|
+
[BELV.HasMember, RDFS.subClassOf, BELV.MembershipRelationship],
|
248
|
+
[BELV.Increases, RDFS.subClassOf, BELV.CausalRelationship],
|
249
|
+
[BELV.Increases, RDFS.subClassOf, BELV.PositiveRelationship],
|
250
|
+
[BELV.IsA, RDFS.subClassOf, BELV.MembershipRelationship],
|
251
|
+
[BELV.MembershipRelationship, RDFS.subClassOf, BELV.Relationship],
|
252
|
+
[BELV.NegativeCorrelation, RDFS.subClassOf, BELV.CorrelativeRelationship],
|
253
|
+
[BELV.NegativeCorrelation, RDFS.subClassOf, BELV.NegativeRelationship],
|
254
|
+
[BELV.NegativeRelationship, RDFS.subClassOf, BELV.Relationship],
|
255
|
+
[BELV.PositiveCorrelation, RDFS.subClassOf, BELV.CorrelativeRelationship],
|
256
|
+
[BELV.PositiveCorrelation, RDFS.subClassOf, BELV.PositiveRelationship],
|
257
|
+
[BELV.PositiveRelationship, RDFS.subClassOf, BELV.Relationship],
|
258
|
+
[BELV.PrognosticBiomarkerFor, RDFS.subClassOf, BELV.BiomarkerFor],
|
259
|
+
[BELV.RateLimitingStepOf, RDFS.subClassOf, BELV.Increases],
|
260
|
+
[BELV.RateLimitingStepOf, RDFS.subClassOf, BELV.CausalRelationship],
|
261
|
+
[BELV.RateLimitingStepOf, RDFS.subClassOf, BELV.SubProcessOf],
|
262
|
+
[BELV.SubProcessOf, RDFS.subClassOf, BELV.MembershipRelationship],
|
255
263
|
|
256
264
|
# Classes - Abundances
|
257
|
-
[BELV.AbundanceActivity,
|
258
|
-
[BELV.BiologicalProcess,
|
259
|
-
[BELV.CellSecretion,
|
260
|
-
[BELV.ComplexAbundance,
|
261
|
-
[BELV.CompositeAbundance,
|
262
|
-
[BELV.Degradation,
|
263
|
-
[BELV.GeneAbundance,
|
264
|
-
[BELV.MicroRNAAbundance,
|
265
|
-
[BELV.ModifiedProteinAbundance,
|
266
|
-
[BELV.Pathology,
|
267
|
-
[BELV.Process, RDF.type,
|
268
|
-
[BELV.ProteinAbundance,
|
269
|
-
[BELV.ProteinVariantAbundance,
|
270
|
-
[BELV.Reaction,
|
271
|
-
[BELV.RNAAbundance,
|
272
|
-
[BELV.Transformation,
|
273
|
-
[BELV.Translocation,
|
265
|
+
[BELV.AbundanceActivity, RDFS.subClassOf, BELV.Process],
|
266
|
+
[BELV.BiologicalProcess, RDFS.subClassOf, BELV.Process],
|
267
|
+
[BELV.CellSecretion, RDFS.subClassOf, BELV.Translocation],
|
268
|
+
[BELV.ComplexAbundance, RDFS.subClassOf, BELV.Abundance],
|
269
|
+
[BELV.CompositeAbundance, RDFS.subClassOf, BELV.Abundance],
|
270
|
+
[BELV.Degradation, RDFS.subClassOf, BELV.Transformation],
|
271
|
+
[BELV.GeneAbundance, RDFS.subClassOf, BELV.Abundance],
|
272
|
+
[BELV.MicroRNAAbundance, RDFS.subClassOf, BELV.Abundance],
|
273
|
+
[BELV.ModifiedProteinAbundance, RDFS.subClassOf, BELV.ProteinAbundance],
|
274
|
+
[BELV.Pathology, RDFS.subClassOf, BELV.BiologicalProcess],
|
275
|
+
[BELV.Process, RDF.type, RDFS.Class],
|
276
|
+
[BELV.ProteinAbundance, RDFS.subClassOf, BELV.Abundance],
|
277
|
+
[BELV.ProteinVariantAbundance, RDFS.subClassOf, BELV.ProteinAbundance],
|
278
|
+
[BELV.Reaction, RDFS.subClassOf, BELV.Transformation],
|
279
|
+
[BELV.RNAAbundance, RDFS.subClassOf, BELV.Abundance],
|
280
|
+
[BELV.Transformation, RDFS.subClassOf, BELV.Process],
|
281
|
+
[BELV.Translocation, RDFS.subClassOf, BELV.Transformation],
|
274
282
|
|
275
283
|
# Classes - Activities
|
276
|
-
[BELV.Activity,
|
277
|
-
[BELV.Catalytic,
|
278
|
-
[BELV.Chaperone,
|
279
|
-
[BELV.GtpBound,
|
280
|
-
[BELV.Kinase,
|
281
|
-
[BELV.Peptidase,
|
282
|
-
[BELV.Phosphatase,
|
283
|
-
[BELV.Ribosylase,
|
284
|
-
[BELV.Transcription,
|
285
|
-
[BELV.Transport,
|
284
|
+
[BELV.Activity, RDFS.subClassOf, BELV.Activity],
|
285
|
+
[BELV.Catalytic, RDFS.subClassOf, BELV.Activity],
|
286
|
+
[BELV.Chaperone, RDFS.subClassOf, BELV.Activity],
|
287
|
+
[BELV.GtpBound, RDFS.subClassOf, BELV.Activity],
|
288
|
+
[BELV.Kinase, RDFS.subClassOf, BELV.Activity],
|
289
|
+
[BELV.Peptidase, RDFS.subClassOf, BELV.Activity],
|
290
|
+
[BELV.Phosphatase, RDFS.subClassOf, BELV.Activity],
|
291
|
+
[BELV.Ribosylase, RDFS.subClassOf, BELV.Activity],
|
292
|
+
[BELV.Transcription, RDFS.subClassOf, BELV.Activity],
|
293
|
+
[BELV.Transport, RDFS.subClassOf, BELV.Activity],
|
286
294
|
|
287
295
|
# Classes - Modifications
|
288
|
-
[BELV.Acetylation,
|
289
|
-
[BELV.Farnesylation,
|
290
|
-
[BELV.Glycosylation,
|
291
|
-
[BELV.Hydroxylation,
|
292
|
-
[BELV.Methylation,
|
293
|
-
[BELV.Phosphorylation,
|
294
|
-
[BELV.Ribosylation,
|
295
|
-
[BELV.Sumoylation,
|
296
|
-
[BELV.Ubiquitination,
|
297
|
-
[BELV.PhosphorylationSerine,
|
298
|
-
[BELV.PhosphorylationTyrosine,
|
299
|
-
[BELV.PhosphorylationThreonine,
|
296
|
+
[BELV.Acetylation, RDFS.subClassOf, BELV.Modification],
|
297
|
+
[BELV.Farnesylation, RDFS.subClassOf, BELV.Modification],
|
298
|
+
[BELV.Glycosylation, RDFS.subClassOf, BELV.Modification],
|
299
|
+
[BELV.Hydroxylation, RDFS.subClassOf, BELV.Modification],
|
300
|
+
[BELV.Methylation, RDFS.subClassOf, BELV.Modification],
|
301
|
+
[BELV.Phosphorylation, RDFS.subClassOf, BELV.Modification],
|
302
|
+
[BELV.Ribosylation, RDFS.subClassOf, BELV.Modification],
|
303
|
+
[BELV.Sumoylation, RDFS.subClassOf, BELV.Modification],
|
304
|
+
[BELV.Ubiquitination, RDFS.subClassOf, BELV.Modification],
|
305
|
+
[BELV.PhosphorylationSerine, RDFS.subClassOf, BELV.Phosphorylation],
|
306
|
+
[BELV.PhosphorylationTyrosine, RDFS.subClassOf, BELV.Phosphorylation],
|
307
|
+
[BELV.PhosphorylationThreonine, RDFS.subClassOf, BELV.Phosphorylation],
|
300
308
|
|
301
309
|
# Properties - BEL Term
|
302
310
|
[BELV.hasActivityType, RDF.type, RDF.Property],
|
303
|
-
[BELV.hasActivityType,
|
304
|
-
[BELV.hasActivityType,
|
311
|
+
[BELV.hasActivityType, RDFS.range, BELV.Activity],
|
312
|
+
[BELV.hasActivityType, RDFS.domain, BELV.Term],
|
305
313
|
[BELV.hasChild, RDF.type, RDF.Property],
|
306
|
-
[BELV.hasChild,
|
307
|
-
[BELV.hasChild,
|
314
|
+
[BELV.hasChild, RDFS.range, BELV.Term],
|
315
|
+
[BELV.hasChild, RDFS.domain, BELV.Term],
|
308
316
|
[BELV.hasConcept, RDF.type, RDF.Property],
|
309
|
-
[BELV.hasConcept,
|
310
|
-
[BELV.hasConcept,
|
317
|
+
[BELV.hasConcept, RDFS.range, BELV.NamespaceConcept],
|
318
|
+
[BELV.hasConcept, RDFS.domain, BELV.Term],
|
311
319
|
[BELV.hasModificationPosition, RDF.type, RDF.Property],
|
312
|
-
[BELV.hasModificationPosition,
|
313
|
-
[BELV.hasModificationPosition,
|
320
|
+
[BELV.hasModificationPosition, RDFS.range, XSD.integer],
|
321
|
+
[BELV.hasModificationPosition, RDFS.domain, BELV.Term],
|
314
322
|
[BELV.hasModificationType, RDF.type, RDF.Property],
|
315
|
-
[BELV.hasModificationType,
|
316
|
-
[BELV.hasModificationType,
|
323
|
+
[BELV.hasModificationType, RDFS.range, BELV.Activity],
|
324
|
+
[BELV.hasModificationType, RDFS.domain, BELV.Term],
|
317
325
|
|
318
326
|
# Properties - BEL Statement
|
319
|
-
[BELV.
|
320
|
-
[BELV.
|
321
|
-
[BELV.
|
322
|
-
[BELV.hasObject,
|
323
|
-
[BELV.hasObject,
|
324
|
-
[BELV.hasObject,
|
327
|
+
[BELV.hasNanopub, RDF.type, RDF.Property],
|
328
|
+
[BELV.hasNanopub, RDFS.range, BELV.Nanopub],
|
329
|
+
[BELV.hasNanopub, RDFS.domain, BELV.Statement],
|
330
|
+
[BELV.hasObject, RDFS.subPropertyOf, BELV.hasChild],
|
331
|
+
[BELV.hasObject, RDFS.range, BELV.Term],
|
332
|
+
[BELV.hasObject, RDFS.domain, BELV.Statement],
|
325
333
|
[BELV.hasRelationship, RDF.type, RDF.Property],
|
326
|
-
[BELV.hasRelationship,
|
327
|
-
[BELV.hasRelationship,
|
328
|
-
[BELV.hasSubject,
|
329
|
-
[BELV.hasSubject,
|
330
|
-
[BELV.hasSubject,
|
334
|
+
[BELV.hasRelationship, RDFS.range, BELV.Relationship],
|
335
|
+
[BELV.hasRelationship, RDFS.domain, BELV.Statement],
|
336
|
+
[BELV.hasSubject, RDFS.subPropertyOf, BELV.hasChild],
|
337
|
+
[BELV.hasSubject, RDFS.range, BELV.Term],
|
338
|
+
[BELV.hasSubject, RDFS.domain, BELV.Statement],
|
331
339
|
|
332
|
-
# Properties -
|
340
|
+
# Properties - Nanopub
|
333
341
|
[BELV.hasAnnotation, RDF.type, RDF.Property],
|
334
|
-
[BELV.hasAnnotation,
|
335
|
-
[BELV.hasAnnotation,
|
342
|
+
[BELV.hasAnnotation, RDFS.range, BELV.AnnotationConcept],
|
343
|
+
[BELV.hasAnnotation, RDFS.domain, BELV.Nanopub],
|
336
344
|
[BELV.hasCitation, RDF.type, RDF.Property],
|
337
|
-
[BELV.hasCitation,
|
338
|
-
[BELV.
|
339
|
-
[BELV.
|
345
|
+
[BELV.hasCitation, RDFS.domain, BELV.Nanopub],
|
346
|
+
[BELV.hasNanopubText, RDFS.range, XSD.string],
|
347
|
+
[BELV.hasNanopubText, RDFS.domain, BELV.Nanopub],
|
340
348
|
[BELV.hasStatement, RDF.type, RDF.Property],
|
341
|
-
[BELV.hasStatement,
|
342
|
-
[BELV.hasStatement,
|
349
|
+
[BELV.hasStatement, RDFS.range, BELV.Statement],
|
350
|
+
[BELV.hasStatement, RDFS.domain, BELV.Nanopub]
|
343
351
|
])
|
344
352
|
|
345
353
|
def self.vocabulary_rdf
|