Module | Bio::NCBI::REST::ESearch::Methods
In: | lib/bio/io/ncbirest.rb

Search database entries by given keywords using E-Utils (esearch).

- eutils.ncbi.nlm.nih.gov/entrez/query/static/esearch_help.html

     sequences = gene + genome + nucleotide + protein + popset + snp
     nucleotide = nuccore + nucest + nucgss

- 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
     taxonomy toolkit unigene unists

## Usage

     Bio::NCBI::REST::ESearch.search("nucleotide", "tardigrada")
     Bio::NCBI::REST::ESearch.count("nucleotide", "tardigrada")

     Bio::NCBI::REST::ESearch.nucleotide("tardigrada")
     Bio::NCBI::REST::ESearch.popset("aldh2")
     Bio::NCBI::REST::ESearch.taxonomy("tardigrada")
     Bio::NCBI::REST::ESearch.pubmed("tardigrada", "reldate" => 365)
     Bio::NCBI::REST::ESearch.pubmed("mammoth mitochondrial genome")
     Bio::NCBI::REST::ESearch.pmc("Indonesian coelacanth genome Latimeria menadoensis")
     Bio::NCBI::REST::ESearch.journal("bmc bioinformatics")

     ncbi = Bio::NCBI::REST::ESearch.new
     ncbi.search("nucleotide", "tardigrada")
     ncbi.count("nucleotide", "tardigrada")

     ncbi.nucleotide("tardigrada")
     ncbi.popset("aldh2")
     ncbi.taxonomy("tardigrada")
     ncbi.pubmed("tardigrada", "reldate" => 365)
     ncbi.pubmed("mammoth mitochondrial genome")
     ncbi.pmc("Indonesian coelacanth genome Latimeria menadoensis")
     ncbi.journal("bmc bioinformatics")

Arguments:

- term: search keywords (required)
- limit: maximum number of entries to be returned (0 for unlimited)
- hash: hash of E-Utils option

Returns: | array of entry IDs or a number of results

### Methods

count est gss journal method_missing search

### Public Instance methods

count(db, term, hash = {})

count("nucleotide", "tardigrada") count("pubmed", "tardigrada") count("journals", "bmc")

[Source]

         # File lib/bio/io/ncbirest.rb, line 435
    435:       def count(db, term, hash = {})
    436:         opts = { "db" => db }
    437:         opts.update(hash)
    438:         Bio::NCBI::REST.esearch_count(term, opts)
    439:       end

est(*args)

alias for "nucest"

[Source]

         # File lib/bio/io/ncbirest.rb, line 458
    458:       def est(*args)
    459:         self.search("nucest", *args)
    460:       end

gss(*args)

alias for "nucgss"

[Source]

         # File lib/bio/io/ncbirest.rb, line 463
    463:       def gss(*args)
    464:         self.search("nucgss", *args)
    465:       end

journal(*args)

alias for journals

[Source]

         # File lib/bio/io/ncbirest.rb, line 453
    453:       def journal(*args)
    454:         self.search("journals", *args)
    455:       end

method_missing(*args)

nucleotide("tardigrada") nucleotide("tardigrada", 0) pubmed("tardigrada") pubmed("tardigrada", 5) pubmed("tardigrada", "reldate" => 365) pubmed("tardigrada", 5, "reldate" => 365) pubmed("tardigrada", {"reldate" => 365}, 5)

[Source]

         # File lib/bio/io/ncbirest.rb, line 448
    448:       def method_missing(*args)
    449:         self.search(*args)
    450:       end

search(db, term, *args)

search("nucleotide", "tardigrada") search("nucleotide", "tardigrada", 0) # unlimited search("pubmed", "tardigrada") search("pubmed", "tardigrada", 5) # first five search("pubmed", "tardigrada", "reldate" => 365) # within a year search("pubmed", "tardigrada", 5, "reldate" => 365) # combination search("pubmed", "tardigrada", {"reldate" => 365}, 5) # combination 2 search("journals", "bmc", 10)

[Source]

         # File lib/bio/io/ncbirest.rb, line 416
    416:       def search(db, term, *args)
    417:         limit = 100
    418:         hash = {}
    419:         args.each do |arg|
    420:           case arg
    421:           when Hash
    422:             hash.update(arg)
    423:           else
    424:             limit = arg.to_i
    425:           end
    426:         end
    427:         opts = { "db" => db }
    428:         opts.update(hash)
    429:         Bio::NCBI::REST.esearch(term, opts, limit)
    430:       end

[Validate]