bio 2.0.4 → 2.0.6

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.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +29 -0
  3. data/.gitignore +32 -0
  4. data/ChangeLog +433 -0
  5. data/Gemfile +3 -0
  6. data/LEGAL +2 -0
  7. data/README.rdoc +1 -1
  8. data/RELEASE_NOTES.rdoc +64 -0
  9. data/appveyor.yml +14 -13
  10. data/bioruby.gemspec +9 -10
  11. data/doc/Tutorial.md +1274 -0
  12. data/doc/Tutorial_ja.md +2595 -0
  13. data/lib/bio/appl/blast/genomenet.rb +2 -1
  14. data/lib/bio/appl/clustalw/report.rb +3 -2
  15. data/lib/bio/appl/iprscan/report.rb +2 -1
  16. data/lib/bio/appl/meme/mast.rb +2 -1
  17. data/lib/bio/appl/paml/common.rb +2 -1
  18. data/lib/bio/appl/pts1.rb +1 -1
  19. data/lib/bio/db/embl/common.rb +5 -2
  20. data/lib/bio/db/embl/uniprotkb.rb +52 -19
  21. data/lib/bio/db/fastq.rb +3 -2
  22. data/lib/bio/db/gff.rb +14 -8
  23. data/lib/bio/db/newick.rb +6 -5
  24. data/lib/bio/db/pdb/chain.rb +2 -1
  25. data/lib/bio/db/pdb/pdb.rb +2 -1
  26. data/lib/bio/db/prosite.rb +2 -0
  27. data/lib/bio/db.rb +5 -4
  28. data/lib/bio/io/flatfile/buffer.rb +2 -1
  29. data/lib/bio/io/flatfile/splitter.rb +2 -1
  30. data/lib/bio/pathway.rb +2 -1
  31. data/lib/bio/sequence/common.rb +2 -1
  32. data/lib/bio/util/restriction_enzyme/range/sequence_range/fragment.rb +3 -2
  33. data/lib/bio/util/sirna.rb +3 -2
  34. data/lib/bio/version.rb +1 -1
  35. data/test/data/uniprot/P03589.uniprot +127 -0
  36. data/test/data/uniprot/P49144.uniprot +232 -0
  37. data/test/functional/bio/test_command.rb +2 -0
  38. data/test/network/bio/db/kegg/test_genes_hsa7422.rb +29 -17
  39. data/test/unit/bio/appl/iprscan/test_report.rb +3 -2
  40. data/test/unit/bio/db/embl/test_uniprotkb_P03589.rb +378 -0
  41. data/test/unit/bio/db/embl/test_uniprotkb_P49144.rb +359 -0
  42. data/test/unit/bio/io/flatfile/test_splitter.rb +7 -4
  43. data/test/unit/bio/sequence/test_common.rb +3 -2
  44. data/test/unit/bio/test_alignment.rb +17 -16
  45. data/test/unit/bio/test_sequence.rb +3 -2
  46. metadata +11 -15
  47. data/.travis.yml +0 -71
  48. data/gemfiles/Gemfile.travis-jruby1.8 +0 -6
  49. data/gemfiles/Gemfile.travis-jruby1.9 +0 -5
  50. data/gemfiles/Gemfile.travis-rbx +0 -10
  51. data/gemfiles/Gemfile.travis-ruby1.8 +0 -6
  52. data/gemfiles/Gemfile.travis-ruby1.9 +0 -5
  53. data/gemfiles/Gemfile.windows +0 -6
  54. data/gemfiles/modify-Gemfile.rb +0 -28
  55. data/gemfiles/prepare-gemspec.rb +0 -29
