Question: Biomart error while convertint transcript ID.
0
gravatar for always_learning
2.5 years ago by
always_learning1000
Doha, Qatar
always_learning1000 wrote:
         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 • 718 views
ADD COMMENTlink modified 2.5 years ago • written 2.5 years ago by always_learning1000
0
gravatar for always_learning
2.5 years ago by
always_learning1000
Doha, Qatar
always_learning1000 wrote:

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 COMMENTlink modified 2.5 years ago • written 2.5 years ago by always_learning1000
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 3547 users visited in the last hour