bel 0.7.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/{bel.gemspec → .gemspec} +8 -4
  3. data/README.md +3 -3
  4. data/VERSION +1 -0
  5. data/bin/bel +8 -8
  6. data/bin/bel2rdf.rb +1 -1
  7. data/bin/bel_summarize.rb +4 -4
  8. data/bin/bel_upgrade.rb +6 -6
  9. data/lib/bel.rb +3 -2
  10. data/lib/bel/completion.rb +13 -10
  11. data/lib/bel/completion_rule.rb +29 -21
  12. data/lib/bel/dsl.rb +75 -0
  13. data/lib/bel/gen.rb +2 -2
  14. data/lib/bel/gen/annotation.rb +2 -2
  15. data/lib/bel/gen/citation.rb +6 -6
  16. data/lib/bel/gen/document_header.rb +1 -1
  17. data/lib/bel/gen/{evidence.rb → nanopub.rb} +15 -15
  18. data/lib/bel/gen/parameter.rb +6 -6
  19. data/lib/bel/gen/sample_resources.rb +4 -4
  20. data/lib/bel/gen/statement.rb +1 -1
  21. data/lib/bel/gen/term.rb +1 -1
  22. data/lib/bel/language.rb +0 -20
  23. data/lib/bel/namespace.rb +7 -3
  24. data/lib/bel/nanopub.rb +15 -0
  25. data/lib/bel/{evidence_model/buffering_evidence_combiner.rb → nanopub/buffering_nanopub_combiner.rb} +39 -45
  26. data/lib/bel/{evidence_model → nanopub}/citation.rb +2 -2
  27. data/lib/bel/{evidence_model → nanopub}/experiment_context.rb +7 -1
  28. data/lib/bel/{evidence_model → nanopub}/hash_map_references.rb +1 -1
  29. data/lib/bel/{evidence_model → nanopub}/map_references.rb +1 -1
  30. data/lib/bel/nanopub/map_references_combiner.rb +30 -0
  31. data/lib/bel/nanopub/metadata.rb +102 -0
  32. data/lib/bel/nanopub/nanopub.rb +122 -0
  33. data/lib/bel/{evidence_model → nanopub}/references.rb +50 -38
  34. data/lib/bel/{evidence_model/streaming_evidence_combiner.rb → nanopub/streaming_nanopub_combiner.rb} +8 -8
  35. data/lib/bel/{evidence_model/summary_text.rb → nanopub/support.rb} +8 -2
  36. data/lib/bel/{evidence_model → nanopub}/util.rb +10 -10
  37. data/lib/bel/resource/annotation.rb +15 -24
  38. data/lib/bel/resource/annotation_value.rb +24 -20
  39. data/lib/bel/resource/annotations.rb +12 -11
  40. data/lib/bel/resource/concept.rb +62 -0
  41. data/lib/bel/resource/concept_scheme.rb +49 -0
  42. data/lib/bel/resource/namespace.rb +15 -24
  43. data/lib/bel/resource/namespace_value.rb +26 -23
  44. data/lib/bel/resource/namespaces.rb +11 -11
  45. data/lib/bel/script.rb +367 -367
  46. data/lib/bel/translate.rb +7 -7
  47. data/lib/bel/translator.rb +10 -10
  48. data/lib/bel/translator/plugins/bnj.rb +37 -0
  49. data/lib/bel/translator/plugins/{json_evidence → bnj}/translator.rb +17 -34
  50. data/lib/bel/translator/plugins/jgf.rb +1 -1
  51. data/lib/bel/translator/plugins/jgf/translator.rb +10 -10
  52. data/lib/bel/translator/plugins/jsonld.rb +1 -1
  53. data/lib/bel/translator/plugins/nquads.rb +1 -1
  54. data/lib/bel/translator/plugins/ntriples.rb +1 -1
  55. data/lib/bel/translator/plugins/rdf/bel_schema.rb +134 -126
  56. data/lib/bel/translator/plugins/rdf/graph_translator.rb +6 -6
  57. data/lib/bel/translator/plugins/rdf/monkey_patch.rb +50 -49
  58. data/lib/bel/translator/plugins/rdf/reader.rb +42 -42
  59. data/lib/bel/translator/plugins/rdf/translator.rb +6 -6
  60. data/lib/bel/translator/plugins/rdf/writer.rb +4 -4
  61. data/lib/bel/translator/plugins/rdf2/belv2_0.rb +416 -0
  62. data/lib/bel/translator/plugins/rdf2/converter.rb +13 -0
  63. data/lib/bel/translator/plugins/rdf2/namespace_converter.rb +24 -0
  64. data/lib/bel/translator/plugins/rdf2/nanopub_converter.rb +82 -0
  65. data/lib/bel/translator/plugins/rdf2/parameter_converter.rb +50 -0
  66. data/lib/bel/translator/plugins/rdf2/rdf_converter.rb +13 -0
  67. data/lib/bel/translator/plugins/rdf2/rdf_writer.rb +63 -0
  68. data/lib/bel/translator/plugins/rdf2/reader.rb +172 -0
  69. data/lib/bel/translator/plugins/rdf2/relationship_converter.rb +49 -0
  70. data/lib/bel/translator/plugins/rdf2/statement_converter.rb +65 -0
  71. data/lib/bel/translator/plugins/rdf2/term_converter.rb +262 -0
  72. data/lib/bel/translator/plugins/rdf2/translator.rb +51 -0
  73. data/lib/bel/translator/plugins/rdf2/uuid.rb +20 -0
  74. data/lib/bel/translator/plugins/rdf2/writer.rb +53 -0
  75. data/lib/bel/translator/plugins/rdfa.rb +1 -1
  76. data/lib/bel/translator/plugins/rdfxml.rb +1 -1
  77. data/lib/bel/translator/plugins/rj.rb +1 -1
  78. data/lib/bel/translator/plugins/trig.rb +1 -1
  79. data/lib/bel/translator/plugins/trix.rb +1 -1
  80. data/lib/bel/translator/plugins/turtle.rb +3 -6
  81. data/lib/bel/translator/plugins/xbel.rb +5 -6
  82. data/lib/bel/translator/plugins/xbel/nanopub_handler.rb +625 -0
  83. data/lib/bel/translator/plugins/xbel/{evidence_yielder.rb → nanopub_yielder.rb} +3 -3
  84. data/lib/bel/translator/plugins/xbel/translator.rb +2 -5
  85. data/lib/bel/translator/plugins/xbel/xbel_yielder.rb +135 -74
  86. data/lib/bel/version.rb +31 -1
  87. metadata +81 -33
  88. data/lib/bel/evidence_model.rb +0 -15
  89. data/lib/bel/evidence_model/bel_parameter.rb +0 -56
  90. data/lib/bel/evidence_model/bel_statement.rb +0 -97
  91. data/lib/bel/evidence_model/bel_term.rb +0 -87
  92. data/lib/bel/evidence_model/evidence.rb +0 -127
  93. data/lib/bel/evidence_model/map_references_combiner.rb +0 -30
  94. data/lib/bel/evidence_model/metadata.rb +0 -49
  95. data/lib/bel/parser.rb +0 -39
  96. data/lib/bel/translator/plugins/bel_script.rb +0 -36
  97. data/lib/bel/translator/plugins/bel_script/bel_citation_serialization.rb +0 -125
  98. data/lib/bel/translator/plugins/bel_script/bel_discrete_serialization.rb +0 -109
  99. data/lib/bel/translator/plugins/bel_script/bel_top_down_serialization.rb +0 -100
  100. data/lib/bel/translator/plugins/bel_script/bel_yielder.rb +0 -180
  101. data/lib/bel/translator/plugins/bel_script/evidence_serialization.rb +0 -79
  102. data/lib/bel/translator/plugins/bel_script/evidence_yielder.rb +0 -87
  103. data/lib/bel/translator/plugins/bel_script/translator.rb +0 -35
  104. data/lib/bel/translator/plugins/json_evidence.rb +0 -38
  105. data/lib/bel/translator/plugins/xbel/evidence_handler.rb +0 -495