@@ -0,0 +1,359 @@
1
+ # frozen_string_literal: true
2
+ #
3
+ # test/unit/bio/db/embl/test_uniprotkb_P49144.rb - Unit tests for Bio::UniProtKB
4
+ #
5
+ # Copyright::: Copyright (C) 2022 BioRuby Project <staff@bioruby.org>
6
+ # License:: The Ruby License
7
+ # Contributor:: 2005 Mitsuteru Nakao <n@bioruby.org>
8
+ # 2022 Naohisa Goto <ng@bioruby.org>
9
+ #
10
+
11
+ # loading helper routine for testing bioruby
12
+ require 'pathname'
13
+ load Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 4,
14
+ 'bioruby_test_helper.rb')).cleanpath.to_s
15
+
16
+ # libraries needed for the tests
17
+ require 'test/unit'
18
+ require 'bio/db/embl/uniprotkb'
19
+
20
+ module Bio
21
+ class TestUniProtKB_P49144 < Test::Unit::TestCase
22
+
23
+ def setup
24
+ data = File.read(File.join(BioRubyTestDataPath,
25
+ 'uniprot', 'P49144.uniprot'))
26
+ @obj = Bio::UniProtKB.new(data)
27
+ end
28
+
29
+ def test_id_line
30
+ assert(@obj.id_line)
31
+ end
32
+
33
+ def test_id_line_entry_name
34
+ assert_equal('5HT1B_RABIT', @obj.id_line('ENTRY_NAME'))
35
+ end
36
+
37
+ def test_id_line_data_class
38
+ assert_equal('Reviewed', @obj.id_line('DATA_CLASS'))
39
+ end
40
+
41
+ #def test_id_line_molecule_type
42
+ # assert_equal('PRT', @obj.id_line('MOLECULE_TYPE'))
43
+ #end
44
+
45
+ def test_id_line_sequence_length
46
+ assert_equal(390, @obj.id_line('SEQUENCE_LENGTH'))
47
+ end
48
+
49
+ def test_entry
50
+ entry = '5HT1B_RABIT'
51
+ assert_equal(entry, @obj.entry)
52
+ assert_equal(entry, @obj.entry_name)
53
+ assert_equal(entry, @obj.entry_id)
54
+ end
55
+
56
+ #def test_molecule
57
+ # assert_equal('PRT', @obj.molecule)
58
+ # assert_equal('PRT', @obj.molecule_type)
59
+ #end
60
+
61
+ def test_sequence_length
62
+ seqlen = 390
63
+ assert_equal(seqlen, @obj.sequence_length)
64
+ assert_equal(seqlen, @obj.aalen)
65
+ end
66
+
67
+ def test_ac
68
+ acs = ["P49144"].freeze
69
+ assert_equal(acs, @obj.ac)
70
+ assert_equal(acs, @obj.accessions)
71
+ end
72
+
73
+ def test_accession
74
+ assert_equal('P49144', @obj.accession)
75
+ end
76
+
77
+ def test_dr
78
+ assert_equal(28, @obj.dr.size)
79
+ assert_equal(12, @obj.dr['GO'].size)
80
+ assert_equal([["IPR002147", "5HT1B_rcpt"],
81
+ ["IPR002231", "5HT_rcpt"],
82
+ ["IPR000276", "GPCR_Rhodpsn"],
83
+ ["IPR017452", "GPCR_Rhodpsn_7TM"]],
84
+ @obj.dr['InterPro'])
85
+ end
86
+
87
+ def test_dr_with_key
88
+ pfam = [{"Accession" => "PF00001",
89
+ "Version" => "7tm_1",
90
+ " " => "1",
91
+ "Molecular Type" => nil}
92
+ ].freeze
93
+ assert_equal(pfam, @obj.dr('Pfam'))
94
+ embl = [{"Accession" => "Z50163",
95
+ "Version" => "CAA90531.1",
96
+ " " => "-",
97
+ "Molecular Type" => "Genomic_DNA"},
98
+ {"Accession" => "X89731",
99
+ "Version" => "CAA61883.1",
100
+ " " => "-",
101
+ "Molecular Type" => "mRNA"},
102
+ {"Accession" => "U60826",
103
+ "Version" => "AAB58467.1",
104
+ " " => "-",
105
+ "Molecular Type" => "Genomic_DNA"}
106
+ ].freeze
107
+ assert_equal(embl, @obj.dr('EMBL'))
108
+ end
109
+
110
+ def test_dr_with_key_empty
111
+ assert_equal([], @obj.dr('NOT_A_DATABASE'))
112
+ end
113
+
114
+ def test_dt
115
+ assert(@obj.dt)
116
+ end
117
+
118
+ def test_dt_created
119
+ assert_equal('01-FEB-1996, integrated into UniProtKB/Swiss-Prot.',
120
+ @obj.dt('created'))
121
+ end
122
+
123
+ def test_dt_sequence
124
+ assert_equal('01-FEB-1996, sequence version 1.',
125
+ @obj.dt('sequence'))
126
+ end
127
+
128
+ def test_dt_annotation
129
+ assert_equal('22-FEB-2023, entry version 127.',
130
+ @obj.dt('annotation'))
131
+ end
132
+
133
+ def test_de
134
+ assert(@obj.de)
135
+ end
136
+
137
+ def test_protein_name
138
+ assert_equal("5-hydroxytryptamine receptor 1B",
139
+ @obj.protein_name)
140
+ end
141
+
142
+ def test_synonyms
143
+ ary = [
144
+ "5-HT-1B",
145
+ "5-HT1B",
146
+ "Serotonin 1D beta receptor",
147
+ "5-HT-1D-beta",
148
+ "Serotonin receptor 1B"
149
+ ].freeze
150
+ assert_equal(ary, @obj.synonyms)
151
+ end
152
+
153
+ def test_protein_name_after_calling_de
154
+ assert(@obj.de)
155
+ assert_equal("5-hydroxytryptamine receptor 1B",
156
+ @obj.protein_name)
157
+ end
158
+
159
+ def test_synonyms_after_calling_de
160
+ assert(@obj.de)
161
+ assert_equal(5, @obj.synonyms.size)
162
+ end
163
+
164
+ def test_gn
165
+ assert_equal([{:orfs=>[], :synonyms=>[], :name=>"HTR1B", :loci=>[]}],
166
+ @obj.gn)
167
+ end
168
+
169
+ def test_gn_uniprot_parser
170
+ assert_equal([{:orfs=>[], :loci=>[], :name=>"HTR1B", :synonyms=>[]}],
171
+ @obj.instance_eval("gn_uniprot_parser"))
172
+ end
173
+
174
+ def test_gn_old_parser
175
+ assert_equal([["Name=HTR1B;"]],
176
+ @obj.instance_eval("gn_old_parser"))
177
+ end
178
+
179
+ def test_gene_names
180
+ assert_equal(["HTR1B"], @obj.gene_names)
181
+ end
182
+
183
+ def test_gene_name
184
+ assert_equal('HTR1B', @obj.gene_name)
185
+ end
186
+
187
+ def test_os
188
+ assert(@obj.os)
189
+ end
190
+
191
+ def test_os_access
192
+ assert_equal("Oryctolagus cuniculus (Rabbit)", @obj.os(0))
193
+ end
194
+
195
+ def test_os_access2
196
+ assert_equal({"name"=>"(Rabbit)", "os"=>"Oryctolagus cuniculus"},
197
+ @obj.os[0])
198
+ end
199
+
200
+ def test_oc
201
+ assert_equal(["Eukaryota", "Metazoa", "Chordata", "Craniata",
202
+ "Vertebrata", "Euteleostomi", "Mammalia", "Eutheria",
203
+ "Euarchontoglires", "Glires", "Lagomorpha",
204
+ "Leporidae", "Oryctolagus"],
205
+ @obj.oc)
206
+ end
207
+
208
+ def test_ox
209
+ assert_equal({"NCBI_TaxID"=>["9986"]}, @obj.ox)
210
+ end
211
+
212
+ def test_ref # Bio::UniProtKB#ref
213
+ assert_equal(Array, @obj.ref.class)
214
+ end
215
+
216
+ def test_cc
217
+ assert_equal(Hash, @obj.cc.class)
218
+ end
219
+
220
+ def test_cc_database
221
+ assert_equal(nil, @obj.cc('DATABASE'))
222
+ end
223
+
224
+ def test_cc_alternative_products
225
+ assert_equal(nil, @obj.cc('ALTERNATIVE PRODUCTS'))
226
+ end
227
+
228
+ def test_cc_mass_spectrometry
229
+ assert_equal(nil, @obj.cc('MASS SPECTROMETRY'))
230
+ end
231
+
232
+
233
+ def test_kw
234
+ keywords = [ "Behavior", "Cell membrane", "Disulfide bond",
235
+ "G-protein coupled receptor", "Glycoprotein",
236
+ "Lipoprotein", "Membrane", "Palmitate",
237
+ "Phosphoprotein", "Receptor", "Reference proteome",
238
+ "Transducer", "Transmembrane", "Transmembrane helix" ]
239
+ assert_equal(keywords, @obj.kw)
240
+ end
241
+
242
+ def test_ft
243
+ assert(@obj.ft)
244
+ name = 'TOPO_DOM'
245
+ data = [{"From"=>1,
246
+ "To"=>49,
247
+ "diff"=>[],
248
+ "original"=>
249
+ ["TOPO_DOM",
250
+ "1",
251
+ "49",
252
+ [["note", "Extracellular"], ["evidence", "ECO:0000250"]]],
253
+ "note"=>"Extracellular",
254
+ "evidence"=>"ECO:0000250"},
255
+ {"From"=>76,
256
+ "To"=>84,
257
+ "diff"=>[],
258
+ "original"=>
259
+ ["TOPO_DOM",
260
+ "76",
261
+ "84",
262
+ [["note", "Cytoplasmic"], ["evidence", "ECO:0000250"]]],
263
+ "note"=>"Cytoplasmic",
264
+ "evidence"=>"ECO:0000250"},
265
+ {"From"=>111,
266
+ "To"=>123,
267
+ "diff"=>[],
268
+ "original"=>
269
+ ["TOPO_DOM",
270
+ "111",
271
+ "123",
272
+ [["note", "Extracellular"], ["evidence", "ECO:0000250"]]],
273
+ "note"=>"Extracellular",
274
+ "evidence"=>"ECO:0000250"},
275
+ {"From"=>146,
276
+ "To"=>165,
277
+ "diff"=>[],
278
+ "original"=>
279
+ ["TOPO_DOM",
280
+ "146",
281
+ "165",
282
+ [["note", "Cytoplasmic"], ["evidence", "ECO:0000250"]]],
283
+ "note"=>"Cytoplasmic",
284
+ "evidence"=>"ECO:0000250"},
285
+ {"From"=>188,
286
+ "To"=>205,
287
+ "diff"=>[],
288
+ "original"=>
289
+ ["TOPO_DOM",
290
+ "188",
291
+ "205",
292
+ [["note", "Extracellular"], ["evidence", "ECO:0000250"]]],
293
+ "note"=>"Extracellular",
294
+ "evidence"=>"ECO:0000250"},
295
+ {"From"=>229,
296
+ "To"=>315,
297
+ "diff"=>[],
298
+ "original"=>
299
+ ["TOPO_DOM",
300
+ "229",
301
+ "315",
302
+ [["note", "Cytoplasmic"], ["evidence", "ECO:0000250"]]],
303
+ "note"=>"Cytoplasmic",
304
+ "evidence"=>"ECO:0000250"},
305
+ {"From"=>337,
306
+ "To"=>349,
307
+ "diff"=>[],
308
+ "original"=>
309
+ ["TOPO_DOM",
310
+ "337",
311
+ "349",
312
+ [["note", "Extracellular"], ["evidence", "ECO:0000250"]]],
313
+ "note"=>"Extracellular",
314
+ "evidence"=>"ECO:0000250"},
315
+ {"From"=>372,
316
+ "To"=>390,
317
+ "diff"=>[],
318
+ "original"=>
319
+ ["TOPO_DOM",
320
+ "372",
321
+ "390",
322
+ [["note", "Cytoplasmic"], ["evidence", "ECO:0000250"]]],
323
+ "note"=>"Cytoplasmic",
324
+ "evidence"=>"ECO:0000250"}].freeze
325
+ assert_equal(data, @obj.ft[name])
326
+ end
327
+
328
+ def test_sq
329
+ assert_equal({"CRC64"=>"C22EBC077C6C897D", "aalen"=>390, "MW"=>43496},
330
+ @obj.sq)
331
+ end
332
+
333
+ def test_sq_crc64
334
+ assert_equal("C22EBC077C6C897D", @obj.sq('CRC64'))
335
+ end
336
+
337
+ def test_sq_mw
338
+ mw = 43496
339
+ assert_equal(mw, @obj.sq('mw'))
340
+ assert_equal(mw, @obj.sq('molecular'))
341
+ assert_equal(mw, @obj.sq('weight'))
342
+ end
343
+
344
+ def test_sq_len
345
+ length = 390
346
+ assert_equal(length, @obj.sq('len'))
347
+ assert_equal(length, @obj.sq('length'))
348
+ assert_equal(length, @obj.sq('AA'))
349
+ end
350
+
351
+ def test_seq
352
+ seq = "MEEPGAQCAPPLAAGSQIAVPQANLSAAHSHNCSAEGYIYQDSIALPWKVLLVLLLALFTLATTLSNAFVVATVYRTRKLHTPANYLIASLAVTDLLVSILVMPISTMYTVTGRWTLGQVVCDLWLSSDITCCTASIMHLCVIALDRYWAITDAVEYSAKRTPKRAAIMIRLVWVFSICISLPPFFWRQAKAEEEVSECLVNTDHVLYTVYSTVGAFYLPTLLLIALYGRIYVEARSRILKQTPNRTGKRLTRAQLITDSPGSTTSVTSINSRAPDVPSESGSPVYVNQVKVRVSDALLEKKKLMAARERKATKTLGIILGVFIVCWLPFFIISLVMPICKDACWFHQAIFDFFTWLGYVNSLINPIIYTMSNEDFKQAFHKLIRFKCTS"
353
+ assert_equal(seq, @obj.seq)
354
+ assert_equal(seq, @obj.aaseq)
355
+ end
356
+
357
+ end # class TestUniProtKB_P49144
358
+ end # module Bio
359
+
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  #
2
3
  # = test/unit/bio/io/flatfile/test_splitter.rb - unit test for Bio::FlatFile::Splitter
