symbol_to_entrez | R Documentation |
Uses biomaRt
\insertCitebiomartdnapath
to map entrezgene IDs to gene symbols for a given species. The output of
this function can be used in rename_genes
.
symbol_to_entrez( x, species, symbol_name = NULL, dir_save = tempdir(), verbose = TRUE )
x |
A vector of gene symbols. |
species |
The species used to obtain the entrezgene IDs. For example: "Homo sapiens", "m musculus", "C. elegans", or "S cerevisiae". "Human" and "mouse" can also be used and will be converted to the correct species name. |
symbol_name |
The type of gene symbol to use. If NULL, then "hgnc_symbol"
is used for HGNC symbols, unless |
dir_save |
The directory to store annotation reference. Future
calls to this function will use the stored annotations. This speeds up the
operation and allows for reproducibility in the event that the |
verbose |
Set to FALSE to avoid messages. |
If entrezgene IDs are used in a dnapath_list
or dnapath
object, or a pathway list, then get_genes
can be used to
extract them and used for the x
argument here.
A data frame with two columns: the first contains the original gene symbols, and the second contains a corresponding entrezgene ID. If a gene symbol is not mapped to an entrezgene ID, the entrezgene ID is set to -1.
Internet connection is required to connect to biomaRt. If unavailable, the default biomart and default species contained in the package is used, but this may not match the desired species.
It is assumed that x
contains MGI symbols when the biomart species is
"Mus musculus" and HGNC symbols otherwise.
biomartdnapath
entrez_to_symbol
, get_genes
# Convert a set of gene symbols to entrezgene IDs. # Note that not all may have mapping (such as "MSX" in this example). gene_mat <- symbol_to_entrez(c("SOX2", "SEMA3E", "COL11A1", "UBB", "MSX"), species = "human")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.