ngoto-bio 1.2.9.9001 → 1.2.9.9501

Sign up to get free protection for your applications and to get access to all the features.
data/KNOWN_ISSUES.rdoc ADDED
@@ -0,0 +1,66 @@
1
+ = KNOWN_ISSUES.rdoc - Known issues and bugs in BioRuby
2
+ Copyright:: Copyright (C) 2009 Naohisa Goto <ng@bioruby.org>
3
+ License:: The Ruby License
4
+
5
+ = Known issues and bugs in BioRuby
6
+
7
+ Below are known issues and bugs in BioRuby. They will be fixed in the future,
8
+ except items with (WONT_FIX) tags.
9
+
10
+ == 1. Ruby version specific issues
11
+
12
+ === Ruby 1.9.1 or later
13
+
14
+ Some classes/modules/methods still may not work or may return incorrect
15
+ results in Ruby 1.9.1, especially those not covered by the unit tests.
16
+
17
+ ==== String encodings
18
+
19
+ Currently, BioRuby do not care string encodings. In some cases,
20
+ Encoding::CompatibilityError may be raised.
21
+
22
+ === Ruby 1.9.0
23
+
24
+ (WONT_FIX) Ruby 1.9.0 is NOT supported because it isn't a stable release.
25
+ Use Ruby 1.9.1 or later.
26
+
27
+ === Ruby 1.8.2 or earlier
28
+
29
+ (WONT_FIX) In some cases, temporary files and directories may not be
30
+ removed because of the lack of FileUtils.remove_entry_secure.
31
+
32
+ (WONT_FIX) We will soon end support for Ruby 1.8.2. Note that Ruby
33
+ 1.8.1 or earlier is no longer supported, as described in README.rdoc.
34
+
35
+ === Issues about SOAP/WSDL
36
+
37
+ SOAP4R (SOAP and WSDL implementation) is no longer bundled with Ruby 1.9.
38
+ In addition, because of the API changes in recent SOAP4R, some
39
+ classes/modules using SOAP4R may not work.
40
+
41
+ == 2. OS and/or architecture-dependent issues
42
+
43
+ === Microsoft Windows
44
+
45
+ Following 4 tests failed because of the processing of file contents in the
46
+ text mode.
47
+
48
+ * test_ended_pos and test_start_pos in test/unit/bio/io/test_flatfile.rb
49
+ * test_pos in test/unit/bio/io/flatfile/test_buffer.rb
50
+ * test_entry_pos in test/unit/bio/appl/blast/test_rpsblast.rb
51
+
52
+ (WONT_FIX) Some methods that call external programs may not work in
53
+ Windows 95/98/98SE/ME because of the limitation of COMMAND.COM.
54
+
55
+ == 3. Known issues and bugs in BioRuby
56
+
57
+ === Bio::Ensembl
58
+
59
+ Due to the renewal of Ensembl web site, Bio::Ensembl does not work for
60
+ the latest Ensembl. For a workaround, use an archive server. For example,
61
+ "jul2008.archive.ensembl.org" seems to be the last server before the renewal.
62
+ human = Bio::Ensembl.new("Homo_sapiens", "jul2008.archive.ensembl.org")
63
+
64
+ Alternatively, consider using Ruby Ensembl API.
65
+ * http://github.com/jandot/ruby-ensembl-api
66
+
data/Rakefile CHANGED
@@ -10,6 +10,18 @@ require 'erb'
10
10
  require 'rake/testtask'
11
11
  require 'rake/packagetask'
12
12
  require 'rake/gempackagetask'
13
+ require 'rake/rdoctask'
14
+ load "./lib/bio.rb"
15
+
16
+ # Version string for tar.gz, tar.bz2, or zip archive.
17
+ # If nil, use the value in lib/bio.rb
18
+ # Note that gem version is always determined from bioruby.gemspec.erb.
19
+ version = ENV['BIORUBY_VERSION'] || Bio::BIORUBY_VERSION.join(".")
20
+ version = nil if version.to_s.empty?
21
+ extraversion = ENV['BIORUBY_EXTRAVERSION']
22
+ extraversion = nil if extraversion.to_s.empty?
23
+ version += extraversion.to_s if version and extraversion
24
+ BIORUBY_VERSION = version
13
25
 