3
4
  #
@@ -37,7 +38,7 @@ module Bio::TestFlatFileSplitter
37
38
  end
38
39
  end #class TestDataClass
39
40
 
40
- TestData01 = <<__END_OF_TESTDATA__
41
+ testdata01 = <<__END_OF_TESTDATA__
41
42
 
42
43
  # This is test
43
44
 
@@ -54,10 +55,12 @@ tttttttttttttttttttttttt
54
55
  >test3
55
56
  atatatatatatatatatatatat
56
57
  __END_OF_TESTDATA__
57
- TestData01.chomp!
58
- # workaround for Windows
59
- TestData01.gsub!(/\r\n/, "\n")
60
58
 
59
+ testdata01 = testdata01.chomp
60
+ # workaround for Windows
61
+ testdata01.gsub!(/\r\n/, "\n")
62
+ TestData01 = testdata01
63
+
61
64
  class TestTemplate < Test::Unit::TestCase
62
65
  def setup
63
66
  @stream = Bio::FlatFile::BufferedInputStream.new(StringIO.new(TestData01), 'TestData01')
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  #
2
3
  # test/unit/bio/sequence/test_common.rb - Unit test for Bio::Sequencce::Common
3
4
  #
@@ -155,7 +156,7 @@ module Bio; module TestSequenceCommon
155
156
 
