todisp2() uses Biomart by employing get.bm() to retrieve Gene Symbols for a set of Ensembl
Gene IDs. It is mainly meant as a fast way to convert IDs in standard gene expression analysis output to Symbols,
e.g., for visualisation, which is why the input ID type is hard coded to ENSG IDs. If Biomart is not available
the function can fall back to use convertId2() or a user-provided data frame with corresponding ENSG IDs and
Symbols.
todisp2(
ensg,
lab = NULL,
biomart = TRUE,
biom.data.set = "hsapiens_gene_ensembl",
biom.mart = "ensembl",
host = "https://www.ensembl.org",
biom.filter = "ensembl_gene_id",
biom.attributes = c("ensembl_gene_id", "hgnc_symbol"),
biom.cache = rappdirs::user_cache_dir("biomaRt"),
use.cache = TRUE,
verbose = FALSE
)A character vector of Gene Symbols.
(character). Vector of Ensemble Gene IDs. Other ID types are not yet supported.
(data.frame). A data frame with Ensembl Gene IDs as row names and Gene Symbols in the only column.
(logical). Should Biomart be used? Defaults to TRUE.
character of length one. Biomart data set to use. Defaults to 'hsapiens_gene_ensembl'
character vector. Biomart to use (uses the first element of the vector), defaults to "ensembl".
character of length one. Host URL.
character of length one. Name of biomart filter, i.e., type of query ids, defaults to "ensembl_gene_id".
character vector. Biomart attributes, i.e., type of desired result(s); make sure query id type is included!
character. Path name giving the location of the cache getBM() uses if use.cache=TRUE. Defaults to the value in the BIOMART_CACHE environment variable.
(logical). Should getBM() use the cache? Defaults to TRUE as in the getBM() function and is passed on to that.
(logical). Should verbose output be written to the console? Defaults to FALSE.
get.bm
if (FALSE) {
val <- c("ENSG00000111199", "ENSG00000134121", "ENSG00000176102", "ENSG00000171611")
sym <- todisp2(val)
sym
}
Run the code above in your browser using DataLab