get_HGNC | R Documentation |
This is a simple wrapper for the more flexible function convert_gene_names
. I created it to
facilitate compatability with old code. It simply calls convert_gene_names
with the hard-coded
specification to return HGNC symbols, and some variable name translation.
It converts a vector of gene identifiers to HGNC gene symbols. The type of the input identifiers is
specified using from
. By default, this function uses the annotables
package. If annotables
is not installed, or if the user specifies not to use it, biomaRt
is used instead. Genes can be
filtered by type; any genes not matching the specified type(s) will return NA.
get_HGNC(genes, from = "ensgene", type = NULL, use_annotables = TRUE)
genes |
character vector containing gene identifiers to convert |
from |
the gene identifier class to convert from. Must match a corresponding variable in |
type |
(optional) character vector containing types of genes to retain. If provided, genes with biotype not matching elements of this vector return NA. If NULL, all genes are retained. |
use_annotables |
boolean, whether to use the annotables package. If annotables is not installed, the function defaults to using |
a vector of HGNC gene symbols, of length equivalent to the length of genes.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.