convert_names: Convert feature names

View source: R/convert_features.R

convert_namesR Documentation

Convert feature names

Description

This is a conversion function for gene names. It takes a vector of gene names and returns their corresponding synonyms (e.g. gene IDs) from a dictionary.

Usage

convert_names(names = NULL, dict = NULL, from = 1, to = 2)

Arguments

names

Character to convert

dict

Data frame of gene synonyms (e.g. features.tsv)

from

Column containing the names. Can be index (integer) or column name (character).

to

Column containing the desired synonyms. Can be index (integer) or column name (character).

Value

Character with synonyms

Examples

# Convert human CD3D from gene name to ENSEMBL ID
features <- data.frame('name'="CD3D", 'id'="ENSG00000167286")
convert_names("CD3D", features, 1, 2)


OliverDietrich/SeuratHelper documentation built on Jan. 20, 2024, 2:57 a.m.