No release in over 3 years
Low commit activity in last 3 years
A PubMed searching library with more features than BioRuby
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

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.