Convert specified columns of a marker table to HTML links.
Source:R/markers.R
add_marker_table_links.RdConvert 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 indfwill be converted to link.colname_source: which column indfwill be used as data source.template_url: URL template for link where{id}will be replaced by values incolname_sourcecolumn ofdf. ForENSEMBLcolumn is also used theensembl_speciesparameter (see the default value oflinks).
- ensembl_species
A character scalar: ID/name of ENSEMBL species.