bio 1.5.1 → 1.5.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 80755db93233bba90ac5bf3da9de5605cefc795f
4
- data.tar.gz: 5f7e09d705f5b67e377821681c4b7518814c6b32
3
+ metadata.gz: 7d762b4e5d063e187234682d669984b9c043ef2e
4
+ data.tar.gz: d050ee03ce8b66ca9dde030cf16b5c0f01540966
5
5
  SHA512:
6
- metadata.gz: f122387efc4ede94b1130e62fbab6986e6c96c408214da22d93baa4dd818628947896a788dd1a90601ed7c7702079cd9f02b4a72a965e215a67a75d4fa68e9d8
7
- data.tar.gz: df2fd7b45726998d69d75325dc01685d45715d28dd754c7b8c2c985c4c164ea8d913fb994dc3f68cc627e9f120e2a570b1a4759a0e5cadf60096787f74d3ffb3
6
+ metadata.gz: 1f1b7e1f13ba07da9bb84e157379ce69c7d91fa7589eea351c54a3b23b611a61fb7f5099a8431f0705e16e76078332a334927c3d33752da084c23e496e952c5d
7
+ data.tar.gz: 60f24373d055430b535772ae0167844f9f816a11a34da08632f4c2a2545c58c7ff3c1647c715e7f457292f401026c3f438f2b189df48ecec1ad9f33303fd0e79
data/ChangeLog CHANGED
@@ -1,3 +1,144 @@
1
+ commit 68f87dc3c4488155992f88c3cf1db27061948315
2
+ Author: Naohisa Goto <ng@bioruby.org>
3
+ Date: Thu Sep 20 13:25:35 2018 +0900
4
+
5
+ add changes made for bioruby-1.5.2
6
+
7
+ RELEASE_NOTES.rdoc | 14 ++++++++++++++
8
+ 1 file changed, 14 insertions(+)
9
+
10
+ commit 6b7e87abfbab88a3bb1b80227ab4b0cfaaeae26e
11
+ Author: Naohisa Goto <ng@bioruby.org>
12
+ Date: Thu Sep 20 13:24:45 2018 +0900
13
+
14
+ regenerate bioruby.gemspec with rake regemspec
15
+
16
+ bioruby.gemspec | 2 +-
17
+ 1 file changed, 1 insertion(+), 1 deletion(-)
18
+
19
+ commit a7dbefeef20d6dea18f0bdd67df24e00c5e9ede6
20
+ Author: Naohisa Goto <ng@bioruby.org>
21
+ Date: Thu Sep 20 13:23:31 2018 +0900
22
+
23
+ version changed to 1.5.2
24
+
25
+ lib/bio/version.rb | 2 +-
26
+ 1 file changed, 1 insertion(+), 1 deletion(-)
27
+
28
+ commit e00134a1a31db46421b6d468ea1c1d0368bfbb6c
29
+ Author: Naohisa Goto <ng@bioruby.org>
30
+ Date: Thu Sep 20 12:55:32 2018 +0900
31
+
32
+ Bug fix: printf format syntax error about single percent character
33
+
34
+ * Bio::Shell#seqstat: Fix format specifier syntax error.
35
+ Recent version of Ruby raised error: 'ArgumentError:
36
+ incomplete format specifier;use %% (double %) instead'.
37
+
38
+ lib/bio/shell/plugin/seq.rb | 2 +-
39
+ 1 file changed, 1 insertion(+), 1 deletion(-)
40
+
41
+ commit df61cdba5ba3e90fda6c70cc9f880567656a5a82
42
+ Author: Naohisa Goto <ng@bioruby.org>
43
+ Date: Thu Sep 20 07:06:08 2018 +0900
44
+
45
+ Improvement documentation
46
+
47
+ * Improve documentation.
48
+ * Close https://github.com/bioruby/bioruby/pull/120 .
49
+
50
+ lib/bio/db/aaindex.rb | 79 +++++++++++++++++++++++++++++++++++++++++++++++----
51
+ 1 file changed, 74 insertions(+), 5 deletions(-)
52
+
53
+ commit 35bcc5008c7721afb3c16467ae6dc782651f4c39
54
+ Author: Naohisa Goto <ng@bioruby.org>
55
+ Date: Thu Sep 20 05:01:12 2018 +0900
56
+
57
+ Bug fix: Bio::Command.new_https should support proxy
58
+
59
+ lib/bio/command.rb | 18 +++++++-----------
60
+ 1 file changed, 7 insertions(+), 11 deletions(-)
61
+
62
+ commit 88b58e94d4612f39abb14b89779ceeb533cd552e
63
+ Author: Naohisa Goto <ng@bioruby.org>
64
+ Date: Thu Sep 20 04:58:56 2018 +0900
65
+
66
+ https support for Bio::Blast::Remote::GenomeNet::Information
67
+
68
+ lib/bio/appl/blast/genomenet.rb | 6 +++---
69
+ 1 file changed, 3 insertions(+), 3 deletions(-)
70
+
71
+ commit dfccbdf32bf819f941f2bcb4f63b2f0ce12cacfa
72
+ Author: ramadis <rramiro.o@hotmail.com>
73
+ Date: Sat Jul 7 15:12:33 2018 -0300
74
+
75
+ Add https requests in command. Fix genomenet query by allowing https requests.
76
+
77
+ lib/bio/appl/blast/genomenet.rb | 2 +-
78
+ lib/bio/command.rb | 14 ++++++++++++++
79
+ 2 files changed, 15 insertions(+), 1 deletion(-)
80
+
81
+ commit d1e1358c1a5c7c7f4aa093a09d5bb45b60f7e7ee
82
+ Author: markwilkinson <markw@illuminae.com>
83
+ Date: Tue Dec 12 14:13:51 2017 +0100
84
+
85
+ fixing Fasta Report parser for fasta36 -m10
86
+
87
+ lib/bio/appl/fasta/format10.rb | 3 ++-
88
+ 1 file changed, 2 insertions(+), 1 deletion(-)
89
+
90
+ commit b9b11f66733e20e1ee6d2b5e0aab813b5b5d0000
91
+ Author: Naohisa Goto <ng@bioruby.org>
92
+ Date: Wed Sep 13 22:13:59 2017 +0900
93
+
94
+ Suppress warning "assigned but unused variable"
95
+
96
+ lib/bio/io/flatfile/autodetection.rb | 5 +++++
97
+ 1 file changed, 5 insertions(+)
98
+
99
+ commit 580dd6bb9344c2afd0fe60b0cf53a4b28734fbbf
100
+ Author: Naohisa Goto <ng@bioruby.org>
101
+ Date: Wed Sep 13 22:10:53 2017 +0900
102
+
103
+ Suppress warning: "instance variable @top_strand not initialized"
104
+
105
+ * Suppress warning: "instance variable @top_strand not initialized".
106
+ To do so, force to raise NoMethodError when @top_strand is not
107
+ initialized or is nil. This should be changed to appropriate
108
+ exception in the future.
109
+
110
+ lib/bio/util/sirna.rb | 2 ++
111
+ 1 file changed, 2 insertions(+)
112
+
113
+ commit 9d7ef4e66ecdc1aadc08fda4b332a51ca7739c82
114
+ Author: Naohisa Goto <ng@bioruby.org>
115
+ Date: Wed Sep 13 21:31:38 2017 +0900
116
+
117
+ Suppress warning in Ruby 2.4: "constant ::Fixnum is deprecated"
118
+
119
+ lib/bio/db/soft.rb | 4 ++--
120
+ .../util/restriction_enzyme/range/sequence_range/calculated_cuts.rb | 2 +-
121
+ test/unit/bio/test_alignment.rb | 4 ++--
122
+ 3 files changed, 5 insertions(+), 5 deletions(-)
123
+
124
+ commit 2747ee11392068de88e044abf52d12a88a0624ea
125
+ Author: Naohisa Goto <ng@bioruby.org>
126
+ Date: Wed Sep 13 21:19:12 2017 +0900
127
+
128
+ Suppress warning "parentheses after method name is interpreted as an argument list, not a decomposed argument" in Ruby 2.4
129
+
130
+ lib/bio/map.rb | 8 ++++----
131
+ 1 file changed, 4 insertions(+), 4 deletions(-)
132
+
133
+ commit 1edbd88a703d3cff0f5a29e45fa51058405ab58c
134
+ Author: Naohisa Goto <ng@bioruby.org>
135
+ Date: Wed Sep 7 22:06:32 2016 +0900
136
+
137
+ BioRuby 1.5.1 is released
138
+
139
+ ChangeLog | 690 +++++++++++++++++++++++++++++++++++---------------------------
140
+ 1 file changed, 385 insertions(+), 305 deletions(-)
141
+
1
142
  commit 917fe0d0e9910267cd54bf48c2caabe89875a299