@@ -10,7 +10,7 @@ module BEL
10
10
  # mixin.
11
11
  module ClassMethods
12
12
 
13
- # Return a stream of {::BEL::Model::Evidence} objects for the input.
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::Model::Evidence} objects
22
- def evidence(input, input_format, options = {})
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::Model::Evidence} as a shared model. The translation is written
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
- evidence = in_translator.read(prepared_input)
53
- out_translator.write(evidence, writer, options)
52
+ nanopub = in_translator.read(prepared_input, options)
53
+ out_translator.write(nanopub, writer, options)
54
54
  writer
55
55
  end
56
56
 
@@ -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 evidence and writes BEL evidence back to this document
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::Model::Evidence} objects
9
+ # {::BEL::Nanopub::Nanopub} objects
10
10
  # - Write
11
- # - {#write}: write {::BEL::Model::Evidence} objects to the
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 Evidence.
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 evidence
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 evidence to YAML objects
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 evidence from this translator's supported file format.
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::Model::Evidence} objects
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 evidence +data+ to the provided IO +writer+.
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::Model::Evidence} objects
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 JsonEvidence
6
+ module Bnj
7
7
 
8
- class JsonEvidenceTranslator
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?(:evidence)
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
- evidence_enum = objects.each
24
+ nanopub_enum = objects.each
25
25
 
