bel 0.4.0.beta.5 → 0.4.0.beta.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6bb79ce88a768f48ee7ed3200ec80552c541165b
4
- data.tar.gz: df0d4949c261213198cfdab4d3140dc4040782b7
3
+ metadata.gz: d0b4945512529e67124a858ba03f03b18c617ee5
4
+ data.tar.gz: a57e2e8142d0ed1ef080e4ff206aaf76e69243b4
5
5
  SHA512:
6
- metadata.gz: e80a9b4954a24f8e16b816972f67a1ae854d8742d86b3ced5cbb18b481ad29d024377a947b9228bdcdedab20a17cebb22fe81a5541e2acbe3a1300c43f499db9
7
- data.tar.gz: 247e7bfba0b685001a3ac4548fdf121eca9761fd5c4de05444c7231e559dc827129931d7b409be144321a936a4f62b063f84b044dda901d0f35bc0c61988f3a6
6
+ metadata.gz: 860f4fa04e20ae6614701eb4714e6cf525781e23cffe1da36307894d62fa26916b5b8d78795b1d90d973c8aa57cd80c792c943d3305e14e9c29b23f8fc2db29c
7
+ data.tar.gz: 7c68969a47cb4d4a21642c6cc3bfbe825373cf7dab2cf087d410972fb07e5c569a13b88b574e62ffb5d0c921ab6ea2783494bde813cd58c01b04aa4cbaf025d1
@@ -38,7 +38,7 @@ CSV do |csv_out|
38
38
  report['fx_' + v[:long_form].to_s] = 0
39
39
  end
40
40
 
41
- RELATIONSHIPS.each do |r|
41
+ RELATIONSHIPS.values.each do |r|
42
42
  report['rel_' + r.to_s] = 0
43
43
  end
44
44
 
@@ -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).each do |obj|
17
- yield obj
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).each do |obj|
17
- yield obj
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)
@@ -567,40 +567,49 @@ module BEL
567
567
  r: [:r, :a]
568
568
  }
569
569
 
570
- RELATIONSHIPS = [
571
- :actsIn,
572
- :analogous,
573
- :association,
574
- :biomarkerFor,
575
- :causesNoChange,
576
- :decreases,
577
- :directlyDecreases,
578
- :directlyIncreases,
579
- :hasComponent, :hasComponents,
580
- :hasMember, :hasMembers,
581
- :hasModification,
582
- :hasProduct,
583
- :hasVariant,
584
- :includes,
585
- :increases,
586
- :isA,
587
- :negativeCorrelation,
588
- :orthologous,
589
- :positiveCorrelation,
590
- :prognosticBiomarkerFor,
591
- :rateLimitingStepOf,
592
- :reactantIn,
593
- :subProcessOf,
594
- :transcribedTo,
595
- :translatedTo,
596
- :translocates
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 = rel
612
+ s.relationship = long_form
604
613
  s.object = another
605
614
  s
606
615
  end
@@ -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
@@ -1,3 +1,3 @@
1
1
  module BEL
2
- VERSION = '0.4.0.beta.5'
2
+ VERSION = '0.4.0.beta.7'
3
3
  end
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.5
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-02 00:00:00.000000000 Z
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
- \ Expression Language) with a natural DSL. "
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.8
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: