.empty_link_function | R Documentation |
When listing features in an interactive table, it's often useful to link the feature to an external webpage that has more information about that feature. We include a series of functions to link entrez or ensembl id's to different web pages. The data.frame needs to have a 'feature_id' column which will be used to link out to the reference page.
If 'link.col' is not found in the data.frame 'x' then the provided functions are NO-OPS, ie. the same data.frame is simply returned.
.empty_link_function(x, link.col = NULL)
ncbi.entrez.link(x, link.col = "symbol")
genecards.entrez.link(x, link.col = "symbol")
x |
a data.frame from 'SparrowResult' |
link.col |
the column in 'x' that should be transformed to a link |
These were implemented a while ago when our world focused on entrez id's, we need to update.
a modified 'x' with an html link in 'link.col'.
ncbi.entrez.link
: links gene to ncbi web site by entrez id.
genecards.entrez.link
: links a gene row to the genecards website
by entrez id
sr <- sparrow::exampleSparrowResult()
lfc <- sparrow::logFC(sr)
# the symbol column in `lfhc` will be a linked to the entrez web page for
# each gene
linked <- ncbi.entrez.link(lfc, link.col = "symbol")
head(linked[["symbol"]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.