Skip to contents

Prefers the Entrez id, which names the gene exactly, and falls back to the symbol. Exported because the token is what appears in source_id, so a caller reconstructing a citation needs the same rule.

Usage

pubtator_entity(symbol = NULL, entrez = NULL)

Arguments

symbol

A gene symbol.

entrez

An NCBI Gene id. Used in preference to symbol when present.

Value

A single string such as "@GENE_7157", or NULL when neither argument is usable.

Examples

pubtator_entity("TP53", 7157)
#> [1] "@GENE_7157"
pubtator_entity("TP53")
#> [1] "@GENE_TP53"