Gene-ortholog backend using the offline babelgene package, which ships
precomputed orthologs between human and a range of model organisms. This is
the default backend for ortholog_genes().
Arguments
- features
A tibble of features with a gene column and a
.feature_idkey (supplied byortholog_genes()).- from, to
Source and target species (e.g.
"human","mouse","rat"). babelgene is human-centric, so model-to-model mappings (e.g. rat-to-mouse) are routed through human.- gene_col
Name of the gene-identifier column.
- id_type
One of
"symbol","entrez","ensembl".- cache
Optional path to a TSV file caching prior lookups. When given, a gene already in the file is read from there instead of queried again, and a newly queried gene is appended for next time. The cache is shared across
from/to/id_typecombinations in one file.- ...
Passed to
babelgene::orthologs()(e.g.min_support,top).
Examples
if (requireNamespace("babelgene", quietly = TRUE)) {
feats <- tibble::tibble(gene = c("TP53", "MYC"), .feature_id = 1:2)
out <- ortholog_babelgene(
feats,
from = "human",
to = "mouse",
gene_col = "gene",
id_type = "symbol"
)
out$mapped
}
#> # A tibble: 2 × 3
#> gene .feature_id ortholog
#> <chr> <int> <chr>
#> 1 TP53 1 Trp53
#> 2 MYC 2 Myc