I have search a lot of online sources to solve this problem but couldn't. I'm using getBM()
function of biomaRt but getting an error. I have used this code like 7 months ago without any error but now it's giving error and I think it should probably be because of the server ????
what I use:
db <- useMart('ENSEMBL_MART_ENSEMBL',dataset='mmusculus_gene_ensembl', host="www.ensembl.org")
go_ids <- getBM(attributes=c('go_id', 'ensembl_gene_id', 'namespace_1003'), filters='ensembl_gene_id', values=bg_genes, mart=db)
values=bg_genes
is around ~20000 gene ids. I tried with less gene ids (10) then it worked.
The ERROR:
Error in getBM(attributes = c("go_id", "ensembl_gene_id", "namespace_1003"), :
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
It there any other way to solve this? I need all my ~20000
in values=bg_genes
class(bg_genes) ----> character
table(sapply(bg_genes, class)) ----> character 22287
Cross-posted: https://www.biostars.org/p/440156/ In the future, be sure to mention [in your question], the other web-sites where you have posted your question. This helps to prevent people duplicating efforts.