Just adding for other users who land on this page.
Another solution is to simply generate a 'master' table in biomaRt:
require('biomaRt')
mart <- useMart('ENSEMBL_MART_ENSEMBL')
mart <- useDataset('hsapiens_gene_ensembl', mart)
Check that it is indeed GRCh38:
searchDatasets(mart = mart, pattern = 'hsapiens')
dataset description version
78 hsapiens_gene_ensembl Human genes (GRCh38.p13) GRCh38.p13
Now generate the table:
annotLookup <- getBM(
mart = mart,
attributes = c(
'hgnc_symbol',
'ensembl_gene_id',
'refseq_mrna',
'refseq_ncrna',
'gene_biotype'),
uniqueRows = TRUE)
head(annotLookup)
hgnc_symbol ensembl_gene_id refseq_mrna refseq_ncrna gene_biotype
1 MT-TF ENSG00000210049 Mt_tRNA
2 MT-RNR1 ENSG00000211459 NR_137294 Mt_rRNA
3 MT-TV ENSG00000210077 Mt_tRNA
4 MT-RNR2 ENSG00000210082 NR_137295 Mt_rRNA
5 MT-TL1 ENSG00000209082 Mt_tRNA
6 MT-ND1 ENSG00000198888 protein_coding
Kevin