I'm not very expert with R but I'm trying to learn ho to use the biomaRt package to find genes located in my regions of interest.
I've managed to produce a valid output using the ensembl dataset with the following code:
> mart= useMart(biomart="ensembl",dataset="hsapiens_gene_ensembl")
> results <- getBM(attributes =c("chromosome_name","start_position","end_position",
"band","hgnc_symbol","entrezgene"), filters = c("chromosome_name","start","end"),
values = list(1,226767027,227317593), mart=mart)
I know that the "entrezgene" corresponds to the NCBI gene ID, but I would like to have the GENE NAME from NCBI.
Is there a way to use biomaRt connected to NCBI database and retrieve that informartion?
Thank you in advanced.
Type listAttributes(mart)
to see the list of attributes you can select
Regarding gene name, I think you might want external_gene_id
but there are other gene name options as well.