Skip to contents

[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")
#> [1] "11185" "10677"