bio_geneid: Function to switch Gene Ids

View source: R/bio_geneid.R

bio_geneidR Documentation

Function to switch Gene Ids

Description

This function switches gene (or snp) ids using biomart

Usage

bio_geneid(
  IDs,
  IDFrom = "ensembl_transcript_id",
  IDTo = "hgnc_symbol",
  mart = "ensembl",
  dataset = "hsapiens_gene_ensembl",
  attributes = c("chromosome_name", "start_position", "end_position")
)

Arguments

IDs

list of the Ids you want to convert

IDFrom

What format these IDs are in (default Ensembl)

IDTo

What format you want the IDs converted to (default gene names)

mart

The biomart to use. Typically, for humans you will want ensembl (default). Alternatives can be found at listEnsembl()

dataset

you want to use. To see the different datasets available within a biomaRt you can e.g. do: mart = useEnsembl('ENSEMBL_MART_ENSEMBL'), followed by listDatasets(mart).

attributes

list of variables you want output

Examples

IDs = c("TNF", "A1BG", "FOX3")
bio_geneid(IDs, IDFrom='hgnc_symbol', IDTo = 'ensembl_transcript_id')

KatrionaGoldmann/BioOutputs documentation built on May 21, 2022, 1:24 p.m.