convert.bm() is a wrapper for get.bm() which in turn makes use of getBM() from the biomaRt package.
It takes a matrix or data frame with the IDs to be converted in one column or as row names as input and returns a data frame with additional
annotations after cleaning the fetched annotations and merging them with the input data frame.
convert.bm(
dat,
id = "ID",
biom.data.set = c("human", "mouse"),
biom.mart = c("ensembl", "mouse", "snp", "funcgen", "plants"),
host = "https://www.ensembl.org",
biom.filter = "ensembl_gene_id",
biom.attributes = c("ensembl_gene_id", "hgnc_symbol", "description"),
biom.cache = rappdirs::user_cache_dir("biomaRt"),
use.cache = TRUE,
sym.col = "hgnc_symbol",
rm.dups = FALSE,
verbose = FALSE
)A data frame with the retrieved information.
matrix or data.frame. Matrix or data frame with the ids to be converted in a column or as row names.
character. Name of the column with the ids to be converted, special name "rownames" will use the row names.
character of length one. Biomart data set to use.
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.
character. Name of the column in the query result with gene symbols.
logical. Should duplicated input IDs (biom.filter) be removed from the result?
(logical). Should verbose output be written to the console? Defaults to FALSE.
Vidal Fey
Wrapped around `get.bm`.
getBM
if (FALSE) {
dat <- data.frame(ID=c("ENSG00000111199", "ENSG00000134121", "ENSG00000176102", "ENSG00000171611"))
bm <- convert.bm(dat)
bm
}
Run the code above in your browser using DataLab