Skip to content

Instantly share code, notes, and snippets.

@AmyOlex
Created September 18, 2018 15:00
Show Gist options
  • Save AmyOlex/464eeb540685e740b211cbde3e342bf5 to your computer and use it in GitHub Desktop.
Save AmyOlex/464eeb540685e740b211cbde3e342bf5 to your computer and use it in GitHub Desktop.
Map Ensemble gene IDs to Entrez gene IDs
## Make sure you have the development version of biomaRt installed. If not then run:
## BiocInstaller::biocLite('grimbough/biomaRt')
library(biomaRt)
mart = useEnsembl("ENSEMBL_MART_ENSEMBL")
mart=useMart(biomart="ensembl", dataset="hsapiens_gene_ensembl")
bmIDs = getBM(attributes=c('ensembl_gene_id','ensembl_transcript_id',
+ 'description',
+ 'chromosome_name',
+ 'start_position',
+ 'end_position',
+ 'strand','entrezgene'),mart = mart)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment