Helper function to query annotations from biomaRt, for cleaned up gene IDs of
a specific ID variable and given biomaRt::Mart.
h_get_annotation_biomart(gene_ids, id_var, mart)(character)
gene IDs, e.g. 10329, i.e. already
without the Entrez GeneID prefix, or ENSG00000241644 for Ensembl gene ID.
(string)
corresponding gene ID variable name in BioMart,
i.e. entrezgene_id or ensembl_gene_id.
(Mart)
given biomaRt::Mart object.
A data frame with columns:
id_var (depending on what was used)
hgnc_symbol
entrezgene_description
chromosome_name
size
refseq_mrna
refseq_peptide
if (interactive()) {
mart <- biomaRt::useMart("ensembl", dataset = "hsapiens_gene_ensembl")
h_get_annotation_biomart(c("11185", "10677"), id_var = "entrezgene_id", mart = mart)
}