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.

References

Wei et al. (2024). PubTator 3.0: an AI-powered literature resource for unlocking biomedical knowledge. Nucleic Acids Research 52(W1), W540-W546. doi:10.1093/nar/gkae235

Service documentation: https://www.ncbi.nlm.nih.gov/research/pubtator3/

Examples

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