View source: R/convert_features.R
convert_names | R Documentation |
This is a conversion function for gene names. It takes a vector of gene names and returns their corresponding synonyms (e.g. gene IDs) from a dictionary.
convert_names(names = NULL, dict = NULL, from = 1, to = 2)
names |
Character to convert |
dict |
Data frame of gene synonyms (e.g. features.tsv) |
from |
Column containing the names. Can be index (integer) or column name (character). |
to |
Column containing the desired synonyms. Can be index (integer) or column name (character). |
Character with synonyms
# Convert human CD3D from gene name to ENSEMBL ID
features <- data.frame('name'="CD3D", 'id'="ENSG00000167286")
convert_names("CD3D", features, 1, 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.