pt_select: Retrieve data from the PubTator database.

Description Usage Arguments Value Examples

View source: R/pt_select.R

Description

Retrieve data from the PubTator database.

Usage

1
2
3
4
5
6
7
8
pt_select(
  db_con,
  table_name,
  columns = NULL,
  keys = NULL,
  keytype = NULL,
  limit = Inf
)

Arguments

db_con

A connection to the PubTator sqlite database, as created via pubator_connector.

table_name

The name of the table of interest. Valid tables can be found using pt_tables. Capitalization does not matter.

columns

A character vector of the names of the columns of interest. Capitalization does not matter.

keys

A vector specifying which values must be in the keytype column to enable retrieval. No filtering is performed if keys = NULL.

keytype

The column in which the keys should be searched for.

limit

The maximum number of rows the query should return. All rows passing filtering (if any) are returned if limit = Inf.

Value

A data.frame.

Examples

1
2
3
4
5
6
7
8
9
db_con <- pt_connector(pt_path)
pt_select(
  db_con,
  "gene",
  columns = c("ENTREZID","Resource","MENTIONS","PMID"),
  keys = c("7356", "4199", "7018"),
  keytype = "ENTREZID",
  limit = 10
)

pubtatordb documentation built on Dec. 1, 2019, 1:17 a.m.