@@ -12,139 +12,16 @@ class Strain < ApplicationRecord
1212 include HasExternalResources
1313 include Strain ::ExternalResources
1414
15- class << self
16- ##
17- # Hash of culture collection prefixes and URL rule.
18- # See also: https://ftp.ncbi.nih.gov/pub/taxonomy/Ccode_dump.txt
19- # See also: https://jcm.brc.riken.jp/en/abbr_e
20- def culture_collections
21- {
22- ATCC : 'https://www.atcc.org/products/%s' ,
23- DSM : 'https://www.dsmz.de/collection/catalogue/details/culture/DSM-%s' ,
24- IFO : 'https://www.nite.go.jp/nbrc/catalogue/' \
25- 'NBRCCatalogueDetailServlet?ID=IFO&CAT=%s' ,
26- JCM : 'https://www.jcm.riken.jp/cgi-bin/jcm/jcm_number?JCM=%s' ,
27- KCTC : 'https://kctc.kribb.re.kr/collection/view?sn=%s' ,
28- NBRC : 'https://www.nite.go.jp/nbrc/catalogue/' \
29- 'NBRCCatalogueDetailServlet?ID=IFO&CAT=%s' ,
30- NCTC : 'https://www.culturecollections.org.uk/products/bacteria/' \
31- 'detail.jsp?collection=nctc&refId=NCTC+%s' ,
32-
33- # Bioresource Collection and Research Center
34- # [TW: Food Industry Research and Development Insitute]
35- BCRC : 'https://catalog.bcrc.firdi.org.tw/BcrcContent?bid=%s' ,
36- # Collection of Aquatic Important Microorganisms
37- # [MX: CIAD, Centro de Investigación en Alimentación y Desarrollo]
38- CAIM : 'https://www.ciad.mx/caim/busqueda.php?' \
39- 'searchtype=caim&criterio=%s' ,
40- # Culture Collection of Autotrophic Organisms
41- # [CZ: Czech Academy of Sciences]
42- CCALA : 'https://ccala.butbn.cas.cz/strain/%s' ,
43- # Czech Collection of Microorganisms
44- # [CZ: Masaryk University]
45- CCM : 'https://www.sci.muni.cz/ccm/bakterie/camb/%s' ,
46- # China General Microbiological Culture Collection Center
47- # [CN: National Science and Technology Infrastructure]
48- # -- From NCBI Taxonomy (not working):
49- # -- 'http://www.cgmcc.net/english/cata.php?stn=CGMCC%%20%s'
50- CGMCC : 'https://cgmcc.net/english/search?stn=%s' ,
51- # NCMA, National Center for Marine Algae and Microbiota,
52- # formerly Culture Collection for Marine Phytoplankton
53- # [US: Bigelow Laboratory for Ocean Sciences]
54- CCMP : 'https://ncma.bigelow.org/CCMP%s' ,
55- # Culture Collection University of Gothenburg
56- # [SE: University of Gothenburg]
57- CCUG : 'https://www.ccug.se/strain?id=%s' ,
58- # China Center of Industrial Culture Collection
59- # [CN: China National Research Institute of Food & Fermentation
60- # Industries]
61- CICC : 'http://www.china-cicc.org/search/?classtype=1&keyword=%s' ,
62- # Collection de l'Institut Pasteur
63- # (Collection of the Institut Pasteur)
64- # [FR: Institut Pasteur]
65- CIP : 'https://catalogue-crbip.pasteur.fr/' \
66- 'fiche_catalogue.xhtml?crbip=CIP%%20%s' ,
67- # BCCM, Belgian Coordinated Collections of Microorganisms /
68- # Institute of Tropical Medicine Antwerp Mycobacteria Collection
69- # [BE: Belgian Science Policy (BELSPO)]
70- ITM : 'https://bccm.belspo.be/catalogues/bm-details?' \
71- 'accession_number=ITM%%20%s' ,
72- # Jena Microbial Resource Collection
73- # [DE: Friedrich Schiller University Jena]
74- JMRC : 'http://www.jmrc.uni-jena.de/data.php?fsu=%s' ,
75- # Korean Agricultural Culture Collection
76- # [KR: National Academy of Agricultural Science]
77- KACC : 'https://genebank.rda.go.kr/eng/mic/cat/MicrobeSearch.do' \
78- '?sSearchWith=no&sTxt1=%s' ,
79- # BCCM, Belgian Coordinated Collections of Microorganisms /
80- # Bacteria Collection Laboratorium voor Microbiologie Universiteit Gent
81- # (Bacteria Collection Laboratory of Microbiology, University of Ghent)
82- # [BE: Belgian Science Policy (BELSPO)]
83- LMG : 'https://bccm.belspo.be/catalogues/lmg-strain-details?NUM=%s' ,
84- # Marine Culture Collection of China
85- # [CN: Third Institute of Oceanography]
86- MCCC : 'https://mccc.org.cn/detailRecord3.asp?bcbh=%s' ,
87- # North East Pacific Culture Collection
88- # [CA: The University of British Columbia]
89- NEPCC : 'https://db.botany.ubc.ca/cccm/mfa/%s' ,
90- # National Institute for Environmental Studies Collection
91- # [JP: National Institute for Environmental Studies]
92- NIES : 'https://mcc.nies.go.jp/numberSearch.do?strainNumber=%s' ,
93- # Agricultural Research Service Culture Collection,
94- # formerly Northern Regional Research Laboratory
95- # [US: National Center for Agricultural Utilization Research]
96- NRRL : 'https://nrrl.ncaur.usda.gov/cgi-bin/usda/prokaryote/' \
97- 'report.html?nrrlcodes=%s' ,
98- # Pasteur Cultures of Cyanobacteria
99- # [FR: Institut Pasteur]
100- PCC : 'https://catalogue-crbip.pasteur.fr/' \
101- 'fiche_catalogue.xhtml?crbip=PCC%%20%s' ,
102- # Sammlung von Algenkulturen
103- # (Culture Collection of Algae)
104- # [DE: University of Göttingen]
105- SAG : 'https://sagdb.uni-goettingen.de/detailedList.php?str_number=%s' ,
106- # Thailand Bioresource Research Center
107- # [TH: Thailand Bioresource Research Center]
108- TBRC : 'https://tbrcnetwork.org/microb_detail.php?code=TBRC_%s' ,
109- # BCCM, Belgian Coordinated Collections of Microorganisms /
110- # University of of Liège Cyanobacteria Collection
111- # [BE: Belgian Science Policy (BELSPO)]
112- ULC : 'https://bccm.belspo.be/catalogues/bm-details?' \
113- 'accession_number=ULC%%20%s' ,
114- # ВСЕРОССИЙСКАЯ КОЛЛЕКЦИЯ МИКРООРГАНИЗМОВ
115- # (All-Russian Collection of Microorganisms)
116- # [RU: Pushchino Scientific Center for Biological Research of the
117- # Russian Academy of Sciences]
118- VKM : 'http://www.vkm.ru/strains.php?vkm=%s'
119- }
120- end
121- end
122-
12315 def numbers
12416 numbers_string . split ( ' = ' )
12517 end
12618
12719 def numbers_parsed
128- numbers . map do |str |
129- parts = str . split ( /[ :-]+/ , 2 )
130- coll = parts . count == 2 ? parts [ 0 ] . upcase . to_sym : nil
131-
132- if url_base = self . class . culture_collections [ coll ]
133- {
134- collection : coll ,
135- accession : parts . join ( ' ' ) ,
136- url : url_base % parts [ 1 ]
137- }
138- else
139- str
140- end
141- end
20+ @numbers_parsed ||= StrainCode . parse ( numbers_string )
14221 end
14322
14423 def collections
145- numbers_parsed
146- . map { |i | i . is_a? ( Hash ) ? i [ :collection ] : nil }
147- . compact . uniq
24+ numbers_parsed . map ( &:catalogue ) . compact . uniq
14825 end
14926
15027 def type_of_type
0 commit comments