156
157
  rseqs = (0..2).collect do |i|
157
158
  newcomposition = Hash.new(0)
158
- newseq = ''
159
+ newseq = String.new
159
160
  ret = @seq.randomize do |c|
160
161
  assert_kind_of(TSequence, c)
161
162
  newcomposition[c] += 1
@@ -215,7 +216,7 @@ module Bio; module TestSequenceCommon
215
216
 
216
217
  rseqs = (0..2).collect do |i|
217
218
  newcomposition = Hash.new(0)
218
- newseq = ''
219
+ newseq = String.new
219
220
  ret = @seq.randomize(hash) do |c|
220
221
  #assert_kind_of(TSequence, c)
221
222
  assert_kind_of(String, c)
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  #
2
3
  # test/unit/bio/test_alignment.rb - Unit test for Bio::Alignment
3
4
  #
@@ -436,29 +437,29 @@ module Bio
436
437
 
437
438
  def test_convert_match
438
439
  a = A[
439
- 'aaaa',
440
- 'accc',
441
- 'acac',
442
- 'actc'
440
+ 'aaaa'.dup,
441
+ 'accc'.dup,
442
+ 'acac'.dup,
443
+ 'actc'.dup
443
444
  ]
444
445
  a.convert_match
445
446
  assert_equal(A[ 'aaaa', '.ccc', '.c.c', '.ctc' ], a)
