This helper function removes the prefix and possible delimiter from a vector of gene IDs, such that only the digits are returned.
Arguments
- gene_ids
(
character
)
original gene IDs including prefix and optional delimiter before the digits.- prefix
(
string
)
common prefix to be stripped away fromgene_ids
.
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"