Entering edit mode
7.6 years ago
always_learning
★
1.1k
library("biomaRt")
ensembl<- useMart("ensembl", dataset="hsapiens_gene_ensembl")
value =read.csv("Refseq.txt", strip.white=TRUE)
colnames(value) = c("name")
values <- as.vector(value$name)
getBM(attributes=c("refseq_mrna", "ensembl_gene_id", "hgnc_symbol"), filters = "refseq_mrna", values = values,
mart= ensembl)
and I am getting below error .
[1] refseq_mrna ensembl_gene_id hgnc_symbol
<0 rows> (or 0-length row.names)
While its working fine if I am using something like below :
values<- c("NM_001101", "NM_001256799", "NM_000594")
getBM(attributes=c("refseq_mrna", "ensembl_gene_id", "hgnc_symbol"), filters = "refseq_mrna", values = values,
mart= ensembl)
any idea about this problem ?