add_marker_table_links: Convert specified columns of a marker table to HTML links.

View source: R/markers.R

add_marker_table_linksR Documentation

Convert specified columns of a marker table to HTML links.

Description

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 in df will be converted to link.

  • colname_source: which column in df will be used as data source.

  • template_url: URL template for link where {id} will be replaced by values in colname_source column of df. For ENSEMBL column is also used the ensembl_species parameter (see the default value of links).

ensembl_species

A character scalar: ID/name of ENSEMBL species.

Value

A modified df.


bioinfocz/scdrake documentation built on Jan. 29, 2024, 10:24 a.m.