2
143
  Author: Naohisa Goto <ng@bioruby.org>
3
144
  Date: Wed Sep 7 22:00:56 2016 +0900
@@ -1916,11 +2057,9 @@ Date: Fri Jun 28 15:26:20 2013 +0900
1916
2057
 
1917
2058
  rename test/unit/bio/db/embl/test_uniprot_new_part.rb to test_uniprotkb_new_part.rb
1918
2059
 
1919
- test/unit/bio/db/embl/test_uniprot_new_part.rb | 208 -----------------------
1920
- test/unit/bio/db/embl/test_uniprotkb_new_part.rb | 208 +++++++++++++++++++++++
1921
- 2 files changed, 208 insertions(+), 208 deletions(-)
1922
- delete mode 100644 test/unit/bio/db/embl/test_uniprot_new_part.rb
1923
- create mode 100644 test/unit/bio/db/embl/test_uniprotkb_new_part.rb
2060
+ .../bio/db/embl/{test_uniprot_new_part.rb => test_uniprotkb_new_part.rb} | 0
2061
+ 1 file changed, 0 insertions(+), 0 deletions(-)
2062
+ rename test/unit/bio/db/embl/{test_uniprot_new_part.rb => test_uniprotkb_new_part.rb} (100%)
1924
2063
 
