strain-code 0.3.11 → 0.4.0
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/data/catalogues.yaml +13 -1
- data/lib/strain-code/catalogue.rb +1 -1
- data/lib/strain-code/number.rb +4 -1
- data/lib/strain-code/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7e88171ba33da2d21304d3775a65587d5eff1433004c810cb0967d26c3fd97f4
|
|
4
|
+
data.tar.gz: e809e1b56e29da5be3fab50ade2fa9ada1503a4fd6e992d5e841d1cab18368bb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c49e95e5eb52a7ecb34357606ba85b47a7ca8e64059ee3a25646a04a1b69ac926d7a9cbee8840994c3b83a732e03cb297d9881df0326098c400fdc90b53870a6
|
|
7
|
+
data.tar.gz: f2f8390e5d6d8de91478e1bbae94a40690983b770be200e91d633f2387bd7cd6d7e1d392924b42f1889652b5a10bc533d87011be7baab9371d7f6eee557d0076
|
data/data/catalogues.yaml
CHANGED
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
# matches a catalogue code
|
|
6
6
|
# - name_en: Name of the culture collection in English, if +name+ is spelled in
|
|
7
7
|
# a different language
|
|
8
|
+
# - number_tr: A two-string array indicating that characters in the first list
|
|
9
|
+
# should be replaced by those in the second list prior to passing the number
|
|
10
|
+
# to the `url_pattern`
|
|
8
11
|
# - organization: Name of the organization generating the catalogue. If a
|
|
9
12
|
# well-known acronym exists, this field should start with this acronym
|
|
10
13
|
# followed by colon (:) and the spelled-out name of the organization
|
|
@@ -116,6 +119,14 @@ catalogues:
|
|
|
116
119
|
organization: Czech Academy of Sciences
|
|
117
120
|
country_code: CZ
|
|
118
121
|
url_pattern: "https://ccala.butbn.cas.cz/strain/%s"
|
|
122
|
+
- codes: [ CCAP ]
|
|
123
|
+
name: "Culture Collection of Algae & Protozoa"
|
|
124
|
+
organization: "SAMS: Scottish Association for Marine Science"
|
|
125
|
+
country_code: UK
|
|
126
|
+
url: "https://www.ccap.ac.uk/"
|
|
127
|
+
number_tr: ["/", "-"]
|
|
128
|
+
url_pattern: "https://www.ccap.ac.uk/catalogue/strain-%s"
|
|
129
|
+
_examples: [ CCAP 1460/5 ]
|
|
119
130
|
- codes: [ CCM ]
|
|
120
131
|
name: Czech Collection of Microorganisms
|
|
121
132
|
organization: Masaryk University
|
|
@@ -389,7 +400,8 @@ catalogues:
|
|
|
389
400
|
name: National Institute for Environmental Studies Collection
|
|
390
401
|
organization: National Institute for Environmental Studies
|
|
391
402
|
country_code: JP
|
|
392
|
-
|
|
403
|
+
url: "https://mcc.nbrp.jp/index_en.html"
|
|
404
|
+
_examples: [ NIES 204 ]
|
|
393
405
|
- codes: [ NRC, NRCC ]
|
|
394
406
|
country_code: CA
|
|
395
407
|
name: Division of Biological Sciences, National Research Council of Canada
|
|
@@ -26,7 +26,7 @@ class StrainCode::Catalogue
|
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
attr_accessor :codes, :country_code, :name, :name_en, :organization
|
|
29
|
-
attr_accessor :url, :url_pattern
|
|
29
|
+
attr_accessor :number_tr, :url, :url_pattern
|
|
30
30
|
|
|
31
31
|
def initialize(hash)
|
|
32
32
|
hash.each { |k, v| self.send("#{k}=", v) unless k =~ /^_/ }
|
data/lib/strain-code/number.rb
CHANGED
|
@@ -18,7 +18,10 @@ class StrainCode::Number
|
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
def url
|
|
21
|
-
catalogue
|
|
21
|
+
return unless catalogue&.url_pattern && accession
|
|
22
|
+
|
|
23
|
+
acc = catalogue&.number_tr ? accession.tr(*catalogue.number_tr) : accession
|
|
24
|
+
catalogue.url_pattern % acc
|
|
22
25
|
end
|
|
23
26
|
|
|
24
27
|
def catalogue
|
data/lib/strain-code/version.rb
CHANGED