14
26
  task :default => "test"
15
27
 
@@ -44,6 +56,12 @@ end
44
56
  desc "Update gem spec file"
45
57
  task :gemspec => GEM_SPEC_FILE
46
58
 
59
+ desc "Force update gem spec file"
60
+ task :regemspec do
61
+ #rm GEM_SPEC_FILE, :force => true
62
+ Rake::Task[GEM_SPEC_FILE].execute
63
+ end
64
+
47
65
  desc "Update #{GEM_SPEC_FILE}"
48
66
  file GEM_SPEC_FILE => [ GEM_SPEC_TEMPLATE_FILE, 'Rakefile' ] do |t|
49
67
  puts "creates #{GEM_SPEC_FILE}"
@@ -53,7 +71,7 @@ file GEM_SPEC_FILE => [ GEM_SPEC_TEMPLATE_FILE, 'Rakefile' ] do |t|
53
71
  end
54
72
 
55
73
  task :package => [ GEM_SPEC_FILE ] do
56
- Rake::Task[GEM_SPEC_FILE].invoke if flag_update_gemspec
74
+ Rake::Task[:regemspec].invoke if flag_update_gemspec
57
75
  end
58
76
 
59
77
  Rake::PackageTask.new("bioruby") do |pkg|
@@ -61,10 +79,26 @@ Rake::PackageTask.new("bioruby") do |pkg|
61
79
  pkg.need_tar_gz = true
62
80
  pkg.package_files.import(spec.files)
63
81
  pkg.package_files.include(*tar_additional_files)
64
- pkg.version = spec.version
82
+ pkg.version = BIORUBY_VERSION || spec.version
65
83
  end
66
84
 
67
85
  Rake::GemPackageTask.new(spec) do |pkg|
68
86
  #pkg.package_dir = "./pkg"
69
87
  end
70
88
 
89
+ Rake::RDocTask.new do |r|
90
+ r.rdoc_dir = "rdoc"
91
+ r.rdoc_files.include(*spec.extra_rdoc_files)
92
+ r.rdoc_files.import(spec.files.find_all {|x| /\Alib\/.+\.rb\z/ =~ x})
93
+ #r.rdoc_files.exclude /\.yaml\z"
94
+ opts = spec.rdoc_options.to_a.dup
95
+ if i = opts.index('--main') then
96
+ main = opts[i + 1]
97
+ opts.delete_at(i)
98
+ opts.delete_at(i)
99
+ else
100
+ main = 'README.rdoc'
101
+ end
102
+ r.main = main
103
+ r.options = opts
104
+ end
data/bioruby.gemspec CHANGED
@@ -3,7 +3,7 @@
3
3
  #
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'bio'
6
- s.version = "1.2.9.9001"
6
+ s.version = "1.2.9.9501"
7
7
 
8
8
  s.author = "BioRuby project"
9
9
  s.email = "staff@bioruby.org"
@@ -15,6 +15,7 @@ Gem::Specification.new do |s|
15
15
  s.platform = Gem::Platform::RUBY
