Skip to content

rschenk/pubmed_search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pubmed_search

PubmedSearch is PubMed search wrapper. It provides more (obscure) features than BioRuby’s.

If all you need is a list of PubMed IDs, then use BioRuby. If you need more information from the eSearchResponse, then check this out.

Features

In addition to returning the list of PubMed IDs, it will give you more information about your eSearch Response:

Additionally, PubmedSearch can automatically fetch more results if the list of PubMed IDs is less than the Count. For instance, PubMed automatically caps your retmax to 100,000. However, a search for “Mus musculus” will return over 950,000 results. In this situation, PubmedSearch will automatically perform the 10 eSearches required to load the entire set of PubMed IDs, and return it to you as a single result set. This functionality is disabled by default, but can be turned on via an option.

Synopsis

Without the load_all_pmids functionality (default)

results = PubmedSearch.search "Mus musculus"

results.pmids.length
#=> 100000

results.count
#=> 951134

results.exploded_mesh_terms
#=> #<Set: {"mice"}>

With the load_all_pmids functionality

results = PubmedSearch.search "Mus musculus", :load_all_pmids => true

results.pmids.length
#=> 951134

results.count
#=> 951134

Requirements

  • libxml-ruby - sudo gem install libxml-ruby

  • simple_uri_template - sudo gem install rschenk-simple_uri_template

Copyright © 2009 Ryan Schenk. See LICENSE for details.

About

A PubMed searching library with more features than BioRuby

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages