lib/bio/io/ncbirest.rb in bio-1.5.0 vs lib/bio/io/ncbirest.rb in bio-1.5.1
- old
+ new
@@ -18,17 +18,17 @@
# (Hash) Default parameters for Entrez (eUtils).
# They may also be used for other NCBI services.
ENTREZ_DEFAULT_PARAMETERS = {
# Cited from
- # http://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4.Release_Notes
+ # https://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4.Release_Notes
# tool:
# Name of application making the E-utility call.
# Value must be a string with no internal spaces.
'tool' => "bioruby",
# Cited from
- # http://www.ncbi.nlm.nih.gov/books/NBK25497/
+ # https://www.ncbi.nlm.nih.gov/books/NBK25497/
# The value of email should be a complete and valid e-mail address
# of the software developer and not that of a third-party end user.
'email' => 'staff@bioruby.org',
}
@@ -52,11 +52,11 @@
end
# Sets default email address used for Entrez (eUtils).
# It may also be used for other NCBI services.
#
- # In http://www.ncbi.nlm.nih.gov/books/NBK25497/
+ # In https://www.ncbi.nlm.nih.gov/books/NBK25497/
# NCBI says:
# "The value of email should be a complete and valid e-mail address of
# the software developer and not that of a third-party end user."
#
# By default, email address of BioRuby staffs is set.
@@ -87,11 +87,11 @@
end
# Sets default tool name for Entrez (eUtils).
# It may also be used for other NCBI services.
#
- # In http://www.ncbi.nlm.nih.gov/books/NBK25497/
+ # In https://www.ncbi.nlm.nih.gov/books/NBK25497/
# NCBI says:
# "The value of tool should be a string with no internal spaces that
# uniquely identifies the software producing the request."
#
# "bioruby" is set by default.
@@ -109,13 +109,14 @@
# == Description
#
# The Bio::NCBI::REST class provides REST client for the NCBI E-Utilities
#
-# Entrez utilities index:
+# Entrez Programming Utilities Help:
#
-# * http://www.ncbi.nlm.nih.gov/entrez/utils/utils_index.html
+# * https://www.ncbi.nlm.nih.gov/books/NBK25501/
+# * ( redirected from http://www.ncbi.nlm.nih.gov/entrez/utils/ )
#
class REST
# Run retrieval scripts on weekends or between 9 pm and 5 am Eastern Time
# weekdays for any series of more than 100 requests.
@@ -195,11 +196,11 @@
public
# List the NCBI database names E-Utils (einfo) service
#
- # * http://eutils.ncbi.nlm.nih.gov/entrez/eutils/einfo.fcgi
+ # * https://eutils.ncbi.nlm.nih.gov/entrez/eutils/einfo.fcgi
#
# pubmed protein nucleotide nuccore nucgss nucest structure genome
# books cancerchromosomes cdd gap domains gene genomeprj gensat geo
# gds homologene journals mesh ncbisearch nlmcatalog omia omim pmc
# popset probe proteinclusters pcassay pccompound pcsubstance snp
@@ -213,11 +214,11 @@
# Bio::NCBI::REST.einfo
#
# ---
# *Returns*:: array of string (database names)
def einfo
- serv = "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/einfo.fcgi"
+ serv = "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/einfo.fcgi"
opts = default_parameters.merge({})
response = ncbi_post_form(serv, opts)
result = response.body
list = result.scan(/<DbName>(.*?)<\/DbName>/m).flatten
return list
@@ -227,12 +228,13 @@
# Search the NCBI database by given keywords using E-Utils (esearch) service
# and returns an array of entry IDs.
#
# For information on the possible arguments, see
#
- # * http://eutils.ncbi.nlm.nih.gov/entrez/query/static/esearch_help.html
- # * http://www.ncbi.nlm.nih.gov/books/bv.fcgi?rid=helppubmed.section.pubmedhelp.Search_Field_Descrip
+ # * https://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4.ESearch
+ # * ( redirected from http://eutils.ncbi.nlm.nih.gov/books/n/helpeutils/chapter4/#chapter4.ESearch )
+ # * ( redirected from http://eutils.ncbi.nlm.nih.gov/entrez/query/static/esearch_help.html )
#
# == Usage
#
# ncbi = Bio::NCBI::REST.new
# ncbi.esearch("tardigrada", {"db"=>"nucleotide", "rettype"=>"count"})
@@ -280,11 +282,11 @@
# * _datetype_: "edat"
# * _limit_: maximum number of entries to be returned (0 for unlimited; nil for the "retmax" value in the hash or the internal default value (=100))
# * _step_: maximum number of entries retrieved at a time
# *Returns*:: array of entry IDs or a number of results
def esearch(str, hash = {}, limit = nil, step = 10000)
- serv = "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi"
+ serv = "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi"
opts = default_parameters.merge({ "term" => str })
opts.update(hash)
case opts["rettype"]
when "count"
@@ -311,11 +313,11 @@
end
# *Arguments*:: same as esearch method
# *Returns*:: array of entry IDs or a number of results
def esearch_count(str, hash = {})
- serv = "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi"
+ serv = "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi"
opts = default_parameters.merge({ "term" => str })
opts.update(hash)
opts.update("rettype" => "count")
response = ncbi_post_form(serv, opts)
result = response.body
@@ -326,11 +328,11 @@
# Retrieve database entries by given IDs and using E-Utils (efetch) service.
#
# For information on the possible arguments, see
#
- # * http://eutils.ncbi.nlm.nih.gov/entrez/query/static/efetch_help.html
+ # * https://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4.EFetch
#
# == Usage
#
# ncbi = Bio::NCBI::REST.new
# ncbi.efetch("185041", {"db"=>"nucleotide", "rettype"=>"gb", "retmode" => "xml"})
@@ -349,11 +351,11 @@
# * _retmode_: "text", "xml", "html", ...
# * _rettype_: "gb", "gbc", "medline", "count",...
# * _step_: maximum number of entries retrieved at a time
# *Returns*:: String
def efetch(ids, hash = {}, step = 100)
- serv = "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi"
+ serv = "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi"
opts = default_parameters.merge({ "retmode" => "text" })
opts.update(hash)
case ids
when Array
@@ -394,16 +396,16 @@
# Shortcut methods for the ESearch service
class ESearch
# Search database entries by given keywords using E-Utils (esearch).
#
- # * http://eutils.ncbi.nlm.nih.gov/entrez/query/static/esearch_help.html
+ # * https://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4.ESearch
#
# sequences = gene + genome + nucleotide + protein + popset + snp
# nucleotide = nuccore + nucest + nucgss
#
- # * http://eutils.ncbi.nlm.nih.gov/entrez/eutils/einfo.fcgi
+ # * https://eutils.ncbi.nlm.nih.gov/entrez/eutils/einfo.fcgi
#
# pubmed protein nucleotide nuccore nucgss nucest structure genome
# books cancerchromosomes cdd gap domains gene genomeprj gensat geo
# gds homologene journals mesh ncbisearch nlmcatalog omia omim pmc
# popset probe proteinclusters pcassay pccompound pcsubstance snp
@@ -515,11 +517,11 @@
module Methods
# Retrieve sequence entries by given IDs using E-Utils (efetch).
#
- # * http://eutils.ncbi.nlm.nih.gov/entrez/query/static/efetchseq_help.html
+ # * https://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4.EFetch
#
# sequences = gene + genome + nucleotide + protein + popset + snp
# nucleotide = nuccore + nucest + nucgss
#
# format (rettype):
@@ -579,11 +581,11 @@
end
# Retrieve nucleotide sequence entries by given IDs using E-Utils
# (efetch).
#
- # * http://eutils.ncbi.nlm.nih.gov/entrez/query/static/efetchseq_help.html
+ # * https://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4.EFetch
# nucleotide = nuccore + nucest + nucgss
#
# format (rettype):
# * native all but Gene ASN Default format for viewing sequences
# * fasta all sequence FASTA view of a sequence
@@ -641,11 +643,11 @@
end
# Retrieve protein sequence entries by given IDs using E-Utils
# (efetch).
#
- # * http://eutils.ncbi.nlm.nih.gov/entrez/query/static/efetchseq_help.html
+ # * https://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4.EFetch
# protein
#
# format (rettype):
# * native all but Gene ASN Default format for viewing sequences
# * fasta all sequence FASTA view of a sequence
@@ -697,11 +699,11 @@
Bio::NCBI::REST.efetch(ids, opts)
end
# Retrieve PubMed entries by given IDs using E-Utils (efetch).
#
- # * http://eutils.ncbi.nlm.nih.gov/entrez/query/static/efetchlit_help.html
+ # * https://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4.EFetch
#
# == Usage
#
# Bio::NCBI::REST::EFetch.pubmed(15496913)
# Bio::NCBI::REST::EFetch.pubmed("15496913,11181995")
@@ -739,11 +741,11 @@
Bio::NCBI::REST.efetch(ids, opts)
end
# Retrieve PubMed Central entries by given IDs using E-Utils (efetch).
#
- # * http://eutils.ncbi.nlm.nih.gov/entrez/query/static/efetchlit_help.html
+ # * https://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4.EFetch
#
# == Usage
#
# Bio::NCBI::REST::EFetch.pmc(1360101)
# Bio::NCBI::REST::EFetch.pmc("1360101,534663")
@@ -774,11 +776,11 @@
Bio::NCBI::REST.efetch(ids, opts)
end
# Retrieve journal entries by given IDs using E-Utils (efetch).
#
- # * http://eutils.ncbi.nlm.nih.gov/entrez/query/static/efetchlit_help.html
+ # * https://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4.EFetch
#
# == Usage
#
# Bio::NCBI::REST::EFetch.journal(21854)
#
@@ -809,11 +811,11 @@
Bio::NCBI::REST.efetch(ids, opts)
end
# Retrieve OMIM entries by given IDs using E-Utils (efetch).
#
- # * http://eutils.ncbi.nlm.nih.gov/entrez/query/static/efetchlit_help.html
+ # * https://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4.EFetch
#
# == Usage
#
# Bio::NCBI::REST::EFetch.omim(143100)
#
@@ -847,10 +849,10 @@
Bio::NCBI::REST.efetch(ids, opts)
end
# Retrieve taxonomy entries by given IDs using E-Utils (efetch).
#
- # * http://eutils.ncbi.nlm.nih.gov/entrez/query/static/efetchtax_help.html
+ # * https://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4.EFetch
#
# == Usage
#
# Bio::NCBI::REST::EFetch.taxonomy(42241)
#