bel 0.4.0.beta.5 → 0.4.0.beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/bel_summarize.rb +1 -1
- data/lib/bel/json/adapter/multi_json.rb +7 -2
- data/lib/bel/json/adapter/ruby_json.rb +7 -2
- data/lib/bel/language.rb +39 -30
- data/lib/bel/script.rb +7 -7
- data/lib/bel/version.rb +1 -1
- metadata +12 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0b4945512529e67124a858ba03f03b18c617ee5
|
4
|
+
data.tar.gz: a57e2e8142d0ed1ef080e4ff206aaf76e69243b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 860f4fa04e20ae6614701eb4714e6cf525781e23cffe1da36307894d62fa26916b5b8d78795b1d90d973c8aa57cd80c792c943d3305e14e9c29b23f8fc2db29c
|
7
|
+
data.tar.gz: 7c68969a47cb4d4a21642c6cc3bfbe825373cf7dab2cf087d410972fb07e5c569a13b88b574e62ffb5d0c921ab6ea2783494bde813cd58c01b04aa4cbaf025d1
|
data/bin/bel_summarize.rb
CHANGED
@@ -13,8 +13,13 @@ module BEL::JSON
|
|
13
13
|
def read(data, options = {})
|
14
14
|
if block_given?
|
15
15
|
options = { :symbolize_keys => true }.merge!(options)
|
16
|
-
MultiJson.load(data, options)
|
17
|
-
|
16
|
+
parsed = MultiJson.load(data, options)
|
17
|
+
if parsed.respond_to?(:each_pair)
|
18
|
+
yield parsed
|
19
|
+
else
|
20
|
+
parsed.each do |obj|
|
21
|
+
yield obj
|
22
|
+
end
|
18
23
|
end
|
19
24
|
else
|
20
25
|
to_enum(:read, data, options)
|
@@ -13,8 +13,13 @@ module BEL::JSON
|
|
13
13
|
def read(data, options = {})
|
14
14
|
if block_given?
|
15
15
|
options = { :symbolize_names => true }.merge!(options)
|
16
|
-
JSON.load(data, nil, options)
|
17
|
-
|
16
|
+
parsed = JSON.load(data, nil, options)
|
17
|
+
if parsed.respond_to?(:each_pair)
|
18
|
+
yield parsed
|
19
|
+
else
|
20
|
+
parsed.each do |obj|
|
21
|
+
yield obj
|
22
|
+
end
|
18
23
|
end
|
19
24
|
else
|
20
25
|
to_enum(:read, data, options)
|
data/lib/bel/language.rb
CHANGED
@@ -567,40 +567,49 @@ module BEL
|
|
567
567
|
r: [:r, :a]
|
568
568
|
}
|
569
569
|
|
570
|
-
RELATIONSHIPS =
|
571
|
-
:actsIn,
|
572
|
-
:analogous,
|
573
|
-
:association,
|
574
|
-
:
|
575
|
-
:
|
576
|
-
:
|
577
|
-
:
|
578
|
-
:
|
579
|
-
:
|
580
|
-
:
|
581
|
-
:
|
582
|
-
:
|
583
|
-
:
|
584
|
-
:
|
585
|
-
:
|
586
|
-
:
|
587
|
-
:
|
588
|
-
:
|
589
|
-
:
|
590
|
-
:
|
591
|
-
:
|
592
|
-
:
|
593
|
-
:
|
594
|
-
:
|
595
|
-
:
|
596
|
-
:
|
597
|
-
|
570
|
+
RELATIONSHIPS = {
|
571
|
+
:actsIn => :actsIn,
|
572
|
+
:analogous => :analogous,
|
573
|
+
:'--' => :association,
|
574
|
+
:association => :association,
|
575
|
+
:biomarkerFor => :biomarkerFor,
|
576
|
+
:causesNoChange => :causesNoChange,
|
577
|
+
:'-|' => :decreases,
|
578
|
+
:decreases => :decreases,
|
579
|
+
:'=|' => :directlyDecreases,
|
580
|
+
:directlyDecreases => :directlyDecreases,
|
581
|
+
:'=>' => :directlyIncreases,
|
582
|
+
:directlyIncreases => :directlyIncreases,
|
583
|
+
:'->' => :increases,
|
584
|
+
:increases => :increases,
|
585
|
+
:hasComponent => :hasComponent,
|
586
|
+
:hasComponents => :hasComponents,
|
587
|
+
:hasMember => :hasMember,
|
588
|
+
:hasMembers => :hasMembers,
|
589
|
+
:hasModification => :hasModification,
|
590
|
+
:hasProduct => :hasProduct,
|
591
|
+
:hasVariant => :hasVariant,
|
592
|
+
:includes => :includes,
|
593
|
+
:isA => :isA,
|
594
|
+
:negativeCorrelation => :negativeCorrelation,
|
595
|
+
:orthologous => :orthologous,
|
596
|
+
:positiveCorrelation => :positiveCorrelation,
|
597
|
+
:prognosticBiomarkerFor => :prognosticBiomarkerFor,
|
598
|
+
:rateLimitingStepOf => :rateLimitingStepOf,
|
599
|
+
:reactantIn => :reactantIn,
|
600
|
+
:subProcessOf => :subProcessOf,
|
601
|
+
:':>' => :transcribedTo,
|
602
|
+
:transcribedTo => :transcribedTo,
|
603
|
+
:'>>' => :translatedTo,
|
604
|
+
:translatedTo => :translatedTo,
|
605
|
+
:translocates => :translocates,
|
606
|
+
}
|
598
607
|
|
599
608
|
def self.include_bel_dsl
|
600
|
-
RELATIONSHIPS.each do |rel|
|
609
|
+
RELATIONSHIPS.each do |rel, long_form|
|
601
610
|
BEL::Model::Term.send(:define_method, rel) do |another|
|
602
611
|
s = BEL::Model::Statement.new self
|
603
|
-
s.relationship =
|
612
|
+
s.relationship = long_form
|
604
613
|
s.object = another
|
605
614
|
s
|
606
615
|
end
|
data/lib/bel/script.rb
CHANGED
@@ -21048,7 +21048,7 @@ cmtbuffer << data[p].ord end
|
|
21048
21048
|
|
21049
21049
|
ns =
|
21050
21050
|
if pfx
|
21051
|
-
@namespaces[pfx.to_sym] ||= NamespaceDefinition.new(pfx, nil, nil)
|
21051
|
+
@namespaces[pfx.to_sym] ||= BEL::Namespace::NamespaceDefinition.new(pfx, nil, nil)
|
21052
21052
|
else
|
21053
21053
|
nil
|
21054
21054
|
end
|
@@ -42200,7 +42200,7 @@ cmtbuffer << data[p].ord end
|
|
42200
42200
|
|
42201
42201
|
ns =
|
42202
42202
|
if pfx
|
42203
|
-
@namespaces[pfx.to_sym] ||= NamespaceDefinition.new(pfx, nil, nil)
|
42203
|
+
@namespaces[pfx.to_sym] ||= BEL::Namespace::NamespaceDefinition.new(pfx, nil, nil)
|
42204
42204
|
else
|
42205
42205
|
nil
|
42206
42206
|
end
|
@@ -63352,7 +63352,7 @@ cmtbuffer << data[p].ord end
|
|
63352
63352
|
|
63353
63353
|
ns =
|
63354
63354
|
if pfx
|
63355
|
-
@namespaces[pfx.to_sym] ||= NamespaceDefinition.new(pfx, nil, nil)
|
63355
|
+
@namespaces[pfx.to_sym] ||= BEL::Namespace::NamespaceDefinition.new(pfx, nil, nil)
|
63356
63356
|
else
|
63357
63357
|
nil
|
63358
63358
|
end
|
@@ -84504,7 +84504,7 @@ cmtbuffer << data[p].ord end
|
|
84504
84504
|
|
84505
84505
|
ns =
|
84506
84506
|
if pfx
|
84507
|
-
@namespaces[pfx.to_sym] ||= NamespaceDefinition.new(pfx, nil, nil)
|
84507
|
+
@namespaces[pfx.to_sym] ||= BEL::Namespace::NamespaceDefinition.new(pfx, nil, nil)
|
84508
84508
|
else
|
84509
84509
|
nil
|
84510
84510
|
end
|
@@ -105656,7 +105656,7 @@ cmtbuffer << data[p].ord end
|
|
105656
105656
|
|
105657
105657
|
ns =
|
105658
105658
|
if pfx
|
105659
|
-
@namespaces[pfx.to_sym] ||= NamespaceDefinition.new(pfx, nil, nil)
|
105659
|
+
@namespaces[pfx.to_sym] ||= BEL::Namespace::NamespaceDefinition.new(pfx, nil, nil)
|
105660
105660
|
else
|
105661
105661
|
nil
|
105662
105662
|
end
|
@@ -126880,7 +126880,7 @@ cmtbuffer << data[p].ord end
|
|
126880
126880
|
|
126881
126881
|
ns =
|
126882
126882
|
if pfx
|
126883
|
-
@namespaces[pfx.to_sym] ||= NamespaceDefinition.new(pfx, nil, nil)
|
126883
|
+
@namespaces[pfx.to_sym] ||= BEL::Namespace::NamespaceDefinition.new(pfx, nil, nil)
|
126884
126884
|
else
|
126885
126885
|
nil
|
126886
126886
|
end
|
@@ -148071,7 +148071,7 @@ cmtbuffer << data[p].ord end
|
|
148071
148071
|
|
148072
148072
|
ns =
|
148073
148073
|
if pfx
|
148074
|
-
@namespaces[pfx.to_sym] ||= NamespaceDefinition.new(pfx, nil, nil)
|
148074
|
+
@namespaces[pfx.to_sym] ||= BEL::Namespace::NamespaceDefinition.new(pfx, nil, nil)
|
148075
148075
|
else
|
148076
148076
|
nil
|
148077
148077
|
end
|
data/lib/bel/version.rb
CHANGED
metadata
CHANGED
@@ -1,34 +1,34 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.0.beta.
|
4
|
+
version: 0.4.0.beta.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anthony Bargnesi
|
8
8
|
- Natalie Catlett
|
9
9
|
- Nick Bargnesi
|
10
10
|
- William Hayes
|
11
|
-
autorequire:
|
11
|
+
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2015-12-
|
14
|
+
date: 2015-12-03 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
|
+
name: ffi
|
17
18
|
requirement: !ruby/object:Gem::Requirement
|
18
19
|
requirements:
|
19
20
|
- - '='
|
20
21
|
- !ruby/object:Gem::Version
|
21
22
|
version: 1.9.8
|
22
|
-
name: ffi
|
23
|
-
prerelease: false
|
24
23
|
type: :runtime
|
24
|
+
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - '='
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: 1.9.8
|
30
|
-
description: " The BEL gem allows the reading, writing, and processing of BEL (Biological
|
31
|
-
|
30
|
+
description: " The BEL gem allows the reading, writing, and processing of BEL (Biological
|
31
|
+
Expression Language) with a natural DSL. "
|
32
32
|
email:
|
33
33
|
- abargnesi@selventa.com
|
34
34
|
- ncatlett@selventa.com
|
@@ -166,7 +166,7 @@ homepage: https://github.com/OpenBEL/bel.rb
|
|
166
166
|
licenses:
|
167
167
|
- Apache-2.0
|
168
168
|
metadata: {}
|
169
|
-
post_install_message:
|
169
|
+
post_install_message:
|
170
170
|
rdoc_options:
|
171
171
|
- "--title"
|
172
172
|
- BEL Ruby Documentation
|
@@ -200,9 +200,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
200
200
|
- !ruby/object:Gem::Version
|
201
201
|
version: 1.3.1
|
202
202
|
requirements: []
|
203
|
-
rubyforge_project:
|
204
|
-
rubygems_version: 2.4.
|
205
|
-
signing_key:
|
203
|
+
rubyforge_project:
|
204
|
+
rubygems_version: 2.4.5.1
|
205
|
+
signing_key:
|
206
206
|
specification_version: 4
|
207
207
|
summary: Process BEL with ruby.
|
208
208
|
test_files: []
|
209
|
+
has_rdoc:
|