library("biomaRt")
listMarts()
ensembl <- useMart("ensembl",dataset="hsapiens_gene_ensembl")
filters = listFilters(ensembl)
entrezgene = ("3098","728642|982")
genes <- getBM(filters="entrezgene_id", attributes=c("ensembl_gene_id","entrezgene_id"), values=entrezgene, mart=ensembl)
print(genes)
Thanks a lot for the response. I have tired the above in R. When entrezgene = ("3098") the code works fine.
When the input is changed to entrezgene = ("3098","728642|982") , the following error occurs
Error: unexpected ',' in "entrezgene = ("3098","
Execution halted
Also, I am not sure how to map cases like this ""728642|982" which is present in my input data containing list of entrez gene ids.
Any suggestions?