bio 1.4.2 → 1.4.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. data/.travis.yml +66 -0
  2. data/ChangeLog +989 -4524
  3. data/KNOWN_ISSUES.rdoc +67 -2
  4. data/README.rdoc +89 -23
  5. data/README_DEV.rdoc +93 -2
  6. data/RELEASE_NOTES.rdoc +167 -95
  7. data/Rakefile +199 -7
  8. data/bioruby.gemspec +27 -12
  9. data/bioruby.gemspec.erb +6 -3
  10. data/doc/ChangeLog-before-1.4.2 +5013 -0
  11. data/doc/RELEASE_NOTES-1.4.2.rdoc +132 -0
  12. data/doc/Tutorial.rd +21 -3
  13. data/doc/Tutorial.rd.html +20 -12
  14. data/etc/bioinformatics/seqdatabase.ini +13 -196
  15. data/gemfiles/Gemfile.travis-jruby1.8 +7 -0
  16. data/gemfiles/Gemfile.travis-jruby1.9 +10 -0
  17. data/gemfiles/Gemfile.travis-ruby1.8 +7 -0
  18. data/gemfiles/Gemfile.travis-ruby1.9 +10 -0
  19. data/gemfiles/modify-Gemfile.rb +28 -0
  20. data/gemfiles/prepare-gemspec.rb +25 -0
  21. data/lib/bio/alignment.rb +1 -1
  22. data/lib/bio/appl/bl2seq/report.rb +3 -3
  23. data/lib/bio/appl/blast/ddbj.rb +0 -3
  24. data/lib/bio/appl/blast/format0.rb +4 -22
  25. data/lib/bio/appl/blast/genomenet.rb +33 -16
  26. data/lib/bio/appl/blast/ncbioptions.rb +8 -3
  27. data/lib/bio/appl/blast/remote.rb +6 -5
  28. data/lib/bio/appl/blast/report.rb +10 -6
  29. data/lib/bio/appl/blast/rpsblast.rb +3 -2
  30. data/lib/bio/appl/blast/wublast.rb +3 -3
  31. data/lib/bio/command.rb +118 -36
  32. data/lib/bio/data/na.rb +1 -1
  33. data/lib/bio/db/embl/embl.rb +74 -0
  34. data/lib/bio/db/embl/format_embl.rb +0 -4
  35. data/lib/bio/db/fasta.rb +57 -45
  36. data/lib/bio/db/fasta/defline.rb +1 -1
  37. data/lib/bio/db/fasta/format_fasta.rb +0 -4
  38. data/lib/bio/db/fasta/format_qual.rb +0 -5
  39. data/lib/bio/db/fastq/format_fastq.rb +0 -1
  40. data/lib/bio/db/genbank/format_genbank.rb +0 -4
  41. data/lib/bio/db/gff.rb +41 -12
  42. data/lib/bio/db/kegg/genes.rb +3 -3
  43. data/lib/bio/db/kegg/kgml.rb +465 -64
  44. data/lib/bio/db/newick.rb +0 -244
  45. data/lib/bio/db/pdb.rb +1 -4
  46. data/lib/bio/db/pdb/atom.rb +3 -2
  47. data/lib/bio/db/pdb/chain.rb +2 -3
  48. data/lib/bio/db/pdb/chemicalcomponent.rb +3 -2
  49. data/lib/bio/db/pdb/model.rb +2 -2
  50. data/lib/bio/db/pdb/pdb.rb +2 -1
  51. data/lib/bio/db/pdb/residue.rb +2 -2
  52. data/lib/bio/db/pdb/utils.rb +7 -4
  53. data/lib/bio/db/phyloxml/phyloxml_parser.rb +52 -5
  54. data/lib/bio/feature.rb +2 -3
  55. data/lib/bio/io/flatfile/autodetection.rb +1 -1
  56. data/lib/bio/io/flatfile/buffer.rb +84 -0
  57. data/lib/bio/sequence.rb +6 -4
  58. data/lib/bio/sequence/aa.rb +3 -5
  59. data/lib/bio/sequence/adapter.rb +6 -6
  60. data/lib/bio/sequence/common.rb +3 -3
  61. data/lib/bio/sequence/compat.rb +2 -7
  62. data/lib/bio/sequence/dblink.rb +6 -5
  63. data/lib/bio/sequence/format.rb +0 -6
  64. data/lib/bio/sequence/format_raw.rb +0 -4
  65. data/lib/bio/sequence/generic.rb +3 -4
  66. data/lib/bio/sequence/na.rb +4 -6
  67. data/lib/bio/sequence/quality_score.rb +2 -0
  68. data/lib/bio/sequence/sequence_masker.rb +3 -0
  69. data/lib/bio/shell/core.rb +1 -0
  70. data/lib/bio/tree.rb +1 -2
  71. data/lib/bio/tree/output.rb +264 -0
  72. data/lib/bio/util/restriction_enzyme.rb +1 -3
  73. data/lib/bio/util/restriction_enzyme/analysis.rb +8 -5
  74. data/lib/bio/util/restriction_enzyme/analysis_basic.rb +4 -3
  75. data/lib/bio/util/restriction_enzyme/cut_symbol.rb +3 -2
  76. data/lib/bio/util/restriction_enzyme/dense_int_array.rb +3 -0
  77. data/lib/bio/util/restriction_enzyme/double_stranded.rb +3 -4
  78. data/lib/bio/util/restriction_enzyme/double_stranded/aligned_strands.rb +3 -4
  79. data/lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair.rb +3 -4
  80. data/lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb +3 -4
  81. data/lib/bio/util/restriction_enzyme/double_stranded/cut_locations.rb +3 -4
  82. data/lib/bio/util/restriction_enzyme/double_stranded/cut_locations_in_enzyme_notation.rb +3 -4
  83. data/lib/bio/util/restriction_enzyme/range/cut_range.rb +3 -4
  84. data/lib/bio/util/restriction_enzyme/range/cut_ranges.rb +3 -4
  85. data/lib/bio/util/restriction_enzyme/range/horizontal_cut_range.rb +3 -4
  86. data/lib/bio/util/restriction_enzyme/range/sequence_range.rb +3 -4
  87. data/lib/bio/util/restriction_enzyme/range/sequence_range/calculated_cuts.rb +3 -4
  88. data/lib/bio/util/restriction_enzyme/range/sequence_range/fragment.rb +3 -4
  89. data/lib/bio/util/restriction_enzyme/range/sequence_range/fragments.rb +3 -4
  90. data/lib/bio/util/restriction_enzyme/range/vertical_cut_range.rb +3 -4
  91. data/lib/bio/util/restriction_enzyme/single_strand.rb +3 -3
  92. data/lib/bio/util/restriction_enzyme/single_strand/cut_locations_in_enzyme_notation.rb +3 -4
  93. data/lib/bio/util/restriction_enzyme/single_strand_complement.rb +3 -4
  94. data/lib/bio/util/restriction_enzyme/sorted_num_array.rb +3 -0
  95. data/lib/bio/util/restriction_enzyme/string_formatting.rb +3 -4
  96. data/lib/bio/version.rb +11 -2
  97. data/sample/seqdatabase.ini +210 -0
  98. data/test/bioruby_test_helper.rb +37 -12
  99. data/test/data/KEGG/test.kgml +37 -0
  100. data/test/data/command/echoarg2.bat +0 -0
  101. data/test/data/command/echoarg2.sh +4 -0
  102. data/test/functional/bio/test_command.rb +58 -28
  103. data/test/{functional → network}/bio/appl/blast/test_remote.rb +0 -0
  104. data/test/{functional → network}/bio/appl/test_blast.rb +0 -0
  105. data/test/{functional → network}/bio/appl/test_pts1.rb +0 -0
  106. data/test/{functional → network}/bio/io/test_ddbjrest.rb +0 -0
  107. data/test/{functional → network}/bio/io/test_ensembl.rb +0 -0
  108. data/test/{functional → network}/bio/io/test_pubmed.rb +0 -0
  109. data/test/{functional → network}/bio/io/test_soapwsdl.rb +0 -0
  110. data/test/{functional → network}/bio/io/test_togows.rb +0 -0
  111. data/test/network/bio/test_command.rb +35 -0
  112. data/test/runner.rb +16 -6
  113. data/test/unit/bio/appl/blast/test_report.rb +119 -0
  114. data/test/unit/bio/appl/blast/test_rpsblast.rb +1 -0
  115. data/test/unit/bio/data/test_na.rb +1 -1
  116. data/test/unit/bio/db/embl/test_embl.rb +2 -7
  117. data/test/unit/bio/db/embl/test_embl_rel89.rb +2 -7
  118. data/test/unit/bio/db/fasta/test_defline.rb +1 -1
  119. data/test/unit/bio/db/genbank/test_genpept.rb +1 -1
  120. data/test/unit/bio/db/kegg/test_drug.rb +1 -1
  121. data/test/unit/bio/db/kegg/test_genome.rb +1 -1
  122. data/test/unit/bio/db/kegg/test_glycan.rb +1 -1
  123. data/test/unit/bio/db/kegg/test_kgml.rb +1022 -0
  124. data/test/unit/bio/db/sanger_chromatogram/test_abif.rb +2 -1
  125. data/test/unit/bio/db/sanger_chromatogram/test_scf.rb +4 -2
  126. data/test/unit/bio/db/test_newick.rb +2 -0
  127. data/test/unit/bio/db/test_phyloxml.rb +54 -2
  128. data/test/unit/bio/db/test_phyloxml_writer.rb +15 -9
  129. data/test/unit/bio/db/test_soft.rb +1 -1
  130. data/test/unit/bio/io/flatfile/test_autodetection.rb +6 -0
  131. data/test/unit/bio/io/flatfile/test_buffer.rb +141 -0
  132. data/test/unit/bio/sequence/test_common.rb +36 -4
  133. data/test/unit/bio/sequence/test_na.rb +1 -1
  134. data/test/unit/bio/test_command.rb +9 -4
  135. data/test/unit/bio/test_sequence.rb +2 -2
  136. data/test/unit/bio/test_tree.rb +11 -11
  137. data/test/unit/bio/util/test_restriction_enzyme.rb +1 -1
  138. metadata +1428 -655
  139. data/rdoc.zsh +0 -8
