This helper function removes the prefix and possible delimiter from a vector of gene IDs, such that only the digits are returned.
h_strip_prefix(gene_ids, prefix)
(character
)
original gene IDs including prefix and optional
delimiter before the digits.
(string
)
common prefix to be stripped away from gene_ids
.
Character vector that contains only the digits for each gene ID.
This is currently used to strip away the GeneID
prefix from Entrez gene IDs
so that they can be queried from BioMart
h_strip_prefix(c("GeneID:11185", "GeneID:10677"), prefix = "GeneID")
#> [1] "11185" "10677"