h_strip_prefix: Stripping Prefix from Gene IDs

View source: R/connections.R

h_strip_prefixR Documentation

Stripping Prefix from Gene IDs

Description

[Experimental]

This helper function removes the prefix and possible delimiter from a vector of gene IDs, such that only the digits are returned.

Usage

h_strip_prefix(gene_ids, prefix)

Arguments

gene_ids

(character)
original gene IDs including prefix and optional delimiter before the digits.

prefix

(string)
common prefix to be stripped away from gene_ids.

Value

Character vector that contains only the digits for each gene ID.

Note

This is currently used to strip away the GeneID prefix from Entrez gene IDs so that they can be queried from BioMart

Examples

h_strip_prefix(c("GeneID:11185", "GeneID:10677"), prefix = "GeneID")

insightsengineering/hermes documentation built on Dec. 15, 2024, 8:07 a.m.