pubtatordb v0.1.3

0

Monthly downloads

0th

Percentile

Create and Query a Local 'PubTator' Database

'PubTator' <https://www.ncbi.nlm.nih.gov/CBBresearch/Lu/Demo/PubTator/> is a National Center for Biotechnology Information (NCBI) tool that enhances the annotation of articles on PubMed <https://www.ncbi.nlm.nih.gov/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.

Readme

pubtatordb

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.

Installation

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

install.packages("pubtatordb")

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

install.packages("devtools")
devtools::install_github("MAMC-DCI/pubtatordb")

Example

Querying is only four steps away:

# Load the package.
library(pubtatordb)

# Download the data.
download_pt(getwd())

# Create the database.
pubtator_path <- file.path(getwd(), "PubTator")
pt_to_sql(
  pubtator_path,
  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.
pt_select(
  db_con,
  "gene",
  columns = NULL,
  keys = NULL,
  keytype = NULL,
  limit = 5
)

Disclaimer

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.

Functions in pubtatordb

Name Description
make_pubtator_sqlite_path Make a path to the PubTator sqlite file.
download_pt Download PubTator data via ftp.
pt_to_sql Create sqlite database from the pubtator data.
pt_select Retrieve data from the PubTator database.
pt_tables List the tables in the PubTator sqlite database
pubtator_ftp_url NCBI's ftp url definition for PubTator.
pubtator_tables Table and dataset definitions
pt_columns List the column names for a table in the PubTator sqlite database
pt_connector Connect to pubtator.sqlite
pubtator_citations See the citations for PubTator
No Results!

Vignettes of pubtatordb

Name
pubtatordb.Rmd
No Results!

Last month downloads

Details

Type Package
License MIT + file LICENSE
Encoding UTF-8
LazyData true
VignetteBuilder knitr
RoxygenNote 6.1.1
NeedsCompilation no
Packaged 2019-03-13 15:35:56 UTC; mamcdci
Repository CRAN
Date/Publication 2019-03-13 16:00:03 UTC

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/pubtatordb)](http://www.rdocumentation.org/packages/pubtatordb)