1925
2064
  commit 1b51d0940712a6f144f8268dc77048bc7ec7d983
1926
2065
  Author: Naohisa Goto <ng@bioruby.org>
@@ -1940,11 +2079,9 @@ Date: Fri Jun 28 15:01:15 2013 +0900
1940
2079
 
1941
2080
  test_sptr.rb is renamed to test_uniprotkb.rb
1942
2081
 
1943
- test/unit/bio/db/embl/test_sptr.rb | 1807 -------------------------------
1944
- test/unit/bio/db/embl/test_uniprotkb.rb | 1807 +++++++++++++++++++++++++++++++
1945
- 2 files changed, 1807 insertions(+), 1807 deletions(-)
1946
- delete mode 100644 test/unit/bio/db/embl/test_sptr.rb
1947
- create mode 100644 test/unit/bio/db/embl/test_uniprotkb.rb
2082
+ test/unit/bio/db/embl/{test_sptr.rb => test_uniprotkb.rb} | 0
2083
+ 1 file changed, 0 insertions(+), 0 deletions(-)
2084
+ rename test/unit/bio/db/embl/{test_sptr.rb => test_uniprotkb.rb} (100%)
1948
2085
 
1949
2086
  commit e1ed7fab4c0350e6866dd420a93e950c53063f38
1950
2087
  Author: Naohisa Goto <ng@bioruby.org>
@@ -1998,11 +2135,9 @@ Date: Thu Jun 27 18:16:38 2013 +0900
1998
2135
 
1999
2136
  Rename lib/bio/db/embl/sptr.rb to uniprotkb.rb
2000
2137
 
2001
- lib/bio/db/embl/sptr.rb | 1456 ------------------------------------------
2002
- lib/bio/db/embl/uniprotkb.rb | 1456 ++++++++++++++++++++++++++++++++++++++++++
2003
- 2 files changed, 1456 insertions(+), 1456 deletions(-)
2004
- delete mode 100644 lib/bio/db/embl/sptr.rb
2005
- create mode 100644 lib/bio/db/embl/uniprotkb.rb
2138
+ lib/bio/db/embl/{sptr.rb => uniprotkb.rb} | 0
2139
+ 1 file changed, 0 insertions(+), 0 deletions(-)
2140
+ rename lib/bio/db/embl/{sptr.rb => uniprotkb.rb} (100%)
2006
2141
 
2007
2142
  commit 2a10ded8e1502e0db5ec3b2e060f658ee53aafd0
