Hello,
Thanks to a file containing a list of rsIDs, I want to retrieve the name of the gene and transcripts corresponding to each rsID. tool :
install.packages('BiocManager', repos='http://cran.us.r-project.org')
BiocManager::install(c("biomaRt"))
library(biomaRt)
Data <- read.delim("/Users/amandinelecerfdefer/Desktop/Modification_vcf/cut/rsID_origine.txt2.txt")
snpmart <-
useMart(biomart = "ENSEMBL_MART_SNP", dataset = "hsapiens_snp")
T1<-Sys.time()
T1
res <- getBM(
attributes = c(
"refsnp_id",
"ensembl_gene_stable_id",
"ensembl_transcript_stable_id"
),
filters = "snp_filter",
values = Data$rsID,
mart = snpmart,
uniqueRows = TRUE
)
T2<-Sys.time()
T2
write.csv(res, file = "/Users/amandinelecerfdefer/Desktop/Modification_vcf/name_cut/recovery_gene_trans_original2.txt")
Tdiff= difftime(T2, T1)
Tdiff
write.csv(Tdiff, file = "/Users/amandinelecerfdefer/Desktop/Modification_vcf/time/time2.txt")`enter code here`
Last week this tool worked very well but for a few days now, it has been impossible to launch it due to a recurring error.
I have this error :
> res <- getBM(
+ attributes = c(
+ "refsnp_id",
+ "ensembl_gene_stable_id",
+ "ensembl_transcript_stable_id"
+ ),
+ filters = "snp_filter",
+ values = Data$rsID,
+ mart = snpmart,
+ uniqueRows = TRUE
+ )
Batch submitting query [=======>-----------------------------------------------------] 13% eta: 2hError in getBM(attributes = c("refsnp_id", "ensembl_gene_stable_id", "ensembl_transcript_stable_id"), :
The query to the BioMart webservice returned an invalid result: biomaRt expected a character string of length 1.
Please report this on the support site at http://support.bioconductor.org
How to fix this error and make the tool work?
I encountered the exact same error this morning.
Received same error couple hours back today.