h_get_annotation_biomart: Get Annotations from 'BioMart'

View source: R/connections.R

h_get_annotation_biomartR Documentation

Get Annotations from BioMart

Description

[Experimental]

Helper function to query annotations from biomaRt, for cleaned up gene IDs of a specific ID variable and given biomaRt::Mart.

Usage

h_get_annotation_biomart(gene_ids, id_var, mart)

Arguments

gene_ids

(character)
gene IDs, e.g. 10329, i.e. already without the Entrez GeneID prefix, or ENSG00000241644 for Ensembl gene ID.

id_var

(string)
corresponding gene ID variable name in BioMart, i.e. entrezgene_id or ensembl_gene_id.

mart

(Mart)
given biomaRt::Mart object.

Value

A data frame with columns:

  • id_var (depending on what was used)

  • hgnc_symbol

  • entrezgene_description

  • chromosome_name

  • size

  • refseq_mrna

  • refseq_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)
}

insightsengineering/hermes documentation built on Sept. 19, 2024, 9:06 p.m.