2008
2143
  Author: Naohisa Goto <ng@bioruby.org>
@@ -2951,11 +3086,9 @@ Date: Thu Aug 23 00:20:01 2012 +0900
2951
3086
 
2952
3087
  renamed ChangeLog to doc/ChangeLog-1.4.3
2953
3088
 
2954
- ChangeLog | 1478 ---------------------------------------------------
2955
- doc/ChangeLog-1.4.3 | 1478 +++++++++++++++++++++++++++++++++++++++++++++++++++
2956
- 2 files changed, 1478 insertions(+), 1478 deletions(-)
2957
- delete mode 100644 ChangeLog
2958
- create mode 100644 doc/ChangeLog-1.4.3
3089
+ ChangeLog => doc/ChangeLog-1.4.3 | 0
3090
+ 1 file changed, 0 insertions(+), 0 deletions(-)
3091
+ rename ChangeLog => doc/ChangeLog-1.4.3 (100%)
2959
3092
 
2960
3093
  commit 0c20cb62ba6b253098e7198c14de1829f72474f5
2961
3094
  Author: Naohisa Goto <ng@bioruby.org>
@@ -2982,11 +3115,9 @@ Date: Thu Aug 23 00:12:40 2012 +0900
2982
3115
 
2983
3116
  Renamed RELEASE_NOTES.rdoc to doc/RELEASE_NOTES-1.4.3.rdoc
2984
3117
 
2985
- RELEASE_NOTES.rdoc | 204 -------------------------------------------
2986
- doc/RELEASE_NOTES-1.4.3.rdoc | 204 +++++++++++++++++++++++++++++++++++++++++++
2987
- 2 files changed, 204 insertions(+), 204 deletions(-)
2988
- delete mode 100644 RELEASE_NOTES.rdoc
2989
- create mode 100644 doc/RELEASE_NOTES-1.4.3.rdoc
3118
+ RELEASE_NOTES.rdoc => doc/RELEASE_NOTES-1.4.3.rdoc | 0
3119
+ 1 file changed, 0 insertions(+), 0 deletions(-)
3120
+ rename RELEASE_NOTES.rdoc => doc/RELEASE_NOTES-1.4.3.rdoc (100%)
2990
3121
 
2991
3122
  commit 08bcabecccb271385d38a0f807e8c408def5a128
2992
3123
  Author: Naohisa Goto <ng@bioruby.org>
@@ -1,3 +1,17 @@
1
+ = BioRuby 1.5.2 RELEASE NOTES
2
+
3
+ Few bug fixes have been made to the BioRuby 1.5.2 after the version 1.5.1 is
4
+ released.
5
+
6
+ * Fixed a parser bug in Bio::Fasta::Report, FASTA output (-m 10) parser,
7
+ contributed by William Van Etten and Mark Wilkinson via GitHub.
8
+ * HTTPS is used to access GenomeNet BLAST web service, contributed
9
+ by @ramadis via GitHub.
10
+ * Bio::Shell#seqstat: Fix format specifier syntax error.
11
+ * Bio::AAindex documentation fix, suggested by @kojix2 via GitHub.
12
+ * Suppress warning messages in Ruby 2.4 and later.
13
+
14
+
1
15
  = BioRuby 1.5.1 RELEASE NOTES
2
16
 
3
17
  Few changes have been made to the BioRuby 1.5.1 after the version 1.5.0 is
@@ -3,7 +3,7 @@
3
3
  #
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'bio'
6
- s.version = "1.5.1"
6
+ s.version = "1.5.2"
7
7
 
8
8
  s.author = "BioRuby project"
9
9
  s.email = "staff@bioruby.org"
@@ -102,7 +102,7 @@ module Bio::Blast::Remote
102
102
  dbdescs = {}
103
103
  key = nil
104
104
  host = Bio::Blast::Remote::Genomenet::Host
105
- http = Bio::Command.new_http(host)
105
+ http = Bio::Command.new_https(host)
106
106
  result = http.get('/tools/blast/')
107
107
  #p result.body
108
108
  result.body.each_line do |line|
@@ -211,7 +211,7 @@ module Bio::Blast::Remote
211
211
  end
212
212
 
213
213
  begin