446
447
  end
447
448
 
448
449
  def test_convert_unmatch
449
- a = A[ 'aaaa', '.ccc', '.c.c', '.ctc' ]
450
+ a = A[ 'aaaa'.dup, '.ccc'.dup, '.c.c'.dup, '.ctc'.dup ]
450
451
  a.convert_unmatch
451
452
  assert_equal(A[ 'aaaa', 'accc', 'acac', 'actc' ], a)
452
453
  end
453
454
 
454
455
  def test_alignment_normalize!
455
- a = A[ 'a', 'atg', 'atgc', '' ]
456
+ a = A[ 'a'.dup, 'atg'.dup, 'atgc'.dup, ''.dup ]
456
457
  a.alignment_normalize!
457
458
  assert_equal(A[ 'a---', 'atg-', 'atgc', '----'], a)
458
459
  end
459
460
 
460
461
  def test_alignment_rstrip!
461
- a = A[ '--aaa--', '--t-t--', '---g---', '--t' ]
462
+ a = A[ '--aaa--'.dup, '--t-t--'.dup, '---g---'.dup, '--t'.dup ]
462
463
  assert(a.alignment_rstrip!)
463
464
  assert_equal(A[ '--aaa', '--t-t', '---g-', '--t' ], a)
464
465
  end
