bel_parser 1.0.0.alpha.24 → 1.0.0.alpha.25
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/VERSION +1 -1
- data/lib/bel/translator/plugins/bel_script/bel_citation_serialization.rb +5 -5
- data/lib/bel/translator/plugins/bel_script/bel_discrete_serialization.rb +5 -5
- data/lib/bel/translator/plugins/bel_script/bel_top_down_serialization.rb +5 -5
- data/lib/bel/translator/plugins/bel_script/nanopub_serialization.rb +4 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34152c1783a2172b735ca8b24fefe15e9c54acdb
|
4
|
+
data.tar.gz: 38dda7b229288ed5b773d10de465403460aa51cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c17ce508194ae5377a20996878f73bae578581602b778ce856be0a1c6d33c1fa88c7b7c7a4791c8fda3f21066b9ce760865f1620a2afc569b8efbc2a762f2e3
|
7
|
+
data.tar.gz: 1c9d09cae82f9013a03b791262afd9c3ed658615c575a3030e52cf81b31ec52b0026e366307f29dee49267ee1307975b08dec352b57a2f810ba67f1cc60c38d4
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.0.alpha.
|
1
|
+
1.0.0.alpha.25
|
@@ -35,12 +35,12 @@ module BEL::Translator::Plugins::BelScript::BelCitationSerialization
|
|
35
35
|
bel = ''
|
36
36
|
|
37
37
|
citation = citation_value(nanopub)
|
38
|
-
|
38
|
+
support = support_value(nanopub)
|
39
39
|
annotations = annotation_values(nanopub)
|
40
40
|
|
41
41
|
current_annotations = {}.merge(annotations)
|
42
42
|
current_annotations[:Citation] = citation if citation
|
43
|
-
current_annotations[:Support] =
|
43
|
+
current_annotations[:Support] = support if support
|
44
44
|
|
45
45
|
if !nanopub.citation.id || nanopub.citation.id.empty?
|
46
46
|
citation_id = quote('')
|
@@ -85,9 +85,9 @@ module BEL::Translator::Plugins::BelScript::BelCitationSerialization
|
|
85
85
|
end
|
86
86
|
|
87
87
|
# SET Support
|
88
|
-
|
89
|
-
if
|
90
|
-
bel << %Q{SET Support = "#{
|
88
|
+
support = current_annotations.delete(:Support)
|
89
|
+
if support
|
90
|
+
bel << %Q{SET Support = "#{support}"\n}
|
91
91
|
end
|
92
92
|
|
93
93
|
# SET new or modified annotations
|
@@ -50,12 +50,12 @@ module BEL::Translator::Plugins::BelScript::BelDiscreteSerialization
|
|
50
50
|
bel = ''
|
51
51
|
|
52
52
|
citation = citation_value(nanopub)
|
53
|
-
|
53
|
+
support = support_value(nanopub)
|
54
54
|
annotations = annotation_values(nanopub)
|
55
55
|
|
56
56
|
current_annotations = {}.merge(annotations)
|
57
57
|
current_annotations[:Citation] = citation if citation
|
58
|
-
current_annotations[:Support] =
|
58
|
+
current_annotations[:Support] = support if support
|
59
59
|
|
60
60
|
# UNSET unused annotations from previous nanopub.
|
61
61
|
(cumulative_annotations.keys - current_annotations.keys).each do |unset_key|
|
@@ -73,9 +73,9 @@ module BEL::Translator::Plugins::BelScript::BelDiscreteSerialization
|
|
73
73
|
end
|
74
74
|
|
75
75
|
# SET Support
|
76
|
-
|
77
|
-
if
|
78
|
-
bel << %Q{SET Support = "#{
|
76
|
+
support = current_annotations.delete(:Support)
|
77
|
+
if support
|
78
|
+
bel << %Q{SET Support = "#{support}"\n}
|
79
79
|
end
|
80
80
|
|
81
81
|
# SET new or modified annotations
|
@@ -34,12 +34,12 @@ module BEL::Translator::Plugins::BelScript::BelTopDownSerialization
|
|
34
34
|
bel = ''
|
35
35
|
|
36
36
|
citation = citation_value(nanopub)
|
37
|
-
|
37
|
+
support = support_value(nanopub)
|
38
38
|
annotations = annotation_values(nanopub)
|
39
39
|
|
40
40
|
current_annotations = {}.merge(annotations)
|
41
41
|
current_annotations[:Citation] = citation if citation
|
42
|
-
current_annotations[:Support]
|
42
|
+
current_annotations[:Support] = support if support
|
43
43
|
|
44
44
|
# UNSET unused annotations from previous nanopub.
|
45
45
|
(cumulative_annotations.keys - current_annotations.keys).each do |unset_key|
|
@@ -64,9 +64,9 @@ module BEL::Translator::Plugins::BelScript::BelTopDownSerialization
|
|
64
64
|
end
|
65
65
|
|
66
66
|
# SET Support
|
67
|
-
|
68
|
-
if
|
69
|
-
bel << %Q{SET Support = "#{
|
67
|
+
support = current_annotations.delete(:Support)
|
68
|
+
if support
|
69
|
+
bel << %Q{SET Support = "#{support}"\n}
|
70
70
|
end
|
71
71
|
|
72
72
|
# SET new or modified annotations
|
@@ -42,12 +42,12 @@ module BEL::Translator::Plugins::BelScript::NanopubSerialization
|
|
42
42
|
values.join(', ')
|
43
43
|
end
|
44
44
|
|
45
|
-
def
|
46
|
-
|
45
|
+
def support_value(nanopub)
|
46
|
+
support = nanopub.support
|
47
47
|
|
48
|
-
return nil unless
|
48
|
+
return nil unless support && support.value
|
49
49
|
|
50
|
-
value =
|
50
|
+
value = support.value
|
51
51
|
value.gsub!("\n", "")
|
52
52
|
value.gsub!('"', %Q{\\"})
|
53
53
|
value
|