214
- http = Bio::Command.new_http(host)
214
+ http = Bio::Command.new_https(host)
215
215
  http.open_timeout = 300
216
216
  http.read_timeout = 600
217
217
  result = Bio::Command.http_post_form(http, path, form)
@@ -243,10 +243,10 @@ module Bio::Blast::Remote
243
243
  end
244
244
 
245
245
  # workaround 2005.08.12 + 2011.01.27 + 2011.7.22
246
- if /\<A +HREF=\"(http\:\/\/[\-\.a-z0-9]+\.genome\.jp)?(\/tmp\/[^\"]+)\"\>Show all result\<\/A\>/i =~ @output.to_s then
246
+ if /\<A +HREF=\"(https?\:\/\/[\-\.a-z0-9]+\.genome\.jp)?(\/tmp\/[^\"]+)\"\>Show all result\<\/A\>/i =~ @output.to_s then
247
247
  all_prefix = $1
248
248
  all_path = $2
249
- all_prefix = "http://#{Host}" if all_prefix.to_s.empty?
249
+ all_prefix = "https://#{Host}" if all_prefix.to_s.empty?
250
250
  all_uri = all_prefix + all_path
251
251
  @output = Bio::Command.read_uri(all_uri)
252
252
  case all_path
@@ -94,8 +94,9 @@ class Report
94
94
  # header lines - brief list of the hits
95
95
  if list_start = data.index("\nThe best scores are") then
96
96
  data = data[(list_start + 1)..-1]
97
- data.sub!(/(.*)\n\n>>>/m, '')
97
+ data.sub!(/(.*?)\n\n>>>/m, '')
98
98
  @list = $1
99
+ data.sub!(/>>><<<(.*)$/m, '')
99
100
  else
100
101
  if list_start = data.index(/\n!!\s+/) then
101
102
  data = data[list_start..-1]
@@ -791,6 +791,16 @@ module Command
791
791
  end
792
792
  end
793
793
 
794
+ # Same as:
795
+ # h = Bio::Command.new_http(address, port)
796
+ # h.use_ssl = true
797
+ # h
798
+ def new_https(address, port = 443)
799
+ connection = new_http(address, port)
800
+ connection.use_ssl = true
801
+ connection
802
+ end
803
+
794
804
  # Same as:
795
805
  # http = Net::HTTP.new(...); http.post_form(path, params)
796
806
  # and
@@ -7,12 +7,11 @@
7
7
  # Mitsuteru C. Nakao <n@bioruby.org>
8
8
  # License:: The Ruby License
9
9
  #
10
- # $Id:$
11
10
  #
12
11
  # == Description
13
12
  #
14
13
  # Classes for Amino Acid Index Database (AAindex and AAindex2).
15
- # * AAindex Manual: http://www.genome.jp/dbget-bin/show_man?aaindex
14
+ # * AAindex Help: https://www.genome.jp/aaindex/aaindex_help.html
16
15
  #
17
16
  # == Examples
18
17
  #
@@ -40,7 +39,38 @@ require "matrix"
40
39
 
41
40
  module Bio
42
41
 
43
- # Super class for AAindex1 and AAindex2
42
+ # == Description
43
+ #
44
+ # Bio::AAindex is the super class of Bio::AAindex1 and Bio::AAindex2,
45
+ # parser classes for AAindex Amino Acid Index Database.
46
+ # * AAindex Help: https://www.genome.jp/aaindex/aaindex_help.html
47
+ #
48
+ # Except Bio::AAindex.auto, do not use this class directly.
49
+ # Methods of this super class is used from AAindex1 and AAindex2 classes.
50
+ #
51
+ # == Examples
52
+ #
53
+ # # auto-detection of data format
54
+ # aax1 = Bio::AAindex.auto("PRAM900102.aaindex1")
55
+ # aax2 = Bio::AAindex.auto("DAYM780301.aaindex2")
56
+ #
57
+ # # Example of Bio::AAindex1 class
58
+ # aax1 = Bio::AAindex1.new("PRAM900102.aaindex1")
59
+ # aax1.entry_id
60
+ # aax1.index
61
+ #
62
+ # # Example of Bio::AAindex2 class
63
+ # aax2 = Bio::AAindex2.new("DAYM780301.aaindex2")
64
+ # aax2.entry_id
65
+ # aax2.matrix
66
+ # aax2.matrix[2,2]
67
+ # aax2.matrix('R', 'A')
68
+ # aax2['R', 'A']
69
+ #
70
+ # == References
71
+ #
72
+ # * http://www.genome.jp/aaindex/
73
+ #
44
74
  class AAindex < KEGGDB