26
- # write first evidence object
27
- evidence = evidence_enum.next
28
- yielder << ::BEL::JSON.write(wrap(evidence), nil)
26
+ # write first nanopub object
27
+ nanopub = nanopub_enum.next
28
+ yielder << ::BEL::JSON.write(wrap(nanopub), nil)
29
29
 
30
- # each successive evidence starts with a comma
30
+ # each successive nanopub starts with a comma
31
31
  while true
32
- evidence = evidence_enum.next
32
+ nanopub = nanopub_enum.next
33
33
  yielder << ','
34
- yielder << ::BEL::JSON.write(wrap(evidence), nil)
34
+ yielder << ::BEL::JSON.write(wrap(nanopub), nil)
35
35
  end
36
36
  rescue StopIteration
37
- # end of evidence hashes
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(evidence)
70
- hash = evidence.to_h
69
+ def wrap(nanopub)
70
+ hash = nanopub.to_h
71
71
  {
72
- EVIDENCE_ROOT => {
72
+ NANOPUB_ROOT => {
73
73
  :bel_statement => hash[:bel_statement].to_s,
74
74
  :citation => hash[:citation],
75
- :summary_text => escape_newlines(hash[:summary_text]),
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
- evidence_hash = hash[EVIDENCE_ROOT]
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 and write evidence statements in a JSON Graph Format.'
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 |evidence|
32
- unless evidence.bel_statement.is_a?(::BEL::Model::Statement)
33
- evidence.bel_statement = ::BEL::Model::Evidence.parse_statement(evidence)
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 = evidence.bel_statement
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::Model::Statement }.first
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::Model::Statement
101
+ obj.is_a? ::BEL::Nanopub::Statement
102
102
  }.first
103
103
  }
104
104
  )
105
105
  end
106
106
 