@@ -1,5 +1,5 @@
1
1
  = KNOWN_ISSUES.rdoc - Known issues and bugs in BioRuby
2
- Copyright:: Copyright (C) 2009 Naohisa Goto <ng@bioruby.org>
2
+ Copyright:: Copyright (C) 2009-2012 Naohisa Goto <ng@bioruby.org>
3
3
  License:: The Ruby License
4
4
 
5
5
  = Known issues and bugs in BioRuby
@@ -15,7 +15,7 @@ they are not BioRuby's issues and/or it is very difficult to fix them.
15
15
  === Ruby 1.9.1 or later
16
16
 
17
17
  Some classes/modules/methods still may not work or may return incorrect
18
- results in Ruby 1.9.1, especially those not covered by the unit tests.
18
+ results in Ruby 1.9.X, especially those not covered by the unit tests.
19
19
 
20
20
  ==== String encodings
21
21
 
@@ -66,6 +66,48 @@ deprecated in RubyGems 0.9.0 and removed in RubyGems 1.0.1.
66
66
  require 'rubygems'
67
67
  require_gem 'bio'
68
68
 
69
+ === JRuby
70
+
71
+ On JRuby, errors may be raised due to the following unfixed bugs in JRuby.
72
+
73
+ * {JRUBY-6195}[http://jira.codehaus.org/browse/JRUBY-6195] Process.spawn
74
+ (and related methods) ignore option hash
75
+ * {JRUBY-6818}[http://jira.codehaus.org/browse/JRUBY-6818] Kernel.exec,
76
+ Process.spawn (and IO.popen etc.) raise error when program is an array
77
+ containing two strings
78
+
79
+ (WONT_FIX) With older version of JRuby, you may be bothered by the following
80
+ bugs that have already been fixed in the head of JRuby.
81
+
82
+ * {JRUBY-6658}[http://jira.codehaus.org/browse/JRUBY-6658] Problem when
83
+ setting up an autoload entry, defining a class via require, then redefining
84
+ the autoload entry
85
+ * {JRUBY-6666}[http://jira.codehaus.org/browse/JRUBY-6666] Open3.popen3
86
+ failing due to missing handling for [path, argv[0]] array
87
+ * {JRUBY-6819}[http://jira.codehaus.org/browse/JRUBY-6819]
88
+ java.lang.ArrayIndexOutOfBoundsException in String#each_line
89
+
90
+ (WONT_FIX) Due to JRUBY-5678 (resolved issue) and the difference of behavior
91
+ between CRuby and JRuby written in the comments of the issue tracking page,
92
+ when running BioRuby on JRuby with sudo or root rights, TMPDIR environment
93
+ variable should be set to a directory that is not world-writable. Currently,
94
+ the workaround is needed for running BioRuby tests with JRuby on Travis-CI.
95
+
96
+ * {JRUBY-5678}[http://jira.codehaus.org/browse/JRUBY-5678] tmpdir cannot
97
+ be delete when jruby has sudo/root rights
98
+
99
+ === Rubinius
100
+
101
+ According to Travis-CI, unit tests have failed on 1.9 mode of Rubinius.
102
+
103
+ (WONT_FIX) With older version of Rubinius, you may be bothered by the
104
+ following bugs that have already been fixed in the head of Rubinius.
105
+
106
+ * {Rubinius Issue #1693}[https://github.com/rubinius/rubinius/issues/1693]
107
+ String#split gives incorrect output when splitting by /^/
108
+ * {Rubinius Issue #1724}[https://github.com/rubinius/rubinius/issues/1724]
109
+ Creating Struct class with length attribute
110
+
69
111
  == 2. OS and/or architecture-dependent issues
70
112
 
71
113
  === Microsoft Windows
@@ -104,6 +146,14 @@ Windows 95/98/98SE/ME because of the limitation of COMMAND.COM.
104
146
 
105
147
  == 3. Known issues and bugs in BioRuby
106
148
 
149
+ === DDBJ Web API related classes (Bio::DDBJ::*, Bio::BLAST::Remote::DDBJ)
150
+
151
+ The DDBJ Web API is stopping after their system replacement in March 2012.
152
+ (See the announcement though it is written only in Japanese:
153
+ http://www.ddbj.nig.ac.jp/replace/rp120601-j.html)
154
+ Due to the stop of the DDBJ Web API, Bio::DDBJ::* and Bio::BLAST::Remote::DDBJ
155
+ which are using the web API can not be used.
156
+
107
157
  === Bio::Ensembl
108
158
 
109
159
  Due to the renewal of Ensembl web site, Bio::Ensembl does not work for
@@ -135,6 +185,15 @@ because of the growth of the data size.
135
185
  Bio::SPTR should be updated to follow UniProtKB format changes described
136
186
  in http://www.uniprot.org/docs/sp_news.htm .
137
187
 
188
+ === http://bioruby.org/cgi-bin/biofetch.rb and Bio::Fetch.query
189
+
190
+ BioRuby's default BioFetch server http://bioruby.org/cgi-bin/biofetch.rb is
191
+ down for years. Please use other server, such as EBI Dbfetch
192
+ (http://www.ebi.ac.uk/Tools/dbfetch/dbfetch).
193
+
194
+ Due to the stop of the http://bioruby.org/cgi-bin/biofetch.rb service,
195
+ Bio::Fetch.query always raises error.
196
+
138
197
  == 4. Compatibility issues with other libraries/extensions
139
198
 
140
199
  === ActiveRecord
@@ -147,6 +206,12 @@ know which version is suitable.
147
206
  BioRuby Shell on Web uses Ruby on Rails, but the author of the document does
148
207
  not know which version is suitable.
149
208
 
209
+ ==== SOAP4R with Ruby 1.9
210
+
211
+ soap4r-ruby1.9 may raise "ununitialized constant XML::SaxParser" error with
212
+ some combinations of XML parser libraries. It seems this is a bug of
213
+ soap4r-ruby1.9.
214
+
150
215
  == 5. Historical descriptions
151
216
 
152
217
  === CVS
@@ -2,6 +2,7 @@
2
2
  = README.rdoc - README for BioRuby
3
3
  Copyright:: Copyright (C) 2001-2007 Toshiaki Katayama <k@bioruby.org>,
4
4
  Copyright (C) 2008 Jan Aerts <jandot@bioruby.org>
5
+ Copyright (C) 2011-2012 Naohisa Goto <ng@bioruby.org>
5
6
  License:: The Ruby License
6
7
  * The above statement is limited to this file. See below about BioRuby's
7
8
  copyright and license.
@@ -9,7 +10,7 @@ License:: The Ruby License
9
10
 
10
11
  = BioRuby
11
12
 
12
- Copyright (C) 2001-2011 Toshiaki Katayama <k@bioruby.org>
13
+ Copyright (C) 2001-2012 Toshiaki Katayama <k@bioruby.org>
13
14
 
14
15
  BioRuby is an open source Ruby library for developing bioinformatics
15
16
  software. Object oriented scripting language Ruby has many features
@@ -35,13 +36,16 @@ services including KEGG API can be easily utilized by BioRuby.
35
36
 
36
37
  == FOR MORE INFORMATION
37
38
 
39
+ See RELEASE_NOTES.rdoc for news and important changes in this version.
40
+
38
41
  === Documents in this distribution
39
42
 
40
- ==== General information
43
+ ==== Release notes, important changes and issues
41
44
 
42
45
  README.rdoc:: This file. General information and installation procedure.
43
46
  RELEASE_NOTES.rdoc:: News and important changes in this release.
44
47
  KNOWN_ISSUES.rdoc:: Known issues and bugs in BioRuby.
48
+ doc/RELEASE_NOTES-1.4.2.rdoc:: News and incompatible changes from 1.4.1 to 1.4.2.
45
49
  doc/RELEASE_NOTES-1.4.1.rdoc:: News and incompatible changes from 1.4.0 to 1.4.1.
46
50
  doc/RELEASE_NOTES-1.4.0.rdoc:: News and incompatible changes from 1.3.1 to 1.4.0.
47
51
  doc/Changes-1.3.rdoc:: News and incompatible changes from 1.2.1 to 1.3.0.
@@ -56,6 +60,7 @@ doc/KEGG_API.rd:: Documents about KEGG API, including usage of Bio::KEGG::API.
56
60
  ==== BioRuby development
57
61
 
58
62
  ChangeLog:: History of changes.
63
+ doc/ChangeLog-before-1.4.2:: changes before 1.4.2.
59
64
  doc/ChangeLog-before-1.3.1:: changes before 1.3.1.
60
65
  README_DEV.rdoc:: Describes ways to contribute to the BioRuby project, including coding styles and documentation guidelines.
61
66
 
@@ -65,6 +70,9 @@ doc/Tutorial.rd.ja:: BioRuby Tutorial written in Japanese.
65
70
  doc/Tutorial.rd.ja.html:: HTML version of Tutorial.rd.ja.
66
71
  doc/KEGG_API.rd.ja:: Japanese translation of KEGG_API.rd.
67
72
 
73
+ ==== Sample codes
74
+
75
+ In sample/, There are many sample codes and demo scripts.
68
76
 
69
77
  === WWW
70
78
 
@@ -107,38 +115,54 @@ and can be obtained by the following procedure:
107
115
  == REQUIREMENTS
108
116
 
109
117
  * Ruby 1.8.6 or later (except Ruby 1.9.0) -- http://www.ruby-lang.org/
110
- * Ruby 1.8.7-p352 or later is recommended.
111
- * Not yet fully ready with Ruby 1.9, although many components can now work
112
- in Ruby 1.9.1 and Ruby 1.9.2.
118
+ * Ruby 1.9.3-p194 or later, or Ruby 1.8.7-p358 or later is recommended.
119
+ * See KNOWN_ISSUES.rdoc for Ruby version specific problems.
113
120
 
114
121
 
115
122
  == OPTIONAL REQUIREMENTS
116
123
 
117
124
  Some optional libraries can be utilized to extend BioRuby's functionality.
118
- If your needs meets the following conditions, install them from the "Ruby
119
- Application Archive" at http://raa.ruby-lang.org/, RubyForge at
120
- http://rubyforge.org/, or the following web sites.
125
+ If your needs meets the following conditions, install them by using RubyGems,
126
+ or download and install from the "Ruby Application Archive" (RAA) at
127
+ http://raa.ruby-lang.org/, RubyForge at http://rubyforge.org/, GitHub at
128
+ http://github.com/, or the following web sites.
121
129
 
122
130
  For faster parsing of the BLAST XML output format:
123
131
 
124
132
  * {RAA:xmlparser}[http://raa.ruby-lang.org/project/xmlparser/]
133
+ * For Ruby 1.8: {gem install xmlparser}[http://rubygems.org/gems/xmlparser]
134
+ * For Ruby 1.9: http://www.yoshidam.net/Ruby.html#xmlparser
135
+ * In both cases, {The Expat XML Parser}[http://expat.sourceforge.net/]
136
+ and C compiler will be required.
125
137
 
126
138
  Creating faster flatfile index using Berkley DB:
127
139
 
128
- * {RAA:bdb}[http://raa.ruby-lang.org/project/bdb/]
129
-
140
+ * {GitHub:ruby-bdb}[https://github.com/knu/ruby-bdb]
141
+ (which took over {RAA:bdb}[http://raa.ruby-lang.org/project/bdb/])
142
+ (No RubyGems available)
143
+ * {Oracle Berkeley DB}[http://www.oracle.com/technetwork/database/berkeleydb/index.html] and C compiler will be required.
144
+
130
145
  Accessing BioSQL database created by other Open Bio* libraries:
131
146
 
132
- * {RubyForge:ActiveRecord}[http://rubyforge.org/projects/activerecord/]
133
- and at least one driver (or adapter) from
134
- {RubyForge:MySQL/Ruby}[http://rubyforge.org/projects/mysql-ruby/],
135
- {RubyForge:postgres-pr}[http://rubyforge.org/projects/postgres-pr], or
136
- {RubyForge:ActiveRecord Oracle enhanced adapter}[http://rubyforge.org/projects/oracle-enhanced/].
147
+ * {gem install activerecord}[http://rubygems.org/gems/activerecord]
148
+ and at least one driver (or adapter):
149
+ * {gem install mysql}[http://rubygems.org/gems/mysql] or
150
+ {gem install mysql2}[http://rubygems.org/gems/mysql2]
151
+ * {gem install pg}[http://rubygems.org/gems/pg]
152
+ * {gem install sqlite-ruby}[http://rubygems.org/gems/sqlite-ruby] or
153
+ {gem install sqlite3}[http://rubygems.org/gems/sqlite3]
154
+ * {gem install activerecord-oracle_enhanced-adapter}[http://rubygems.org/gems/activerecord-oracle_enhanced-adapter]
137
155
 
138
156
  For parsing PhyloXML format files:
139
157
 
140
- * {RubyForge:libxml-ruby}[http://libxml.rubyforge.org/] (Ruby language
141
- bindings for the {GNOME Libxml2 XML toolkit}[http://xmlsoft.org/])
158
+ * {gem install libxml-ruby}[http://rubygems.org/gems/libxml-ruby]
159
+ * {GNOME Libxml2 XML toolkit}[http://xmlsoft.org/] and C compiler will be
160
+ required.
161
+
162
+ (Only for Ruby 1.9.x) For using SOAP web services e.g. KEGG API:
163
+
164
+ * {gem install soap4r-ruby1.9}[https://rubygems.org/gems/soap4r-ruby1.9]
165
+ * For Ruby 1.8.x, SOAP4R is bundled within the Ruby 1.8.x release.
142
166
 
143
167
 
144
168
  == INSTALL
@@ -147,7 +171,7 @@ For parsing PhyloXML format files:
147
171
 
148
172
  If you are using RubyGems, just type
149
173
 
150
- % gems install bio
174
+ % gem install bio
151
175
 
152
176
  Alternatively, manually download bio-X.X.X.gem from
153
177
  http://rubyforge.org/projects/bioruby/ and install it by using gems command.
@@ -180,17 +204,46 @@ The options "config", "setup", and "install" are still available.
180
204
  % su
181
205
  # ruby setup.rb install
182
206
 
183
- You can run tests by
184
-
185
- % ruby setup.rb test
186
-
187
- and run
207
+ You can run
188
208
 
189
209
  % ruby setup.rb --help
190
210
 
191
211
  for more details.
192
212
 
193
213
 
214
+ === Running self-test
215
+
216
+ To check if bioruby works fine on a machine, self-test codes are bundled.
217
+ Note that some tests may need internet connection.
218
+
219
+ To run tests,
220
+
221
+ % ruby test/runner.rb
222
+
223
+ If you are using Ruby 1.8.x and you want to use components installed by using
224
+ RubyGems, explicit loading of RubyGems may be needed.
225
+
226
+ % ruby -rubygems test/runner.rb
227
+
228
+ Alternatively, testrb, the test runner command of ruby, can be used.
229
+
230
+ % testrb test/
231
+
232
+ With testrb, you can select tests to run, for example,
233
+
234
+ % testrb test/unit
235
+
236
+ For those familiar with Rake,
237
+
238
+ % rake test
239
+
240
+ also works.
241
+
242
+ Before reporting test failure, please check KNOWN_ISSUES.rdoc about known
243
+ platform-dependent issues. We are happy if you write patches to solve the
244
+ issues.
245
+
246
+
194
247
  == SETUP
195
248
 
196
249
  If you want to use the OBDA (Open Bio Database Access) to obtain database
@@ -255,6 +308,19 @@ under different license. For example, setup.rb which comes from
255
308
  (http://i.loveruby.net/en/projects/setup/) is licensed under LGPL 2.1.
256
309
 
257
310
 
311
+ == REFERENCE
312
+
313
+ If you use BioRuby in academic research, please consider citing the following
314
+ publication.
315
+
316
+ * BioRuby: Bioinformatics software for the Ruby programming language.
317
+ Naohisa Goto, Pjotr Prins, Mitsuteru Nakao, Raoul Bonnal, Jan Aerts and
318
+ Toshiaki Katayama.
319
+ Bioinformatics (2010) 26(20): 2617-2619.
320
+ * {doi: 10.1093/bioinformatics/btq475}[http://bioinformatics.oxfordjournals.org/content/26/20/2617]
321
+ * {PMID: 20739307}[http://www.ncbi.nlm.nih.gov/pubmed/20739307]
322
+
323
+
258
324
  == CONTACT
259
325
 
260
326
  Current staff of the BioRuby project can be reached by sending e-mail
@@ -2,6 +2,7 @@
2
2
 
3
3
  Copyright:: Copyright (C) 2005, 2006 Toshiaki Katayama <k@bioruby.org>
4
4
  Copyright:: Copyright (C) 2006, 2008 Jan Aerts <jandot@bioruby.org>
5
+ Copyright:: Copyright (C) 2011 Naohisa Goto <ng@bioruby.org>
5
6
 
6
7
  = HOW TO CONTRIBUTE TO THE BIORUBY PROJECT?
7
8
 
@@ -13,8 +14,9 @@ such as:
13
14
  * Add and correct documentation
14
15
  * Develop code for new features, etc.
15
16
 
16
- All of these are welcome! However, this document describes the last option,
17
- how to contribute your code to the BioRuby distribution.
17
+ All of these are welcome! This document mainly focuses on the last option,
18
+ how to contribute your code to the BioRuby distribution. This may also be
19
+ helpful when you send large patches for existing codes.
18
20
 
19
21
  We would like to include your contribution as long as the scope of
20
22
  your module meets the field of bioinformatics.
@@ -25,6 +27,46 @@ Bioruby is now under git source control at http://github.com/bioruby/bioruby.
25
27
  There are two basic ways to contribute: with patches or pull requests. Both are
26
28
  explained on the bioruby wiki at http://bioruby.open-bio.org/wiki.
27
29
 
30
+ === Preparation before sending patches or pull requests
31
+
32
+ Before sending patches or pull requests, rewriting history and reordering or
33
+ selecting patches are recommended. See "Creating the perfect patch series"
34
+ in the Git User's Manual.
35
+ http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#patch-series
36
+
37
+ === Sending your contribution
38
+
39
+ ==== With patches
40
+
41
+ You can send patches with git-format-patch. For a smaller change, unified
42
+ diff (diff -u) without using git can also be accepted.
43
+
44
+ ==== With pull requests
45
+
46
+ We are happy if your commits can be pulled with fast-forward. For the purpose,
47
+ using git-rebase before sending pull request is recommended. See "Keeping a
48
+ patch series up to date using git rebase" in the Git User's Manual.
49
+ http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#using-git-rebase
50
+
51
+ === Notes for the treatment of contributions in the blessed repository
52
+
53
+ ==== Merging policy
54
+
55
+ We do not always merge your commits as is. We may edit, rewrite, reorder,
56
+ select, and/or mix your commits before and/or after merging to the blessed
57
+ repository.
58
+
59
+ ==== Git commit management policy
60
+
61
+ We want to keep the commit history linear as far as possible, because it is
62
+ easy to find problems and regressions in commits. See "Why bisecting merge
63
+ commits can be harder than bisecting linear history" in the Git User's Manual.
64
+ http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#bisect-merges
65
+
66
+ Note that the above policy is only for the main 'blessed' repository, and it
67
+ does not aim to restrict each user's fork.
68
+
69
+
28
70
  = LICENSE
29
71
 
30
72
  If you would like your module to be included in the BioRuby distribution,
@@ -50,6 +92,11 @@ You will need to follow the typical coding styles of the BioRuby modules:
50
92
  * Use 2 spaces for indentation.
51
93
  * Don't replace spaces to tabs.
52
94
 
95
+ == Parenthesis in the method definition line should be written
96
+
97
+ * Good: <tt>def example(str, ary)</tt>
98
+ * Discouraged: <tt>def example str, ary</tt>
99
+
53
100
  == Comments
54
101
 
55
102
  Don't use <tt>=begin</tt> and <tt>=end</tt> blocks for comments. If you need to
@@ -202,6 +249,24 @@ format of this information is as follows:
202
249
 
203
250
  Attribute accessors can be preceded by a short description.
204
251
 
252
+ # P-value (Float)
253
+ attr_reader :pvalue
254
+
255
+ For writing rdoc documentation, putting two or more attributes in a line
256
+ (such as <tt>attr_reader :evalue, :pvalue</tt>) is strongly discouraged.
257
+
258
+ Methods looks like attributes can also be preceded by a short description.
259
+
260
+ # Scientific name (String)
261
+ def scientific_name
262
+ #...
263
+ end
264
+
265
+ # Scientific name (String)
266
+ def scientific_name=(str)
267
+ #...
268
+ end
269
+
205
270
  == Exception handling
206
271
 
207
272
  Don't use
@@ -211,6 +276,12 @@ Don't use
211
276
  in your code. Instead, try to avoid printing error messages. For fatal errors,
212
277
  use +raise+ with an appropriate message.
213
278
 
279
+ Kernel#warn can only be used to notice incompatible changes to programmers.
280
+ Typically it may be used for deprecated or obsolete usage of a method.
281
+ For example,
282
+
283
+ warn "The Foo#bar method is obsoleted. Use Foo#baz instead."
284
+
214
285
  == Testing code should use 'test/unit'
215
286
 
216
287
  Unit tests should come with your modules by which you can assure what
@@ -283,3 +354,23 @@ a new module or making changes on existing modules.
283
354
  Finally, please maintain the code you've contributed. Please let us know (on
284
355
  the bioruby list) before you commit, so that users can discuss on the change.
285
356
 
357
+ = RUBY VERSION and IMPLEMENTATION
358
+
359
+ We are mainly using Ruby MRI (Matz' Ruby Implementation, or Matz' Ruby
360
+ Interpreter). Please confirm that your code is running on current stable
361
+ release versions of Ruby MRI.
362
+
363
+ We are very happy if your code can run on both Ruby 1.8.x and 1.9.x.
364
+ Note that Ruby 1.9.0 should be ignored because it was discontinued.
365
+ Ruby 1.8.5 or earlier versions can also be ignored. See README.rdoc and
366
+ RELEASE_NOTES.rdoc for recommended Ruby versions.
367
+
368
+ It is welcome to support JRuby, Rubinius, etc, in addition to Ruby MRI.
369
+
370
+ Of course, it is strongly encouraged to write code that is not affected by
371
+ differences between Ruby versions and/or implementations, as far as possible.
372
+
373
+ = OS and ARCHITECTURE
374
+
375
+ We hope BioRuby can be run on both UNIX (and UNIX-like OS) and Microsoft
376
+ Windows.
@@ -1,132 +1,204 @@
1
- = BioRuby 1.4.2 RELEASE NOTES
1
+ = BioRuby 1.4.3 RELEASE NOTES
2
2
 
3
- A lot of changes have been made to the BioRuby 1.4.2 after the version 1.4.1
3
+ A lot of changes have been made to the BioRuby 1.4.3 after the version 1.4.2
4
4
  is released. This document describes important and/or incompatible changes
5
- since the BioRuby 1.4.1 release.
5
+ since the BioRuby 1.4.2 release.
6
6
 
7
7
  For known problems, see KNOWN_ISSUES.rdoc.
8
8
 
9
9
  == New features
10
10
 
11
- === Speed-up of Bio::RestrictionEnzyme::Analysis.cut
11
+ === Bio::KEGG::KGML
12
12
 
13
- The running speed of Bio::RestrictionEnzyme::Analysis.cut is significantly
14
- increased. The new code is 50 to 80 fold faster than the previous code
15
- when cutting 1Mbp sequence running on Ruby 1.9.2p180. The code is written
16
- by Tomoaki NISHIYAMA and Naohisa Goto.
13
+ * New class Bio::KEGG::KGML::Graphics for storing a graphics element.
14
+ In the instance of the class, "coords" attribute is now available.
15
+ * New class Bio::KEGG::KGML::Substrate for storing a substrate element.
16
+ * New class Bio::KEGG::KGML::Product for storing a product element.
17
+ * New method Bio::KEGG::KGML::Reaction#id.
18
+ * Improve RDoc documentation.
19
+ * Unit tests are added.
20
+ * There are incompatible changes. See Incompatible changes below.
17
21
 
18
- === New classes Bio::DDBJ::REST, REST interface for DDBJ web service
22
+ == Improvements
19
23
 
20
- For DDBJ Web API for Biology (WABI) web service, in additon to SOAP, REST
21
- (REpresentational State Transfer) interface is added as Bio::DDBJ::REST.
22
- Currently, only selected APIs are implemented.
24
+ === Portability running on JRuby and Rubinius
23
25
 
24
- === Bio::Blast with remote DDBJ server uses REST instead of SOAP
26
+ Many failures and errors running on JRuby and Rubinius are resolved.
27
+ Some of them are due to BioRuby bugs, and some of them are due to JRuby or
28
+ Rubinius bugs. Artem Tarasov reported bugs in BioRuby and submitted bug
29
+ reports to Rubinius. Clayton Wheeler and Naohisa Goto fixed bugs in BioRuby
30
+ and submitted bug reports to JRuby.
25
31
 
26
- Bio::Blast with remote DDBJ server uses REST instead of SOAP, because
27
- Soap4r (SOAP library for Ruby) does not work well with Ruby 1.9.
28
- We can now use remote DDBJ BLAST server with Ruby 1.9.
32
+ === Testing on Travis CI
29
33
 
30
- === Tutorial is updated
31
-
32
- The Tutorial.rd is updated by Pjotr Prins and Michael O'Keefe.
33
-
34
- === Many unit tests are added
35
-
36
- Added many unit tests for Bio::GenBank, Bio::GenPept, Bio::NBRF, Bio::PDB
37
- and so on. Most of them are developed by Kazuhiro Hayashi during the
38
- Google Summer of Code 2010.
39
-
40
- === Other new features
41
-
42
- * New method Bio::Fastq#to_s for convenience. Note that the use of the method
43
- may cause loss of performance. To get each input sequence entry as-is,
44
- consider using Bio::FlatFile#entry_raw. To output fastq format data,
45
- consider using Bio::Sequence#output(:fastq).
46
- * New methods Bio::NCBI::REST::EFetch.nucleotide and protein,
47
- to get data from "nucleotide" and "protein" database respectively.
48
- Because NCBI changed not to accept "gb" format for the database
49
- "sequence", the two new methods are added for convenience.
50
- * In BioRuby Shell, efetch method uses the above new methods.
51
- * In GenomeNet remote BLAST execution, database "mine-aa" and "mine-nt"
52
- with KEGG organism codes are now supported.
53
- * Support for Ruby 1.9.2 / 1.9.3 is improved.
34
+ BioRuby is now using Travis CI (http://travis-ci.org/), a hosted continuous
35
+ integration service for the open source community.
54
36
 
55
37
  == Bug fixes
56
38
 
57
- === Bio::Blast
58
-
59
- * Failure of remote BLAST execution is fixed, due to the changes in GenomeNet
60
- and DDBJ.
61
- * When executing remote BLAST with "genomenet" server, options "-b" and "-v"
62
- are now correctly used to limit the number of hits to be reported.
63
-
64
- === Bio::SPTR (Bio::UniProt)
39
+ === Strange behavior related with "circular require" is fixed
65
40
 
66
- * Due to the UniProtKB format changes, ID, DE, and WEB RESOURCE of CC lines
67
- were not correctly parsed. See also below about incompatible change of
68
- the fix.
41
+ Fixed: In previous versions, some bioruby files may be required more than
42
+ two times, and this sometimes causes strange behavior, depending on the
43
+ order of files in the disk. In particular, unit tests running on JRuby
44
+ sometimes crashes with strange errors. In BioRuby 1.4.3, almost all require
45
+ and autoload lines are revised and are changed to avoid circular require.
46
+ This also fixes crash on JRuby due to JRuby's autoload bug.
69
47
 
70
48
  === Other bug fixes
71
49
 
72
- * Bio::Reference#pubmed_url is updated to follow recent NCBI changes.
73
- * Fixed: Bio::Newick#reparse failure.
74
- * Fixed: In Bio::MEDLINE#reference, doi field should be filled.
75
- * Fixed: Bio::Reference#endnote fails when url is not set.
76
- * Fixed: Bio::FastaFormat#query passes nil to the given factory object.
77
- * Fixed: In BioRuby Shell, efetch() with no additional arguments fails
78
- because of the NCBI site changes.
79
- * Fixed: In BioRuby Shell, getent() fails when EMBOSS seqret is not found.
80
- * Fixed: In BioRuby Shell, demo() fails due to the above two issues.
50
+ * Fixed: Genomenet remote BLAST does not work.
51
+ * Fixed: Bio::KEGG::KGML ignores "coords" field.
52
+ * Fixed: Bio::NucleicAcid.to_re("s") typo
53
+ * To suppress rare failure of chi-square equiprobability tests for
54
+ Bio::Sequence::Common#randomize, test code changed to retry up to 10 times
55
+ if the chi-square test fails. The assertion fails if the chi-square test
56
+ fails 10 consecutive times, and this strongly suggests bugs in codes or in
57
+ the random number generator.
58
+ * Fixed: Bio::EMBL#os raises RuntimeError. The fix includes incompatible
59
+ change. See below "Incompatible changes".
60
+ * Fixed: bin/bioruby: Failed to save object with error message "can't convert
61
+ Symbol into String" on Ruby 1.9.
62
+
63
+ == Incompatible changes and removed features
64
+
65
+ === Bio::FlatFile use binmode (binary mode) when opening a file
66
+
67
+ In Bio::FlatFile.open and Bio::FlatFile.auto, binmode (binary mode) is used
68
+ by default when opening a file, unless text mode is explicitly specified
69
+ with open mode string or with options. Due to the change, files using CR+LF
70
+ line separator might not be read correctly.
71
+
72
+ === Broader FASTQ file recognition
73
+
74
+ Because PacBio RS sequencer may produce kilobases long reads and read buffer
75
+ size (default 31 lines) for file format detection may not be sufficient to
76
+ find the second id line starting with "+", the regular expression for FASTQ
77
+ is truncated only to check the first id line starting with "@".
78
+
79
+ === Bio::KEGG::KGML
80
+
81
+ * Bio::KEGG::KGML::Reaction#substrates and Bio::KEGG::KGML::Reaction#products
82
+ are changed to return an array containing Bio::KEGG::KGML::Substrate and
83
+ Bio::KEGG::KGML::Product objects, respectively. The changes enables us to
84
+ get ID of substrates and products that were thrown away in the previous
85
+ versions.
86
+ * Most attribute methods that were different from the KGML attribute names
87
+ are renamed to the names compatible with the KGML attribute names. Old
88
+ method names are changed to aliases of them and marked as deprecated.
89
+ The old names will be removed in the future.
90
+ * Bio::KEGG::KGML::Entry#id (old name: entry_id)
91
+ * Bio::KEGG::KGML::Entry#type (old name: category)
92
+ * Bio::KEGG::KGML::Entry#entry1 (old name: node1)
93
+ * Bio::KEGG::KGML::Entry#entry2 (old name: node2)
94
+ * Bio::KEGG::KGML::Entry#type (old name: rel)
95
+ * Bio::KEGG::KGML::Reaction#name (old name: entry_id)
96
+ * Bio::KEGG::KGML::Reaction#type (old name: direction)
97
+ * Following attribute methods are deprecated because two or more graphics
98
+ elements may exist in an entry element. They will be removed in the future.
99
+ Instead, please use instance methods of Bio::KEGG::KGML::Graphics, which
100
+ can be obtained from Bio::KEGG::KGML::Entry#graphics attribute.
101
+ * Bio::KEGG::KGML::Entry#label
102
+ * Bio::KEGG::KGML::Entry#shape
103
+ * Bio::KEGG::KGML::Entry#x
104
+ * Bio::KEGG::KGML::Entry#y
105
+ * Bio::KEGG::KGML::Entry#width
106
+ * Bio::KEGG::KGML::Entry#height
107
+ * Bio::KEGG::KGML::Entry#fgcolor
108
+ * Bio::KEGG::KGML::Entry#bgcolor
109
+
110
+ === Bio::EMBL#os
111
+
112
+ Bio::EMBL#os, returns parser result of the EMBL OS line, no longer splits
113
+ the content with comma, and it no longer raises error even if the OS line
114
+ is not in the "Genus species (name)" format. The changes may affect the
115
+ parsing of old EMBL files which contain two or more species names in an
116
+ OS line.
117
+
118
+ Note that Bio::EMBL#os returns an Array containing several Hash objects,
119
+ and the argument is always ignored. The return value type and the meaning
120
+ of the argument might be changed in the future.
121
+
122
+ === Tests
123
+
124
+ * Tests using network connections are moved under test/network/.
125
+ To invoke these tests, run "rake test-network".
126
+ * BIORUBY_TEST_LIB environment variable
127
+ * The directory name specified with BIORUBY_TEST_LIB is always added on the
128
+ top of $LOAD_PATH even if it is already included in the middle of
129
+ $LOAD_PATH.
130
+ * When BIORUBY_TEST_LIB is empty, it no longer add an empty string to
131
+ $LOAD_PATH.
132
+ * BIORUBY_TEST_LIB is ignored when BIORUBY_TEST_GEM is set.
133
+ * BIORUBY_TEST_GEM environment variable
134
+ * New environment variable BIORUBY_TEST_GEM for testing installed
135
+ bio-X.X.X gem. Version number can be specified.
136
+ See the following examples with/without the version number:
137
+ * % env BIORUBY_TEST_GEM=1.4.2.5000 ruby test/runner.rb
138
+ * % env BIORUBY_TEST_GEM="" ruby test/runner.rb
139
+
140
+ === Other removed features
141
+
142
+ * rdoc.zsh is removed because it have not been used for a long time.
81
143
 
82
- == Incompatible changes
144
+ == Known issues
83
145
 
84
- === Bio::Sequence#output(:fastq)
146
+ The following issues are added or updated. See KNOWN_ISSUES.rdoc for other
147
+ already known issues.
85
148
 
86
- In Fastq output formatter, default width value is changed from 70 to nil.
87
- The nil means "without wrapping". The new default behavior without wrapping
88
- is generally good with many recent applications that read fastq.
149
+ === JRuby
89
150
 
90
- === Bio::SPTR CC line topic "WEB RESOURCE"
151
+ On JRuby, errors may be raised due to the following unfixed bugs in JRuby.
91
152
 
92
- In the return value of Bio::SPTR#cc('WEB RESOURCE'), "NAME" and "NOTE"
93
- are now renamed to "Name" and "Note", respectively. The change is due to
94
- the UniProt format change since UniProtKB release 12.2 of 11-Sep-2007.
95
- (See http://www.uniprot.org/docs/sp_news.htm#rel12.2 for details.)
96
- Note that "Name" and "Note" are used even when parsing older format.
97
- The change would also affect Marshal.dump (and YAML.dump) data.
153
+ * {JRUBY-6195}[http://jira.codehaus.org/browse/JRUBY-6195] Process.spawn
154
+ (and related methods) ignore option hash
155
+ * {JRUBY-6818}[http://jira.codehaus.org/browse/JRUBY-6818] Kernel.exec,
156
+ Process.spawn (and IO.popen etc.) raise error when program is an array
157
+ containing two strings
98
158
 
99
- === Bio::Blast with the remote GenomeNet server
159
+ With older version of JRuby, you may be bothered by the following bugs that
160
+ have already been fixed in the head of JRuby.
100
161
 
101
- When executing remote BLAST with "genomenet" server, options "-b" and "-v"
102
- are now correctly used to limit the number of hits to be reported.
103
- In 1.4.1 and before, "-B" and "-V" were mistakenly used for the purpose.
162
+ * {JRUBY-6658}[http://jira.codehaus.org/browse/JRUBY-6658] Problem when
163
+ setting up an autoload entry, defining a class via require, then redefining
164
+ the autoload entry
165
+ * {JRUBY-6666}[http://jira.codehaus.org/browse/JRUBY-6666] Open3.popen3
166
+ failing due to missing handling for [path, argv[0]] array
167
+ * {JRUBY-6819}[http://jira.codehaus.org/browse/JRUBY-6819]
168
+ java.lang.ArrayIndexOutOfBoundsException in String#each_line
104
169
 
105
- === Bio::Blast with the remote DDBJ server
170
+ Due to JRUBY-5678 (resolved issue) and the difference of behavior between
171
+ CRuby and JRuby written in the comments of the issue tracking page,
172
+ when running BioRuby on JRuby with sudo or root rights, TMPDIR environment
173
+ variable should be set to a directory that is not world-writable. Currently,
174
+ the workaround is needed for running BioRuby tests with JRuby on Travis-CI.
106
175
 
107
- Bio::Blast with remote DDBJ server uses REST instead of SOAP.
176
+ * {JRUBY-5678}[http://jira.codehaus.org/browse/JRUBY-5678] tmpdir cannot
177
+ be delete when jruby has sudo/root rights
108
178
 
109
- === Bio::RestrictionEnzyme internal data structure change
179
+ === Rubinius
110
180
 
111
- Due to the speedup, internal data structure of the following classes
112
- are changed: Bio::RestrictionEnzyme::Range::SequenceRange,
113
- Bio::RestrictionEnzyme::Range::SequenceRange::CalculatedCuts,
114
- Bio::RestrictionEnzyme::Range::SequenceRange::Fragment.
115
- This indicates that Marshal.dump (and YAML.dump) data generated by older
116
- versions cannot be loaded by the new version, and vice versa, although
117
- public APIs of the classes keep compatibility.
181
+ According to Travis-CI, unit tests have failed on 1.9 mode of Rubinius.
118
182
 
119
- == Known issues
183
+ With older version of Rubinius, you may be bothered by the following bugs that
184
+ have already been fixed in the head of Rubinius.
120
185
 
121
- The following issues are added or updated. See KNOWN_ISSUES.rdoc for other
122
- already known issues.
186
+ * {Rubinius Issue #1693}[https://github.com/rubinius/rubinius/issues/1693]
187
+ String#split gives incorrect output when splitting by /^/
188
+ * {Rubinius Issue #1724}[https://github.com/rubinius/rubinius/issues/1724]
189
+ Creating Struct class with length attribute
190
+
191
+ === DDBJ Web API related classes (Bio::DDBJ::*, Bio::BLAST::Remote::DDBJ)
123
192
 
124
- * Bio::SPTR should be updated to follow UniProtKB format changes.
125
- * Problems observed only with Ruby 1.8.5 or earlier will not be fixed.
126
- * Descriptions about very old RubyGems 0.8.11 or earlier and about CVS
127
- repository are moved from README.rdoc.
193
+ DDBJ Web API is stopping after their system replacement in March 2012.
194
+ (See the announcement though it is written only in Japanese:
195
+ http://www.ddbj.nig.ac.jp/replace/rp120601-j.html)
196
+ Due to the stop of the DDBJ Web API, Bio::DDBJ::* and Bio::BLAST::Remote::DDBJ
197
+ which are using the web API can not be used.
128
198
 
129
- == Other important news
199
+ === SOAP4R with Ruby 1.9
130
200
 
131
- * Required ruby version is now Ruby 1.8.6 or later (except 1.9.0).
201
+ soap4r-ruby1.9 may raise "ununitialized constant XML::SaxParser" error with
202
+ some combinations of XML parser libraries. It seems this is a bug of
203
+ soap4r-ruby1.9.
132
204