45
75
 
46
76
  # Delimiter
@@ -136,7 +166,25 @@ module Bio
136
166
  end
137
167
 
138
168
 
139
- # Class for AAindex1 format.
169
+ # == Description
170
+ #
171
+ # Parser class for AAindex1, Amino Acid Index Database.
172
+ # * AAindex Help: https://www.genome.jp/aaindex/aaindex_help.html
173
+ #
174
+ # == Examples
175
+ #
176
+ # # auto-detection of data format by using Bio::AAindex class
177
+ # aax1 = Bio::AAindex.auto("PRAM900102.aaindex1")
178
+ #
179
+ # # parse a file and get contents
180
+ # aax1 = Bio::AAindex1.new("PRAM900102.aaindex1")
181
+ # aax1.entry_id
182
+ # aax1.index
183
+ #
184
+ # == References
185
+ #
186
+ # * http://www.genome.jp/aaindex/
187
+ #
140
188
  class AAindex1 < AAindex
141
189
 
142
190
  def initialize(entry)
@@ -211,7 +259,28 @@ module Bio
211
259
  end
212
260
 
213
261
 
214
- # Class for AAindex2 format.
262
+ # == Description
263
+ #
264
+ # Parser class for AAindex2, Amino Acid Index Database.
265
+ # * AAindex Help: https://www.genome.jp/aaindex/aaindex_help.html
266
+ #
267
+ # == Examples
268
+ #
269
+ # # auto-detection of data format by using Bio::AAindex class
270
+ # aax2 = Bio::AAindex.auto("DAYM780301.aaindex2")
271
+ #
272
+ # # parse a file and get contents
273
+ # aax2 = Bio::AAindex2.new("DAYM780301.aaindex2")
274
+ # aax2.entry_id
275
+ # aax2.matrix
276
+ # aax2.matrix[2,2]
277
+ # aax2.matrix('R', 'A')
278
+ # aax2['R', 'A']
279
+ #
280
+ # == References
281
+ #
282
+ # * http://www.genome.jp/aaindex/
283
+ #
215
284
  class AAindex2 < AAindex
216
285
 
217
286
  def initialize(entry)
@@ -217,13 +217,13 @@ class SOFT
217
217
  end
218
218
 
219
219
  def [](x)
220
- if x.kind_of?( Fixnum )
220
+ if x.kind_of?( Integer )
221
221
  super(x)
222
222
  else
223
223
  begin
224
224
  x = x.to_s.downcase.to_sym
225
225
  z = @header_object.column_index[x]
226
- unless z.kind_of?( Fixnum )
226
+ unless z.kind_of?( Integer )
227
227
  raise IndexError, "#{x.inspect} is not a valid index. Contents of @header_object.column_index: #{@header_object.column_index.inspect}"
228
228
  end
229
229
  self[ z ]
@@ -547,6 +547,11 @@ module Bio
547
547
  #BottomRule.is_prior_to(debug_last)
548
548
  #fastaformat.is_prior_to(debug_last)
549
549
 
550
+ ## for suppressing warnings
551
+ p medline, aaindex, litdb, fantom, clustal,
552
+ gcg_msf, gcg_seq, blastxml, rpsblast, blat,
553
+ spidey, hmmer, sim4 if false
554
+
550
555
  a.rehash
551
556
  return a
552
557
  end
@@ -90,7 +90,7 @@ module Bio
90
90
  # class MyMapThing
91
91
  # include Bio::Map::ActsLikeMap
92
92
  #
93
- # def initialize (name)
93
+ # def initialize(name)
94
94
  # @name = name
95
95
  # @mappings_as_maps = Array.new
96
96
  # end
@@ -177,7 +177,7 @@ module Bio
177
177
  # class MyMarkerThing
178
178
  # include Bio::Map::ActsLikeMarker