@@ -470,7 +471,7 @@ module Bio
470
471
  end
471
472
 
472
473
  def test_alignment_lstrip!
473
- a = A[ '--aaa--', '--t-t--', '---g---', '--t' ]
474
+ a = A[ '--aaa--'.dup, '--t-t--'.dup, '---g---'.dup, '--t'.dup ]
474
475
  assert(a.alignment_lstrip!)
475
476
  assert_equal(A[ 'aaa--', 't-t--', '-g---', 't' ], a)
476
477
  end
@@ -482,7 +483,7 @@ module Bio
482
483
  end
483
484
 
484
485
  def test_alignment_strip!
485
- a = A[ '--aaa--', '--t-t--', '---g---', '--t' ]
486
+ a = A[ '--aaa--'.dup, '--t-t--'.dup, '---g---'.dup, '--t'.dup ]
486
487
  assert(a.alignment_strip!)
487
488
  assert_equal(A[ 'aaa', 't-t', '-g-', 't' ], a)
488
489
  end
@@ -494,7 +495,7 @@ module Bio
494
495
  end
495
496
 
496
497
  def test_remove_all_gaps!
497
- a = A[ '--aaa--', '--t-t--', '---g---', '--t' ]
498
+ a = A[ '--aaa--'.dup, '--t-t--'.dup, '---g---'.dup, '--t'.dup ]
498
499
  assert(a.remove_all_gaps!)
