These resource-specific functions return a hyperlink to the relevant online
database/resource based on the provided identifier (id
).
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")
valid identifier for the relevant online database
displayed text
link title, often used in tooltips
generate links using "html"
, "markdown"
or "latex"
syntax
link_go
: to Gene Ontology Consortium
link_kegg
: to KEGG Pathway Database
link_pubmed
: to PubMed based on PMID (PubMed identifier)
link_entrez
: to NCBI's database for gene-specific information based
on Entrez ID
link_cran
: for R packages available from CRAN
link_bioc
: for R packages available from Bioconductor
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
.
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:
symbol
: Gene symbol
description
: Gene description
location
: Cytogenetic location
NCBI PubMed:
title
: Article title
year
: Publication year
journal
: Journal title
Gene Ontology:
name
: GO term name
definition
: GO term definition
link_go("GO:0005539", format = "html")
link_kegg("hsa04915", format = "html")
link_pubmed("22066989", format = "html")
link_entrez("4609", format = "html")
Run the code above in your browser using DataLab