Convert specified columns of a marker table to HTML links.
Source:R/markers.R
add_marker_table_links.Rd
Convert specified columns of a marker table to HTML links.
Usage
add_marker_table_links(
df,
links = list(list(colname_target = "ENSEMBL", colname_source = "ENSEMBL", template_url
= "https://www.ensembl.org/{ensembl_species}/Gene/Summary?g={id}"),
list(colname_target = "ENTREZID", colname_source = "ENTREZID", template_url =
"https://www.ncbi.nlm.nih.gov/gene/{id}"), list(colname_target = "SYMBOL",
colname_source = "SYMBOL", template_url =
"https://www.genecards.org/cgi-bin/carddisp.pl?gene={id}")),
ensembl_species = "Homo_sapiens"
)
Arguments
- df
A dataframe-like object.
- links
A list of named lists. Each named list has three items:
colname_target
: which column indf
will be converted to link.colname_source
: which column indf
will be used as data source.template_url
: URL template for link where{id}
will be replaced by values incolname_source
column ofdf
. ForENSEMBL
column is also used theensembl_species
parameter (see the default value oflinks
).
- ensembl_species
A character scalar: ID/name of ENSEMBL species.