bel 0.4.0.beta.2 → 0.4.0.beta.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bel/resource/namespace_value.rb +47 -13
- data/lib/bel/resource/namespaces.rb +0 -1
- data/lib/bel/version.rb +1 -1
- metadata +10 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3368c94b528ce9bc8cf2fb49aebc2ff53aade5e4
|
4
|
+
data.tar.gz: 32201cc5149a0e053fb8b564e93bb7f77550793b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65f309cc4f85677011c7f9e05e7138f10225fbc2c5962b2e5c8fb2d647e1c12488d954e8360b96775121cbf1183b9578f23d71409346f9cfcd349e6be4f0cc6a
|
7
|
+
data.tar.gz: 594dba92a90d0a5b555705f99b5f39d3ee71cc91fa8107ed368f5474c5651354b77b739d475e19c3636465a8dc84662e934c88670db4498def0fd6e5c8e54258
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require_relative '
|
1
|
+
require_relative 'namespaces'
|
2
2
|
|
3
3
|
module BEL
|
4
4
|
module Resource
|
@@ -25,20 +25,54 @@ module BEL
|
|
25
25
|
each.map(&:predicate).uniq
|
26
26
|
end
|
27
27
|
|
28
|
-
def equivalents
|
29
|
-
return to_enum(:equivalents) unless block_given?
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
28
|
+
def equivalents(target_namespaces = :all)
|
29
|
+
return to_enum(:equivalents, target_namespaces) unless block_given?
|
30
|
+
if target_namespaces == :all
|
31
|
+
@rdf_repository.
|
32
|
+
query(@eq_query) { |solution|
|
33
|
+
yield NamespaceValue.new(@rdf_repository, solution.object)
|
34
|
+
}
|
35
|
+
else
|
36
|
+
target_namespaces = Namespaces.new(@rdf_repository).
|
37
|
+
find([target_namespaces].flatten).to_a
|
38
|
+
target_namespaces.compact!
|
39
|
+
target_namespaces.map! { |ns| ns.uri }
|
40
|
+
|
41
|
+
@rdf_repository.
|
42
|
+
query(@eq_query).map { |solution|
|
43
|
+
NamespaceValue.new(@rdf_repository, solution.object)
|
44
|
+
}.select { |value|
|
45
|
+
scheme_uri = value.inScheme
|
46
|
+
target_namespaces.include?(scheme_uri)
|
47
|
+
}.each { |value|
|
48
|
+
yield value
|
49
|
+
}
|
50
|
+
end
|
34
51
|
end
|
35
52
|
|
36
|
-
def orthologs
|
37
|
-
return to_enum(:orthologs) unless block_given?
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
53
|
+
def orthologs(target_namespaces = :all)
|
54
|
+
return to_enum(:orthologs, target_namespaces) unless block_given?
|
55
|
+
if target_namespaces == :all
|
56
|
+
@rdf_repository.
|
57
|
+
query(@ortho_query) { |solution|
|
58
|
+
yield NamespaceValue.new(@rdf_repository, solution.object)
|
59
|
+
}
|
60
|
+
else
|
61
|
+
target_namespaces = Namespaces.new(@rdf_repository).
|
62
|
+
find([target_namespaces].flatten).to_a
|
63
|
+
target_namespaces.compact!
|
64
|
+
target_namespaces.map! { |ns| ns.uri }
|
65
|
+
|
66
|
+
@rdf_repository.
|
67
|
+
query(@ortho_query).map { |solution|
|
68
|
+
NamespaceValue.new(@rdf_repository, solution.object)
|
69
|
+
}.select { |value|
|
70
|
+
scheme_uri = value.inScheme
|
71
|
+
target_namespaces.include?(scheme_uri)
|
72
|
+
}.each { |value|
|
73
|
+
yield value
|
74
|
+
}
|
75
|
+
end
|
42
76
|
end
|
43
77
|
|
44
78
|
def hash
|
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.3
|
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
14
|
date: 2015-12-02 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
|
-
name: ffi
|
18
17
|
requirement: !ruby/object:Gem::Requirement
|
19
18
|
requirements:
|
20
19
|
- - '='
|
21
20
|
- !ruby/object:Gem::Version
|
22
21
|
version: 1.9.8
|
23
|
-
|
22
|
+
name: ffi
|
24
23
|
prerelease: false
|
24
|
+
type: :runtime
|
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
|
@@ -163,7 +163,7 @@ homepage: https://github.com/OpenBEL/bel.rb
|
|
163
163
|
licenses:
|
164
164
|
- Apache-2.0
|
165
165
|
metadata: {}
|
166
|
-
post_install_message:
|
166
|
+
post_install_message:
|
167
167
|
rdoc_options:
|
168
168
|
- "--title"
|
169
169
|
- BEL Ruby Documentation
|
@@ -197,10 +197,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
197
197
|
- !ruby/object:Gem::Version
|
198
198
|
version: 1.3.1
|
199
199
|
requirements: []
|
200
|
-
rubyforge_project:
|
201
|
-
rubygems_version: 2.4.
|
202
|
-
signing_key:
|
200
|
+
rubyforge_project:
|
201
|
+
rubygems_version: 2.4.8
|
202
|
+
signing_key:
|
203
203
|
specification_version: 4
|
204
204
|
summary: Process BEL with ruby.
|
205
205
|
test_files: []
|
206
|
-
has_rdoc:
|