Converts between Ensembl, Symbol, and Entrez gene IDs using a reference table.
Supports both character vectors and data.frame columns. Automatically loads
species-specific reference data from data/, or downloads if unavailable.
convert_gene_id(
query,
from = "symbol",
to = c("ensembl_id", "entrez_id"),
species = c("human", "mouse"),
query_col = NULL,
ref_table = NULL,
keep_na = FALSE,
preview = TRUE
)A data.frame containing original and converted columns.
Character vector or data.frame to convert.
Source ID type (e.g., "symbol", "ensembl_id", "entrez_id").
Target ID type(s). Supports multiple.
Either "human" or "mouse". Default "human".
If query is a data.frame, the column name to convert.
Optional reference table.
Logical. Whether to keep unmatched rows. Default: FALSE.
Logical. Whether to preview output. Default: TRUE.