Type: Package
Title: Create Hyperlinks to Biological Databases and Resources
Description: Generate urls and hyperlinks to commonly used biological databases and resources based on standard identifiers. This is primarily useful when writing dynamic reports that reference things like gene symbols in text or tables, allowing you to, for example, convert gene identifiers to hyperlinks pointing to their entry in the 'NCBI' Gene database. Currently supports 'NCBI' Gene, 'PubMed', Gene Ontology, 'KEGG', CRAN and Bioconductor.
Version: 0.1.8
License: MIT + file LICENSE
Encoding: UTF-8
Imports: rentrez, xml2, DBI, RMySQL, glue, memoise
Suggests: testthat, lintr, httr, covr
RoxygenNote: 7.2.3
NeedsCompilation: no
Packaged: 2023-08-21 17:16:57 UTC; aaronwolen
Author: Aaron Wolen [aut, cre]
Maintainer: Aaron Wolen <aaron@wolen.com>
Repository: CRAN
Date/Publication: 2023-08-21 20:30:02 UTC

Description

Generate urls and hyperlinks to commonly used biological databases and resources based on standard identifiers. This is primarily useful when writing dynamic reports that reference things like gene symbols in text or tables, allowing you to, for example, convert gene identifiers to hyperlinks pointing to their entry in the 'NCBI' Gene database. Currently supports 'NCBI' Gene, 'PubMed', Gene Ontology, 'KEGG', CRAN and Bioconductor.

Author(s)

Maintainer: Aaron Wolen aaron@wolen.com


Description

Convert a bare url to a valid hyperlink formatted for a Markdown, HTML or LaTeX document.

Usage

build_link(url, text = NULL, title = NULL, format = "markdown")

Arguments

url

URL where you want the link to point

text

displayed text

title

link title, often used in tooltips

format

generate links using "html", "markdown" or "latex" syntax

Examples

build_link("https://r-project.org", "R", "The R Project")

Description

These resource-specific functions return a hyperlink to the relevant online database/resource based on the provided identifier (id).

Usage

link_go(id, text = id, title = NULL, format = "html")

link_kegg(id, text = id, title = NULL, format = "html")

link_pubmed(id, text = id, title = NULL, format = "html")

link_entrez(id, text = id, title = NULL, format = "html")

link_cran(id, text = id, title = NULL, format = "html")

link_bioc(id, text = id, title = NULL, format = "html")

Arguments

id

valid identifier for the relevant online database

text

displayed text

title

link title, often used in tooltips

format

generate links using "html", "markdown" or "latex" syntax

Functions

Link Customization

By default the hyperlinked text is just the id, so link_pubmed("22066989") becomes 22066989. The text argument allows you to customize the hyperlinked text. To display a hyperlinked URL (e.g., https://www.r-project.org), set text = NULL.

Data Tags

For a few supported online resources, specially formatted tags can be passed to the text and title arguments to display live data obtained from the corresponding resource. For example, link_entrez("4609", text = "<symbol>"), produces MYC, displaying the gene symbol rather than the Entrez ID. We could also set title = "<description>" to produce a link that reveals the gene's description when a user hovers over the link (using a supported browser).

Currently supported data tags:

NCBI Entrez:

NCBI PubMed:

Gene Ontology:

References

Examples

link_go("GO:0005539", format = "html")
link_kegg("hsa04915", format = "html")
link_pubmed("22066989", format = "html")
link_entrez("4609", format = "html")


Construct urls to online resources

Description

These resource-specific functions return a bare url (i.e., not a hyperlink) to the relevant online database/resource based on the provided identifier.

Usage

url_go(id)

url_kegg(id)

url_pubmed(id)

url_entrez(id)

url_cran(id)

url_bioc(id)

Arguments

id

valid identifier for the relevant online database

Functions

Examples

# gene ontology url
url_go("GO:0005539")

# KEGG pathway url
url_kegg("hsa04915")

# PubMed article url
url_pubmed("23193287")