Create and Query a Local 'PubTator' Database

'PubTator' <> is a National Center for Biotechnology Information (NCBI) tool that enhances the annotation of articles on PubMed <>. It makes it possible to rapidly identify potential relationships between genes or proteins using text mining techniques. In contrast, manually searching for and reading the annotated articles would be very time consuming. 'PubTator' offers both an online interface and a RESTful API, however, neither of these approaches are well suited for frequent, high-throughput analyses. The package 'pubtatordb' provides a set of functions that make it easy for the average R user to download 'PubTator' annotations, create, and then query a local version of the database.

CRAN_Status_Badge Travis-CI Build Status Build status Coverage Status

The goal of pubtatordb is to allow users to create and query a local version of the PubTator database. PubTator provides detailed annotations of abstracts found on PubMed. It is therefore very useful for directing research questions. While PubTator does provide an API, the use of a local database is more appropriate for high-throughput analyses. pubtatordb provides the tools necessary to download, setup, and query such a database.


You can install the released version of pubtatordb from CRAN with:


The version on GitHub can be downloaded using the devtools package with:



Querying is only four steps away:

# Load the package.
# Download the data.
# Create the database.
pubtator_path <- file.path(getwd(), "PubTator")
  skip_behavior = FALSE,
  remove_behavior = TRUE,
  db_from_scratch = TRUE
# Create a connection to the database.
db_con <- pt_connector(pubtator_path)
# Query the data.
  columns = NULL,
  keys = NULL,
  keytype = NULL,
  limit = 5


The views expressed are those of the author(s) and do not reflect the official policy of the Department of the Army, the Department of Defense or the U.S. Government.


pubtatordb 0.1.3

  • Examples for unexported functions were removed.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.1.4 by Zachary Colburn, a year ago

Browse source code at

Authors: Zachary Colburn [aut, cre] , Madigan Army Medical Center - Department of Clinical Investigation [cph, fnd]

Documentation:   PDF Manual  

MIT + file LICENSE license

Imports DBI, R.utils, RSQLite, assertthat, dplyr, readr

Suggests covr, testthat, knitr, rmarkdown

See at CRAN