499
500
  assert_equal(A[ 'aaa', 'tt', 'g', 't' ], a)
500
501
  end
@@ -525,7 +526,7 @@ module Bio
525
526
  end
526
527
 
527
528
  def test_alignment_concat
528
- a = A[ 'aaa', 'c', 'gg', 't' ]
529
+ a = A[ 'aaa'.dup, 'c'.dup, 'gg'.dup, 't'.dup ]
529
530
  a.alignment_concat(A[ 'ttt', 'gg', 'aa', 'cc', 'aa' ])
530
531
  assert_equal(A[ 'aaattt', 'cgg', 'ggaa', 'tcc' ], a)
531
532
  a.alignment_concat([ 'c', 't' ])
@@ -702,7 +703,7 @@ module Bio
702
703
  end
703
704
 
704
705
  def test_add_seq_using_seq_with_seq_method
705
- seq = "agtc"
706
+ seq = "agtc".dup
706
707
  class <<seq
707
708
  def seq
708
709
  Sequence::NA.new(self)
@@ -716,7 +717,7 @@ module Bio
716
717
  end
717
718
 
718
719
  def test_add_seq_using_seq_with_naseq_method
719
- seq = "agtc"
720
+ seq = "agtc".dup
720
721
  class <<seq
721
722
  def naseq
722
723
  Sequence::NA.new(self)
@@ -730,7 +731,7 @@ module Bio
730
731
  end
731
732
 
732
733
  def test_add_seq_using_seq_with_aaseq_method
733
- seq = "AVGR"
734
+ seq = "AVGR".dup
734
735
  class <<seq
735
736
  def aaseq
736
737
  Sequence::AA.new(self)
@@ -744,7 +745,7 @@ module Bio
744
745
  end
745
746
 
746
747
  def test_add_seq_using_seq_with_definition_method
747
- seq = "atgc"
748
+ seq = "atgc".dup
748
749
  class <<seq
749
750
  def definition
750
751
  "this is the key"
@@ -757,7 +758,7 @@ module Bio
757
758
  end
758
759
 
759
760
  def test_add_seq_using_seq_with_entry_id_method
760
- seq = "atgc"
761
+ seq = "atgc".dup
761
762
  class <<seq
762
763
  def entry_id
763
764
  271828
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  #
2
3
  # test/unit/bio/test_sequence.rb - Unit test for Bio::Sequencce
3
4
  #
@@ -233,7 +234,7 @@ module Bio
233
234
  end
234
235
 
235
236
  def test_randomize_dna_with_block
236
- appended = ""
237
+ appended = String.new
237
238
  @na.randomize {|x| appended << x}
238
239
  assert_equal(@na.composition, Sequence::NA.new(appended).composition)
239
240
  end
@@ -247,7 +248,7 @@ module Bio
247
248
  end
248
249
 
249
250
  def test_NA_randomize_with_counts_and_block
250
- appended = ""
251
+ appended = String.new
251
252
  counts = {'a'=>10,'c'=>20,'g'=>30,'u'=>40}
252
253
  counts.default = 0
253
254
  Sequence::NA.randomize(counts) {|x| appended << x}
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bio
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.4
4
+ version: 2.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - BioRuby project
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2022-09-13 00:00:00.000000000 Z
10
+ date: 2025-03-07 00:00:00.000000000 Z
12
11
  dependencies: []