107
- # map statements to evidence objects
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::Model::Metadata.new
111
- references = ::BEL::Model::References.new
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::Model::Evidence.create(
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 and write JSON-LD (http://json-ld.org/) for BEL evidence.'
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 and write N-quads for BEL evidence.'
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 and write N-triples for BEL evidence.'
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 = ::RDF::Vocabulary.new('http://www.openbel.org/bel/')
6
- BELV = ::RDF::Vocabulary.new('http://www.openbel.org/vocabulary/')
7
- BELE = ::RDF::Vocabulary.new('http://www.openbel.org/evidence/')
8
- PUBMED = ::RDF::Vocabulary.new('http://bio2rdf.org/pubmed:')
9
- RDF = ::RDF
10
- RDFS = ::RDF::RDFS
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, RDF::RDFS.subClassOf, RDF::SKOS.Concept],
198
- [BELV.AnnotationConceptScheme, RDF::RDFS.subClassOf, RDF::SKOS.ConceptScheme],
205
+ [BELV.AnnotationConcept, RDFS.subClassOf, SKOS.Concept],
206
+ [BELV.AnnotationConceptScheme, RDFS.subClassOf, SKOS.ConceptScheme],
199
207
 
200
208
  # Classes - Namespace Concept
201
- [BELV.AbundanceConcept, RDF::RDFS.subClassOf, BELV.NamespaceConcept],
202
- [BELV.BiologicalProcessConcept, RDF::RDFS.subClassOf, BELV.NamespaceConcept],
203
- [BELV.ComplexConcept, RDF::RDFS.subClassOf, BELV.AbundanceConcept],
204
- [BELV.GeneConcept, RDF::RDFS.subClassOf, BELV.AbundanceConcept],
205
- [BELV.MicroRNAConcept, RDF::RDFS.subClassOf, BELV.RNAConcept],
206
- [BELV.NamespaceConceptScheme, RDF::RDFS.subClassOf, RDF::SKOS.ConceptScheme],
207
- [BELV.NamespaceConcept, RDF::RDFS.subClassOf, RDF::SKOS.Concept],
208
- [BELV.ProteinConcept, RDF::RDFS.subClassOf, BELV.AbundanceConcept],
209
- [BELV.RNAConcept, RDF::RDFS.subClassOf, BELV.AbundanceConcept],
210
- [BELV.PathologyConcept, RDF::RDFS.subClassOf, BELV.BiologicalProcessConcept],
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, RDF::RDFS.Class],
214
- [BELV.Activity, RDF.type, RDF::RDFS.Class],
215
- [BELV.Evidence, RDF.type, RDF::RDFS.Class],
216
- [BELV.Modification, RDF.type, RDF::RDFS.Class],
217
- [BELV.Relationship, RDF.type, RDF::RDFS.Class],
218
- [BELV.Statement, RDF.type, RDF::RDFS.Class],
219
- [BELV.Term, RDF.type, RDF::RDFS.Class],
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, RDF::RDFS.subClassOf, BELV.CorrelativeRelationship],
223
- [BELV.BiomarkerFor, RDF::RDFS.subClassOf, BELV.Relationship],
224
- [BELV.CausesNoChange, RDF::RDFS.subClassOf, BELV.CausalRelationship],
225
- [BELV.CausalRelationship, RDF::RDFS.subClassOf, BELV.Relationship],
226
- [BELV.CorrelativeRelationship, RDF::RDFS.subClassOf, BELV.Relationship],
227
- [BELV.Decreases, RDF::RDFS.subClassOf, BELV.CausalRelationship],
228
- [BELV.Decreases, RDF::RDFS.subClassOf, BELV.NegativeRelationship],
229
- [BELV.DirectlyDecreases, RDF::RDFS.subClassOf, BELV.CausalRelationship],
230
- [BELV.DirectlyDecreases, RDF::RDFS.subClassOf, BELV.NegativeRelationship],
231
- [BELV.DirectlyDecreases, RDF::RDFS.subClassOf, BELV.DirectRelationship],
232
- [BELV.DirectlyDecreases, RDF::RDFS.subClassOf, BELV.Decreases],
233
- [BELV.DirectlyIncreases, RDF::RDFS.subClassOf, BELV.CausalRelationship],
234
- [BELV.DirectlyIncreases, RDF::RDFS.subClassOf, BELV.PositiveRelationship],
235
- [BELV.DirectlyIncreases, RDF::RDFS.subClassOf, BELV.DirectRelationship],
236
- [BELV.DirectlyIncreases, RDF::RDFS.subClassOf, BELV.Increases],
237
- [BELV.DirectRelationship, RDF::RDFS.subClassOf, BELV.Relationship],
238
- [BELV.HasComponent, RDF::RDFS.subClassOf, BELV.MembershipRelationship],
239
- [BELV.HasMember, RDF::RDFS.subClassOf, BELV.MembershipRelationship],
240
- [BELV.Increases, RDF::RDFS.subClassOf, BELV.CausalRelationship],
241
- [BELV.Increases, RDF::RDFS.subClassOf, BELV.PositiveRelationship],
242
- [BELV.IsA, RDF::RDFS.subClassOf, BELV.MembershipRelationship],
243
- [BELV.MembershipRelationship, RDF::RDFS.subClassOf, BELV.Relationship],
244
- [BELV.NegativeCorrelation, RDF::RDFS.subClassOf, BELV.CorrelativeRelationship],
245
- [BELV.NegativeCorrelation, RDF::RDFS.subClassOf, BELV.NegativeRelationship],
246
- [BELV.NegativeRelationship, RDF::RDFS.subClassOf, BELV.Relationship],
247
- [BELV.PositiveCorrelation, RDF::RDFS.subClassOf, BELV.CorrelativeRelationship],
248
- [BELV.PositiveCorrelation, RDF::RDFS.subClassOf, BELV.PositiveRelationship],
249
- [BELV.PositiveRelationship, RDF::RDFS.subClassOf, BELV.Relationship],
250
- [BELV.PrognosticBiomarkerFor, RDF::RDFS.subClassOf, BELV.BiomarkerFor],
251
- [BELV.RateLimitingStepOf, RDF::RDFS.subClassOf, BELV.Increases],
252
- [BELV.RateLimitingStepOf, RDF::RDFS.subClassOf, BELV.CausalRelationship],
253
- [BELV.RateLimitingStepOf, RDF::RDFS.subClassOf, BELV.SubProcessOf],
254
- [BELV.SubProcessOf, RDF::RDFS.subClassOf, BELV.MembershipRelationship],
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, RDF::RDFS.subClassOf, BELV.Process],
258
- [BELV.BiologicalProcess, RDF::RDFS.subClassOf, BELV.Process],
259
- [BELV.CellSecretion, RDF::RDFS.subClassOf, BELV.Translocation],
260
- [BELV.ComplexAbundance, RDF::RDFS.subClassOf, BELV.Abundance],
261
- [BELV.CompositeAbundance, RDF::RDFS.subClassOf, BELV.Abundance],
262
- [BELV.Degradation, RDF::RDFS.subClassOf, BELV.Transformation],
263
- [BELV.GeneAbundance, RDF::RDFS.subClassOf, BELV.Abundance],
264
- [BELV.MicroRNAAbundance, RDF::RDFS.subClassOf, BELV.Abundance],
265
- [BELV.ModifiedProteinAbundance, RDF::RDFS.subClassOf, BELV.ProteinAbundance],
266
- [BELV.Pathology, RDF::RDFS.subClassOf, BELV.BiologicalProcess],
267
- [BELV.Process, RDF.type, RDF::RDFS.Class],
268
- [BELV.ProteinAbundance, RDF::RDFS.subClassOf, BELV.Abundance],
269
- [BELV.ProteinVariantAbundance, RDF::RDFS.subClassOf, BELV.ProteinAbundance],
270
- [BELV.Reaction, RDF::RDFS.subClassOf, BELV.Transformation],
271
- [BELV.RNAAbundance, RDF::RDFS.subClassOf, BELV.Abundance],
272
- [BELV.Transformation, RDF::RDFS.subClassOf, BELV.Process],
273
- [BELV.Translocation, RDF::RDFS.subClassOf, BELV.Transformation],
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, RDF::RDFS.subClassOf, BELV.Activity],
277
- [BELV.Catalytic, RDF::RDFS.subClassOf, BELV.Activity],
278
- [BELV.Chaperone, RDF::RDFS.subClassOf, BELV.Activity],
279
- [BELV.GtpBound, RDF::RDFS.subClassOf, BELV.Activity],
280
- [BELV.Kinase, RDF::RDFS.subClassOf, BELV.Activity],
281
- [BELV.Peptidase, RDF::RDFS.subClassOf, BELV.Activity],
282
- [BELV.Phosphatase, RDF::RDFS.subClassOf, BELV.Activity],
283
- [BELV.Ribosylase, RDF::RDFS.subClassOf, BELV.Activity],
284
- [BELV.Transcription, RDF::RDFS.subClassOf, BELV.Activity],
285
- [BELV.Transport, RDF::RDFS.subClassOf, BELV.Activity],
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, RDF::RDFS.subClassOf, BELV.Modification],
289
- [BELV.Farnesylation, RDF::RDFS.subClassOf, BELV.Modification],
290
- [BELV.Glycosylation, RDF::RDFS.subClassOf, BELV.Modification],
291
- [BELV.Hydroxylation, RDF::RDFS.subClassOf, BELV.Modification],
292
- [BELV.Methylation, RDF::RDFS.subClassOf, BELV.Modification],
293
- [BELV.Phosphorylation, RDF::RDFS.subClassOf, BELV.Modification],
294
- [BELV.Ribosylation, RDF::RDFS.subClassOf, BELV.Modification],
295
- [BELV.Sumoylation, RDF::RDFS.subClassOf, BELV.Modification],
296
- [BELV.Ubiquitination, RDF::RDFS.subClassOf, BELV.Modification],
297
- [BELV.PhosphorylationSerine, RDF::RDFS.subClassOf, BELV.Phosphorylation],
298
- [BELV.PhosphorylationTyrosine, RDF::RDFS.subClassOf, BELV.Phosphorylation],
299
- [BELV.PhosphorylationThreonine, RDF::RDFS.subClassOf, BELV.Phosphorylation],
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, RDF::RDFS.range, BELV.Activity],
304
- [BELV.hasActivityType, RDF::RDFS.domain, BELV.Term],
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, RDF::RDFS.range, BELV.Term],
307
- [BELV.hasChild, RDF::RDFS.domain, BELV.Term],
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, RDF::RDFS.range, BELV.NamespaceConcept],
310
- [BELV.hasConcept, RDF::RDFS.domain, BELV.Term],
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, RDF::RDFS.range, RDF::XSD.integer],
313
- [BELV.hasModificationPosition, RDF::RDFS.domain, BELV.Term],
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, RDF::RDFS.range, BELV.Activity],
316
- [BELV.hasModificationType, RDF::RDFS.domain, BELV.Term],
323
+ [BELV.hasModificationType, RDFS.range, BELV.Activity],
324
+ [BELV.hasModificationType, RDFS.domain, BELV.Term],
317
325
 
