Helper function to query annotations from biomaRt, for cleaned up gene IDs of
a specific ID variable and given biomaRt::Mart.
Arguments
- gene_ids
(
character)
gene IDs, e.g.10329, i.e. already without theEntrezGeneIDprefix, orENSG00000241644forEnsemblgene ID.- id_var
(
string)
corresponding gene ID variable name inBioMart, i.e.entrezgene_idorensembl_gene_id.- mart
(
Mart)
givenbiomaRt::Martobject.
Value
A data frame with columns:
id_var(depending on what was used)hgnc_symbolentrezgene_descriptionchromosome_namesizerefseq_mrnarefseq_peptide
Examples
if (interactive()) {
mart <- biomaRt::useMart("ensembl", dataset = "hsapiens_gene_ensembl")
h_get_annotation_biomart(c("11185", "10677"), id_var = "entrezgene_id", mart = mart)
}
