get_HGNC: Convert gene identifiers to HGNC gene symbols

View source: R/get_HGNC.R

get_HGNCR Documentation

Convert gene identifiers to HGNC gene symbols

Description

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.

Usage

get_HGNC(genes, from = "ensgene", type = NULL, use_annotables = TRUE)

Arguments

genes

character vector containing gene identifiers to convert

from

the gene identifier class to convert from. Must match a corresponding variable in annotables or biomaRt.

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 biomaRt.

Value

a vector of HGNC gene symbols, of length equivalent to the length of genes.


mjdufort/RNAseQC documentation built on April 19, 2024, 3:13 p.m.