179
179
  #
180
- # def initialize (name)
180
+ # def initialize(name)
181
181
  # @name = name
182
182
  # @mappings_as_marker = Array.new
183
183
  # end
@@ -301,7 +301,7 @@ module Bio
301
301
  # * _map_: a Bio::Map::SimpleMap object
302
302
  # * _marker_: a Bio::Map::Marker object
303
303
  # * _location_: a Bio::Locations object
304
- def initialize (map, marker, location = nil)
304
+ def initialize(map, marker, location = nil)
305
305
  @map, @marker, @location = map, marker, location
306
306
  end
307
307
  attr_accessor :map, :marker, :location
@@ -350,7 +350,7 @@ module Bio
350
350
  # * type: type of the map (e.g. linkage, radiation_hybrid, cytogenetic, ...)
351
351
  # * units: unit of the map (e.g. cM, cR, ...)
352
352
  # *Returns*:: new Bio::Map::SimpleMap object
353
- def initialize (name = nil, type = nil, length = nil, units = nil)
353
+ def initialize(name = nil, type = nil, length = nil, units = nil)
354
354
  @name, @type, @length, @units = name, type, length, units
355
355
  @mappings_as_map = Array.new
356
356
  end
@@ -82,7 +82,7 @@ module Bio::Shell
82
82
  rep << "Codon usage :\n"
83
83
  hash = Hash.new("0.0%")
84
84
  seq.codon_usage.sort.each do |codon, num|
85
- percent = format("%.1f%", 100.0 * num / (seq.length / 3))
85
+ percent = format("%.1f%%", 100.0 * num / (seq.length / 3))
86
86
  hash[codon] = percent
87
87
  end
88
88
  rep << codontable(1, hash).output
@@ -151,7 +151,7 @@ class CalculatedCuts
151
151
  def remove_incomplete_cuts(size=nil)
152
152
  @strands_for_display_current = false
153
153
  @size = size if size
154
- raise IndexError, "Size of the strand must be provided here or during initalization." if !@size.kind_of?(Fixnum) and not @circular
154
+ raise IndexError, "Size of the strand must be provided here or during initalization." if !@size.kind_of?(Integer) and not @circular
155
155
 
156
156
  vcuts = @vc_primary + @vc_complement
157
157
  hcuts = @hc_between_strands
@@ -278,6 +278,8 @@ module Bio
278
278
 
279
279
  # human readable report
280
280
  def report
281
+ # raise NomethodError for compatibility
282
+ raise NoMethodError if !defined?(@top_strand) || !@top_strand
281
283
  report = "### shRNA\n"
282
284
  report << "Top strand shRNA (#{@top_strand.length} nt):\n"
283
285
  report << " 5'-#{@top_strand.upcase}-3'\n"
@@ -10,7 +10,7 @@
10
10
  module Bio
11
11
 
12
12
  # BioRuby version (Array containing Integer)
13
- BIORUBY_VERSION = [1, 5, 1].extend(Comparable).freeze
13
+ BIORUBY_VERSION = [1, 5, 2].extend(Comparable).freeze
14
14
 
15
15
  # Extra version specifier (String or nil).
16
16
  # Existance of the value indicates development version.
@@ -628,9 +628,9 @@ module Bio
628
628
 
629
629
  def test_seqclass_when_seqclass_set
630
630
  alignment = Alignment.new
631
- alignment.seqclass = Fixnum
631
+ alignment.seqclass = Integer
632
632
  alignment << "this doesn't really make sense"
633
- assert_equal(Fixnum, alignment.seqclass)
633
+ assert_equal(Integer, alignment.seqclass)
634
634
  end
635
635
 
636
636
  # Alignment#gap_char
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bio
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - BioRuby project
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-07 00:00:00.000000000 Z
11
+ date: 2018-09-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: BioRuby is a library for bioinformatics (biology + information science).
14
14
  email: staff@bioruby.org
@@ -674,7 +674,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
674
674
  version: '0'
675
675
  requirements: []
676
676
  rubyforge_project:
677
- rubygems_version: 2.2.2
677
+ rubygems_version: 2.5.2.1
678
678
  signing_key:
679
679
  specification_version: 4
680
680
  summary: Bioinformatics library