13
12
  description: BioRuby is a library for bioinformatics (biology + information science).
14
13
  email: staff@bioruby.org
@@ -26,7 +25,8 @@ extra_rdoc_files:
26
25
  - doc/RELEASE_NOTES-1.4.3.rdoc
27
26
  - doc/RELEASE_NOTES-1.5.0.rdoc
28
27
  files:
29
- - ".travis.yml"
28
+ - ".github/workflows/ruby.yml"
29
+ - ".gitignore"
30
30
  - BSDL
31
31
  - COPYING
32
32
  - COPYING.ja
@@ -54,20 +54,14 @@ files:
54
54
  - doc/RELEASE_NOTES-1.4.2.rdoc
55
55
  - doc/RELEASE_NOTES-1.4.3.rdoc
56
56
  - doc/RELEASE_NOTES-1.5.0.rdoc
57
+ - doc/Tutorial.md
57
58
  - doc/Tutorial.rd
58
59
  - doc/Tutorial.rd.html
59
60
  - doc/Tutorial.rd.ja
60
61
  - doc/Tutorial.rd.ja.html
62
+ - doc/Tutorial_ja.md
61
63
  - doc/bioruby.css
62
64
  - etc/bioinformatics/seqdatabase.ini
63
- - gemfiles/Gemfile.travis-jruby1.8
64
- - gemfiles/Gemfile.travis-jruby1.9
65
- - gemfiles/Gemfile.travis-rbx
66
- - gemfiles/Gemfile.travis-ruby1.8
67
- - gemfiles/Gemfile.travis-ruby1.9
68
- - gemfiles/Gemfile.windows
69
- - gemfiles/modify-Gemfile.rb
70
- - gemfiles/prepare-gemspec.rb
71
65
  - lib/bio.rb
72
66
  - lib/bio/alignment.rb
73
67
  - lib/bio/appl/bl2seq/report.rb
@@ -465,7 +459,9 @@ files:
465
459
  - test/data/sim4/simple2-A4.sim4
466
460
  - test/data/soft/GDS100_partial.soft
467
461
  - test/data/soft/GSE3457_family_partial.soft
462
+ - test/data/uniprot/P03589.uniprot
468
463
  - test/data/uniprot/P28907.uniprot
464
+ - test/data/uniprot/P49144.uniprot
469
465
  - test/data/uniprot/p53_human.uniprot
470
466
  - test/functional/bio/sequence/test_output_embl.rb
471
467
  - test/functional/bio/test_command.rb
@@ -510,7 +506,9 @@ files:
510
506
  - test/unit/bio/db/embl/test_embl_to_bioseq.rb
511
507
  - test/unit/bio/db/embl/test_uniprot.rb
512
508
  - test/unit/bio/db/embl/test_uniprotkb.rb
509
+ - test/unit/bio/db/embl/test_uniprotkb_P03589.rb
513
510
  - test/unit/bio/db/embl/test_uniprotkb_P28907.rb
511
+ - test/unit/bio/db/embl/test_uniprotkb_P49144.rb
514
512
  - test/unit/bio/db/embl/test_uniprotkb_new_part.rb
515
513
  - test/unit/bio/db/fasta/test_defline.rb
516
514
  - test/unit/bio/db/fasta/test_defline_misc.rb
@@ -596,7 +594,6 @@ homepage: http://bioruby.org/
596
594
  licenses:
597
595
  - Ruby
598
596
  metadata: {}
599
- post_install_message:
600
597
  rdoc_options:
601
598
  - "--main"
602
599
  - README.rdoc
@@ -619,8 +616,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
619
616
  - !ruby/object:Gem::Version
620
617
  version: '0'
621
618
  requirements: []
622
- rubygems_version: 3.1.6
623
- signing_key:
619
+ rubygems_version: 3.6.2
624
620
  specification_version: 4
625
621
  summary: Bioinformatics library
626
622
  test_files: []