Entering edit mode
3.0 years ago
Abdullah
▴
10
Hello everyone,
I am having trouble converting gene names into Ensemble IDs using biomaRt and would appreciate any help.
I have a list of 2000 genes names that I need Ensemble IDs for. When I run the following commands it gives me an empty data frame.
require('biomaRt')
mart <- useMart('ENSEMBL_MART_ENSEMBL')
mart <- useDataset('hsapiens_gene_ensembl', mart)
ght = Markers$gene
# Gene names as vector of 'character'
head(ght)
[1] "EVI2A" "CDC42EP3" "ITGB2" "ARHGEF19" "PTH1R" "EPB41L2"
annotLookup <- getBM(mart = mart,
values = 'ght',
filters = 'external_gene_name',
attributes = c('ensembl_gene_id_version',
'ensembl_gene_id',
'external_gene_name',
'wikigene_name'),
uniqueRows = TRUE)
Can someone let me know where I am going wrong ? Thank You
That solved it. Thank You. I feel embarrassed but it is what it is ! Appreciate the help
My colleague uses a "coding bear" for this. A coding bear is basically a teddy bear (other toys work too) that sits on your desk. When your code doesn't work, you sit and talk your coding bear through your code, explaining everything it does. You normally spot these kinds of errors when explaining it to a coding bear. I do strongly recommend keeping a coding bear for a home-working environment though, unless you can get your colleagues on board and get an office-wide coding bear.
Also known as rubber duck debugging :-)