Permalink
Browse files

Email address for NCBI Entrez is given with Bio::NCBI.default_email=.

  • Loading branch information...
1 parent 7a71796 commit 9c8ef18a20c49f17d5b89aa1db5819b2c8ee9b1d @ngoto ngoto committed Dec 24, 2009
Showing with 16 additions and 1 deletion.
  1. +4 −1 bin/bioruby
  2. +2 −0 sample/demo_ncbi_rest.rb
  3. +2 −0 sample/demo_pubmed.rb
  4. +2 −0 sample/pmfetch.rb
  5. +2 −0 sample/pmsearch.rb
  6. +4 −0 test/functional/bio/io/test_pubmed.rb
View
@@ -6,7 +6,7 @@
# Toshiaki Katayama <k@bioruby.org>
# License:: The Ruby License
#
-# $Id: bioruby,v 1.21 2007/07/26 10:46:46 k Exp $
+# $Id:$
#
begin
@@ -26,6 +26,9 @@ Bio::Shell::Setup.new
# loading workspace and command history
Bio::Shell.load_session
+# sets default email address for Entrez eUtils.
+Bio::NCBI.default_email ||= 'staff@bioruby.org'
+
# main loop
if Bio::Shell.cache[:rails]
Bio::Shell.cache[:rails].join
View
@@ -26,6 +26,8 @@
require 'bio'
+Bio::NCBI.default_email = 'staff@bioruby.org'
+
#if __FILE__ == $0
gbopts = {"db"=>"nuccore", "rettype"=>"gb"}
View
@@ -27,6 +27,8 @@
require 'bio'
+Bio::NCBI.default_email = 'staff@bioruby.org'
+
#if __FILE__ == $0
puts "=== instance methods ==="
View
@@ -23,6 +23,8 @@
require 'bio'
+Bio::NCBI.default_email = 'staff@bioruby.org'
+
if ARGV[0] =~ /\A\-f/
ARGV.shift
form = ARGV.shift
View
@@ -23,6 +23,8 @@
require 'bio'
+Bio::NCBI.default_email = 'staff@bioruby.org'
+
if ARGV[0] =~ /\A\-f/
ARGV.shift
form = ARGV.shift
@@ -115,6 +115,8 @@ class FuncTestPubmed < Test::Unit::TestCase
include FuncTestPubmedCommon
def setup
+ Bio::NCBI.default_email = 'staff@bioruby.org'
+ #$stderr.puts Bio::NCBI.default_tool
@pm = Bio::PubMed.new
end
end #class FuncTestPubmed
@@ -124,6 +126,8 @@ class FuncTestPubmedClassMethod < Test::Unit::TestCase
include FuncTestPubmedCommon
def setup
+ Bio::NCBI.default_email = 'staff@bioruby.org'
+ #$stderr.puts Bio::NCBI.default_tool
@pm = Bio::PubMed
end
end #class FuncTestPubmedClassMethod

0 comments on commit 9c8ef18

Please sign in to comment.