16
16
  s.files = [
17
17
  "ChangeLog",
18
+ "KNOWN_ISSUES.rdoc",
18
19
  "README.rdoc",
19
20
  "README_DEV.rdoc",
20
21
  "Rakefile",
@@ -229,6 +230,7 @@ Gem::Specification.new do |s|
229
230
  "lib/bio/shell/plugin/flatfile.rb",
230
231
  "lib/bio/shell/plugin/keggapi.rb",
231
232
  "lib/bio/shell/plugin/midi.rb",
233
+ "lib/bio/shell/plugin/ncbirest.rb",
232
234
  "lib/bio/shell/plugin/obda.rb",
233
235
  "lib/bio/shell/plugin/psort.rb",
234
236
  "lib/bio/shell/plugin/seq.rb",
@@ -441,12 +443,16 @@ Gem::Specification.new do |s|
441
443
 
442
444
  s.has_rdoc = true
443
445
  s.extra_rdoc_files = [
446
+ "KNOWN_ISSUES.rdoc",
444
447
  "README.rdoc",
445
448
  "README_DEV.rdoc",
446
- "doc/Changes-1.3.rdoc"
449
+ "doc/Changes-1.3.rdoc",
450
+ "ChangeLog"
447
451
  ]
448
452
  s.rdoc_options << '--main' << 'README.rdoc'
453
+ s.rdoc_options << '--title' << 'BioRuby API documentation'
449
454
  s.rdoc_options << '--exclude' << '\.yaml\z'
455
+ s.rdoc_options << '--line-numbers' << '--inline-source'
450
456
 
451
457
  s.require_path = 'lib'
452
458
  s.autorequire = 'bio'
data/bioruby.gemspec.erb CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'bio'
3
- s.version = "1.2.9.9001"
3
+ s.version = "1.2.9.9501"
4
4
 
5
5
  s.author = "BioRuby project"
6
6
  s.email = "staff@bioruby.org"
@@ -12,13 +12,14 @@ Gem::Specification.new do |s|
12
12
  s.platform = Gem::Platform::RUBY
13
13
  s.files = [
14
14
  <% ###### Below is executed in ERB environment ######
15
- # Gets file list from the "git-ls-files" command.
16
- files = `git-ls-files 2>/dev/null`.to_s.split(/\r?\n/)
15
+ # Gets file list from the "git ls-files" command.
16
+ files = (`git ls-files` rescue nil).to_s.split(/\r?\n/)
17
17
  files.delete_if { |x| x.empty? }
18
18
  # When git-ls-files isn't available, creates a list from current files.
19
19
  unless $?.success? or files.size <= 0 then
20
20
  files =
21
- [ "README.rdoc", "README_DEV.rdoc", "ChangeLog",
21
+ [ "README.rdoc", "README_DEV.rdoc",
22
+ "ChangeLog", "KNOWN_ISSUES.rdoc",
22
23
  "Rakefile", "bioruby.gemspec.erb",
23
24
  "bioruby.gemspec", "setup.rb",
24
25
  "extconf.rb", "rdoc.zsh"
@@ -31,7 +32,6 @@ Gem::Specification.new do |s|
31
32
  end
32
33
  end
33
34
  end
34
- files.push "bioruby.gemspec" unless files.include?("bioruby.gemspec")
35
35
  %><%=
36
36
  files.collect { |x| x.dump }.join(",\n ")
37
37
  ###### Above is executed in ERB environment ######
@@ -48,12 +48,15 @@ Gem::Specification.new do |s|
48
48
  rdoc_files = [ 'README.rdoc', 'README_DEV.rdoc',
49
49
  'doc/Changes-1.3.rdoc' ]
50
50
  end
51
+ rdoc_files.push "ChangeLog" unless rdoc_files.include?("ChangeLog")
51
52
  rdoc_files.collect { |x| x.dump }.join(",\n ")
52
53
  ###### Above is executed in ERB environment ######
53
54
  %>
54
55
  ]
55
56
  s.rdoc_options << '--main' << 'README.rdoc'
57
+ s.rdoc_options << '--title' << 'BioRuby API documentation'
56
58
  s.rdoc_options << '--exclude' << '\.yaml\z'
59
+ s.rdoc_options << '--line-numbers' << '--inline-source'
57
60
 
58
61
  s.require_path = 'lib'
59
62
  s.autorequire = 'bio'
data/doc/Changes-1.3.rdoc CHANGED
@@ -94,6 +94,23 @@ Bio::Locations#operator is used. When "order(...)" or "group(...)",
94
94
  the attribute is set to :order or :group, respectively. Note that
95
95
  "group(...)" is already deprecated in EMBL/GenBank/DDBJ.
96
96
 
97
+ === Bio::Blast
98
+
99
+ Return value of Bio::Blast#exec_* is changed to String instead of Report
100
+ object. Parsing the string is now processed in Bio::Blast#query method.
101
+
102
+ Bio::Blast#exec_genomenet_tab and Bio::Blast#server="genomenet_tab" is
103
+ deprecated.
104
+
105
+ Bio::Blast#options=() can now change the following attributes: program, db,
106
+ format, matrix, and filter.
107
+
108
+ Bio::Blast.reports now supports default (-m 0) and tabular (-m 8) formats.
109
+ Old implementation (only supports XML) is renamed to Bio::Blast.reports_xml,
110
+ to keep compatibility for older BLAST XML documents which might not be parsed
111
+ by the new Bio::Blast.reports nor Bio::FlatFile, although we are not sure
112
+ whether such documents really exist or not.
113
+
97
114
  === Bio::Blast::Default::Report and Bio::Blast::WU::Report
98
115
 
99
116
  Iteration#lambda, #kappa, #entropy, #gapped_lambda, #gapped_kappa,
@@ -187,6 +204,16 @@ and "##FASTA" lines.
187
204
  * "###" lines are parsed to Bio::GFF::GFF3::RecordBoundary objects.
188
205
  * "##FASTA" is regarded as the beginning of bundled sequences.
189
206
 
207
+ === Bio::Pathway
208
+
209
+ Bio::Pathway#cliquishness is changed to calculate cliquishness (clustering
210
+ coefficient) for not only undirected graphs but also directed graphs.
211
+
212
+ In Bio::Pathway#to_matrix, dump_matrix, dump_list, and depth_first_search
213
+ methods, to avoid dependency to the order of objects in Hash#each (and
214
+ each_keys etc.), Bio::Pathway#index is used to specify preferences of
215
+ nodes in a graph.
216
+
190
217
  === Bio::SQL and BioSQL related classes
191
218
 
192
219
  BioSQL support is completely rewritten by using ActiveRecord. See documents
@@ -65,7 +65,8 @@ class Bio::Blast
65
65
 
66
66
  # Returns a list of available databases for given program.
67
67
  #
68
- # Note: It parses http://blast.genome.jp/ to obtain database information.
68
+ # Note: It parses remote sites to obtain database information
69
+ # (e.g. http://blast.genome.jp/ for Bio::Blast::Remote::GenomeNet).
69
70
  # Thus, if the site is changed, this method can not return correct data.
70
71
  # Please tell BioRuby developers when the site is changed.
71
72
  #
@@ -5,7 +5,7 @@
5
5
  # Toshiaki Katayama <k@bioruby.org>
6
6
  # License:: The Ruby License
7
7
  #
8
- # $Id: entry.rb,v 1.10 2007/04/05 23:35:41 trevor Exp $
8
+ # $Id:$
9
9
  #
10
10
 
11
11
  module Bio::Shell
@@ -88,8 +88,14 @@ module Bio::Shell
88
88
 
89
89
  # KEGG API at http://www.genome.jp/kegg/soap/
90
90
  else
91
- puts "Retrieving entry from KEGG API (#{arg})"
92
- entry = bget(arg)
91
+ case db.to_s.downcase
92
+ when 'genbank', 'gb', 'embl', 'emb', 'ddbj', 'dbj'
93
+ puts "Retrieving entry from NCBI eUtils"
94
+ entry = efetch(entry_id)
95
+ else
96
+ puts "Retrieving entry from KEGG API (#{arg})"
97
+ entry = bget(arg)
98
+ end
93
99
  end
94
100
  end
95
101
 
@@ -0,0 +1,66 @@
1
+ #
2
+ # = bio/shell/plugin/ncbirest.rb - plugin for NCBI eUtils
3
+ #
4
+ # Copyright:: Copyright (C) 2009
5
+ # Naohisa Goto <ng@bioruby.org>
6
+ # License:: The Ruby License
7
+ #
8
+ # $Id:$
9
+ #
10
+
11
+ module Bio::Shell
12
+
13
+ private
14
+
15
+ # NCBI eUtils EFetch service.
16
+ # When two or more arguments are given, or multiple accession numbers
17
+ # are given it acts the same as Bio::NCBI::REST.efetch.
18
+ # Otherwise, assumes nucleotide or protein accessin is given, and
19
+ # automatically tries several databases.
20
+ def efetch(ids, *arg)
21
+ if !arg.empty? or ids.kind_of?(Array) or /\,/ =~ ids then
22
+ return Bio::NCBI::REST.efetch(ids, *arg)
23
+ end
24
+
25
+ rettype = 'gb'
26
+ prot_dbs = [ 'protein' ]
27
+ nucl_dbs = [ 'nuccore', 'nucleotide', 'nucgss', 'nucest' ]
28
+
29
+ case ids
30
+ when /\A[A-Z][A-Z][A-Z][0-9]+(\.[0-9]+)?\z/i,
31
+ /\A[OPQ][A-Z0-9]+(\.[0-9]+)?\z/i
32
+ # protein accession
33
+ dbs = prot_dbs
34
+ when /\A[0-9]+\z/, /\A[A-Z0-9]+\_[A-Z0-9]+\z/i
35
+ # NCBI GI or UniProt accession (with fail-safe)
36
+ dbs = prot_dbs + nucl_dbs
37
+ else
38
+ # nucleotide accession
39
+ dbs = nucl_dbs
40
+ end
41
+ result = nil
42
+ dbs.each do |db|
43
+ hash = { 'db' => db, 'rettype' => 'gb' }
44
+ result = Bio::NCBI::REST.efetch(ids, hash)
45
+ break if result and !result.empty?
46
+ end
47
+ result
48
+ end
49
+
50
+ # NCBI eUtils EInfo
51
+ def einfo
52
+ Bio::NCBI::REST.einfo
53
+ end
54
+
55
+ # NCBI eUtils ESearch
56
+ def esearch(str, *arg)
57
+ Bio::NCBI::REST.esearch(str, *arg)
58
+ end
59
+
60
+ # Same as Bio::NCBI::REST.esearch_count
61
+ def esearch_count(str, *arg)
62
+ Bio::NCBI::REST.esearch_count(str, *arg)
63
+ end
64
+
65
+ end
66
+
data/lib/bio/shell.rb CHANGED
@@ -5,7 +5,7 @@
5
5
  # Toshiaki Katayama <k@bioruby.org>
6
6
  # License:: The Ruby License
7
7
  #
8
- # $Id: shell.rb,v 1.20 2007/07/09 11:17:09 k Exp $
8
+ # $Id:$
9
9
  #
10
10
 
11
11
  require 'bio'
@@ -36,6 +36,7 @@ module Bio::Shell
36
36
  require 'bio/shell/plugin/emboss'
37
37
  require 'bio/shell/plugin/blast'
38
38
  require 'bio/shell/plugin/psort'
39
+ require 'bio/shell/plugin/ncbirest'
39
40
 
40
41
  extend Ghost
41
42
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ngoto-bio
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.9.9001
4
+ version: 1.2.9.9501
5
5
  platform: ruby
6
6
  authors:
7
7
  - BioRuby project
@@ -24,11 +24,14 @@ executables:
24
24
  extensions: []
25
25
 
26
26
  extra_rdoc_files:
27
+ - KNOWN_ISSUES.rdoc
27
28
  - README.rdoc
28
29
  - README_DEV.rdoc
29
30
  - doc/Changes-1.3.rdoc
31
+ - ChangeLog
30
32
  files:
31
33
  - ChangeLog
34
+ - KNOWN_ISSUES.rdoc
32
35
  - README.rdoc
33
36
  - README_DEV.rdoc
34
37
  - Rakefile
@@ -243,6 +246,7 @@ files:
243
246
  - lib/bio/shell/plugin/flatfile.rb
244
247
  - lib/bio/shell/plugin/keggapi.rb
245
248
  - lib/bio/shell/plugin/midi.rb
249
+ - lib/bio/shell/plugin/ncbirest.rb
246
250
  - lib/bio/shell/plugin/obda.rb
247
251
  - lib/bio/shell/plugin/psort.rb
248
252
  - lib/bio/shell/plugin/seq.rb
@@ -457,8 +461,12 @@ post_install_message:
457
461
  rdoc_options:
458
462
  - --main
459
463
  - README.rdoc
464
+ - --title
465
+ - BioRuby API documentation
460
466
  - --exclude
461
467
  - \.yaml\z
468
+ - --line-numbers
469
+ - --inline-source
462
470
  require_paths:
463
471
  - lib
464
472
  required_ruby_version: !ruby/object:Gem::Requirement