318
326
  # Properties - BEL Statement
319
- [BELV.hasEvidence, RDF.type, RDF.Property],
320
- [BELV.hasEvidence, RDF::RDFS.range, BELV.Evidence],
321
- [BELV.hasEvidence, RDF::RDFS.domain, BELV.Statement],
322
- [BELV.hasObject, RDF::RDFS.subPropertyOf, BELV.hasChild],
323
- [BELV.hasObject, RDF::RDFS.range, BELV.Term],
324
- [BELV.hasObject, RDF::RDFS.domain, BELV.Statement],
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, RDF::RDFS.range, BELV.Relationship],
327
- [BELV.hasRelationship, RDF::RDFS.domain, BELV.Statement],
328
- [BELV.hasSubject, RDF::RDFS.subPropertyOf, BELV.hasChild],
329
- [BELV.hasSubject, RDF::RDFS.range, BELV.Term],
330
- [BELV.hasSubject, RDF::RDFS.domain, BELV.Statement],
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 - Evidence
340
+ # Properties - Nanopub
333
341
  [BELV.hasAnnotation, RDF.type, RDF.Property],
334
- [BELV.hasAnnotation, RDF::RDFS.range, BELV.AnnotationConcept],
335
- [BELV.hasAnnotation, RDF::RDFS.domain, BELV.Evidence],
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, RDF::RDFS.domain, BELV.Evidence],
338
- [BELV.hasEvidenceText, RDF::RDFS.range, RDF::XSD.string],
339
- [BELV.hasEvidenceText, RDF::RDFS.domain, BELV.Evidence],
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, RDF::RDFS.range, BELV.Statement],
342
- [BELV.hasStatement, RDF::RDFS.domain, BELV.Evidence]
349
+ [BELV.hasStatement, RDFS.range, BELV.Statement],
350
+ [BELV.hasStatement, RDFS.domain, BELV.Nanopub]
343
351
  ])
344
352
 
345
353
  def self.vocabulary_rdf