pt_select {pubtatordb}R Documentation

Retrieve data from the PubTator database.

Description

Retrieve data from the PubTator database.

Usage

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


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
)


[Package pubtatordb version 0.1.4 Index]