convert_gene_names: Convert gene identifiers

View source: R/convert_gene_names.R

convert_gene_namesR Documentation

Convert gene identifiers

Description

Convert a vector of gene identifiers from one standard to another. The input type of the identifiers is specified using input_type, and the output type is specified using output_type. 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 biotype; any genes not matching the specified biotype(s) will return NA. Currently, support is only provided for human gene identifiers.

Usage

convert_gene_names(
  genes,
  input_type,
  output_type,
  biotype = NULL,
  use_annotables = TRUE
)

Arguments

genes

character vector containing gene identifiers to convert

input_type

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

output_type

the gene identifier type to convert to Must match a corresponding identifier type in annotables or biomaRt.

biotype

(optional) character vector containing biotypes 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

logical, whether to use the annotables package. If annotables is not installed, the function defaults to using biomaRt.

Value

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


BenaroyaResearch/RNAseQC documentation built on April 19, 2024, 7:38 p.m.