Biomart error while convertint transcript ID.
1
0
Entering edit mode
7.0 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 ?

biomart • 1.5k views
ADD COMMENT
0
Entering edit mode
7.0 years ago
always_learning ★ 1.1k

Thanks, Every one. I got the answer for this one actually my transcript was like

values<- c("NM_000350.2","NM_000016.5","NM_004924.4","NM_001106.3","NM_000022.2") and it was not maching with any of records so i just converted this into

values = c("NM_000350","NM_000016","NM_004924","NM_001106.3","NM_000022") so I removed all version information on this. Here is my complete script if some want to use that:

library("biomaRt")
library("tidyr")
ensembl<-  useMart("ensembl", dataset="hsapiens_gene_ensembl")
value =read.csv("/Users/nsyed/Refseq.txt", strip.white=TRUE)
colnames(value) = c("name")
values = separate(data = value, col = name, into = c("left", "right"), sep = "\\.")
valuesleft <-  as.vector(values$left)
nameTranscript <- getBM(attributes=c("refseq_mrna", "ensembl_gene_id", "hgnc_symbol"), filters = "refseq_mrna", values = valuesleft, mart= ensembl)
write.table(nameTranscript, "nameTranscript.txt", row.names = FALSE, quote= FALSE)
ADD COMMENT

Login before adding your answer.

Traffic: 1780 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6