[biomart-users] Ensembl ids to gene symbol: Error The query to the BioMart webservice returned an invalid result

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[biomart-users] Ensembl ids to gene symbol: Error The query to the BioMart webservice returned an invalid result

Sanjeev Sariya
hi All,

I'm trying to get mapped gene symbol to a list of ENSEMBL Ids i've. 


The query to the BioMart webservice returned an invalid result: biomaRt expected a character string of length 1. Please report this to the mailing list.

##set mart   #
mart
<-useMart(biomart = "ENSEMBL_MART_ENSEMBL", dataset = "hsapiens_gene_ensembl", host = "www.ensembl.org", ensemblRedirect = FALSE)

##run code  
G_list
<- getBM(filters= "ensembl_gene_id", attributes= c("ensembl_gene_id","hgnc_symbol"), values=genersem$gene_ID,mart= mart)
##


I'm using following platform and R packages:
BLAS: /mnt/mfs/cluster/bin/R-3.4/lib/libRblas.so
LAPACK
: /mnt/mfs/cluster/bin/R-3.4/lib/libRlapack.so
other attached packages
:
[1] biomaRt_2.34.2

loaded via a
namespace (and not attached):
 
[1] Rcpp_1.0.1           AnnotationDbi_1.42.1 xml2_1.2.0
 
[4] magrittr_1.5         BiocGenerics_0.24.0  hms_0.4.2
 
[7] progress_1.2.0       IRanges_2.12.0       bit_1.1-14
[10] R6_2.4.0             rlang_0.3.3          httr_1.4.0
[13] stringr_1.4.0        blob_1.1.1           tools_3.4.2
[16] parallel_3.4.2       Biobase_2.38.0       DBI_1.0.0
[19] bit64_0.9-7          digest_0.6.18        assertthat_0.2.1
[22] crayon_1.3.4         S4Vectors_0.16.0     bitops_1.0-6
[25] curl_3.3             RCurl_1.95-4.12      memoise_1.1.0
[28] RSQLite_2.1.1        stringi_1.4.3        compiler_3.4.2
[31] prettyunits_1.0.2    stats4_3.4.2         XML_3.98-1.19
[34] pkgconfig_2.0.2


Let me know if I can circumvent this anyhow.
Thanks!

--
You received this message because you are subscribed to the Google Groups "biomart-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/biomart-users.
To view this discussion on the web, visit https://groups.google.com/d/msgid/biomart-users/89817796-1086-405c-acab-0ec0fded22f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [biomart-users] Ensembl ids to gene symbol: Error The query to the BioMart webservice returned an invalid result

Syed Haider-5
Hi Sanjeev,

Not sure whether it was but one thing i couldnt see in your code is your genersem$gene_ID.

Here is an equivalent (but modified gene.id variable) example that works on my end:


library(biomaRt);


mart<-useMart(biomart = "ENSEMBL_MART_ENSEMBL", dataset = "hsapiens_gene_ensembl", host = 

"www.ensembl.org", ensemblRedirect = FALSE);


gene.ids <- c("ENSG00000284532", "ENSG00000238933", "ENSG00000275693");


G_list <- getBM(filters= "ensembl_gene_id", attributes= c("ensembl_gene_id","hgnc_symbol"), values=gene.ids, mart= mart)



Best,
Syed



On Wed, 12 Jun 2019 at 17:30, Sanjeev Sariya <[hidden email]> wrote:
hi All,

I'm trying to get mapped gene symbol to a list of ENSEMBL Ids i've. 


The query to the BioMart webservice returned an invalid result: biomaRt expected a character string of length 1. Please report this to the mailing list.

##set mart   #
mart
<-useMart(biomart = "ENSEMBL_MART_ENSEMBL", dataset = "hsapiens_gene_ensembl", host = "www.ensembl.org", ensemblRedirect = FALSE)

##run code  
G_list
<- getBM(filters= "ensembl_gene_id", attributes= c("ensembl_gene_id","hgnc_symbol"), values=genersem$gene_ID,mart= mart)
##


I'm using following platform and R packages:
BLAS: /mnt/mfs/cluster/bin/R-3.4/lib/libRblas.so
LAPACK
: /mnt/mfs/cluster/bin/R-3.4/lib/libRlapack.so
other attached packages
:
[1] biomaRt_2.34.2

loaded via a
namespace (and not attached):
 
[1] Rcpp_1.0.1           AnnotationDbi_1.42.1 xml2_1.2.0
 
[4] magrittr_1.5         BiocGenerics_0.24.0  hms_0.4.2
 
[7] progress_1.2.0       IRanges_2.12.0       bit_1.1-14
[10] R6_2.4.0             rlang_0.3.3          httr_1.4.0
[13] stringr_1.4.0        blob_1.1.1           tools_3.4.2
[16] parallel_3.4.2       Biobase_2.38.0       DBI_1.0.0
[19] bit64_0.9-7          digest_0.6.18        assertthat_0.2.1
[22] crayon_1.3.4         S4Vectors_0.16.0     bitops_1.0-6
[25] curl_3.3             RCurl_1.95-4.12      memoise_1.1.0
[28] RSQLite_2.1.1        stringi_1.4.3        compiler_3.4.2
[31] prettyunits_1.0.2    stats4_3.4.2         XML_3.98-1.19
[34] pkgconfig_2.0.2


Let me know if I can circumvent this anyhow.
Thanks!

--
You received this message because you are subscribed to the Google Groups "biomart-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/biomart-users.
To view this discussion on the web, visit https://groups.google.com/d/msgid/biomart-users/89817796-1086-405c-acab-0ec0fded22f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
<font color="green">Please consider environment before you print this!</font>

--
You received this message because you are subscribed to the Google Groups "biomart-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/biomart-users.
To view this discussion on the web, visit https://groups.google.com/d/msgid/biomart-users/CACLWztEF1hw5g2gDQ6y99-FKByv3nbyfZtN267_xjh44mA%3Dz%3Dw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [biomart-users] Ensembl ids to gene symbol: Error The query to the BioMart webservice returned an invalid result

Sanjeev Sariya
Dear Haider,

Thanks for looking into it.
The code works fine, say if I provide 10-20 ensembl gene ids. It starts honking with current list of ensembl ids I've, which is 50K+.

G_list <- getBM(filters= "ensembl_gene_id", attributes= c("ensembl_gene_id","hgnc_symbol"),  values=head(df$gene_ID),mart= mart)


It works fine with above code. If I remove head, I get error:

Batch submitting query [>------------------------------]   3% eta:  1hError in getBM(filters = "ensembl_gene_id", attributes = c("ensembl_gene_id",  :
 
The query to the BioMart webservice returned an invalid result: biomaRt expected a character string of length 1. Please report this to the mailing list.



--Sanjeev

---------------------------------------------------------------------------------------------------

---

On Wednesday, 12 June 2019 17:42:30 UTC-4, Syed Haider wrote:
Hi Sanjeev,

Not sure whether it was but one thing i couldnt see in your code is your genersem$gene_ID.

Here is an equivalent (but modified <a href="http://gene.id" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fgene.id\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNElov0zPbdjoh3OpcT4pYFpD-CjIQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fgene.id\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNElov0zPbdjoh3OpcT4pYFpD-CjIQ&#39;;return true;">gene.id variable) example that works on my end:


library(biomaRt);


mart<-useMart(biomart = "ENSEMBL_MART_ENSEMBL", dataset = "hsapiens_gene_ensembl", host = 

"<a href="http://www.ensembl.org" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.ensembl.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEhRkMjGzJ0Ux5vBUiT-NWHb0ycIg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.ensembl.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEhRkMjGzJ0Ux5vBUiT-NWHb0ycIg&#39;;return true;">www.ensembl.org", ensemblRedirect = FALSE);


gene.ids <- c("ENSG00000284532", "ENSG00000238933", "ENSG00000275693");


G_list <- getBM(filters= "ensembl_gene_id", attributes= c("ensembl_gene_id","hgnc_symbol"), values=gene.ids, mart= mart)



Best,
Syed



On Wed, 12 Jun 2019 at 17:30, Sanjeev Sariya <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="_diztqqnBwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">sanjee...@...> wrote:
hi All,

I'm trying to get mapped gene symbol to a list of ENSEMBL Ids i've. 


The query to the BioMart webservice returned an invalid result: biomaRt expected a character string of length 1. Please report this to the mailing list.

##set mart   #
mart
<-useMart(biomart = "ENSEMBL_MART_ENSEMBL", dataset = "hsapiens_gene_ensembl", host = "<a href="http://www.ensembl.org" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.ensembl.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEhRkMjGzJ0Ux5vBUiT-NWHb0ycIg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.ensembl.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEhRkMjGzJ0Ux5vBUiT-NWHb0ycIg&#39;;return true;">www.ensembl.org", ensemblRedirect = FALSE)

##run code  
G_list
<- getBM(filters= "ensembl_gene_id", attributes= c("ensembl_gene_id","hgnc_symbol"), values=genersem$gene_ID,mart= mart)
##


I'm using following platform and R packages:
BLAS: /mnt/mfs/cluster/bin/R-3.4/lib/libRblas.so
LAPACK
: /mnt/mfs/cluster/bin/R-3.4/lib/libRlapack.so
other attached packages
:
[1] biomaRt_2.34.2

loaded via a
namespace (and not attached):
 
[1] Rcpp_1.0.1           AnnotationDbi_1.42.1 xml2_1.2.0
 
[4] magrittr_1.5         BiocGenerics_0.24.0  hms_0.4.2
 
[7] progress_1.2.0       IRanges_2.12.0       bit_1.1-14
[10] R6_2.4.0             rlang_0.3.3          httr_1.4.0
[13] stringr_1.4.0        blob_1.1.1           tools_3.4.2
[16] parallel_3.4.2       Biobase_2.38.0       DBI_1.0.0
[19] bit64_0.9-7          digest_0.6.18        assertthat_0.2.1
[22] crayon_1.3.4         S4Vectors_0.16.0     bitops_1.0-6
[25] curl_3.3             RCurl_1.95-4.12      memoise_1.1.0
[28] RSQLite_2.1.1        stringi_1.4.3        compiler_3.4.2
[31] prettyunits_1.0.2    stats4_3.4.2         XML_3.98-1.19
[34] pkgconfig_2.0.2


Let me know if I can circumvent this anyhow.
Thanks!

--
You received this message because you are subscribed to the Google Groups "biomart-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="_diztqqnBwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">biomar...@googlegroups.com.
Visit this group at <a href="https://groups.google.com/group/biomart-users" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/group/biomart-users&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/biomart-users&#39;;return true;">https://groups.google.com/group/biomart-users.
To view this discussion on the web, visit <a href="https://groups.google.com/d/msgid/biomart-users/89817796-1086-405c-acab-0ec0fded22f5%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/biomart-users/89817796-1086-405c-acab-0ec0fded22f5%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/biomart-users/89817796-1086-405c-acab-0ec0fded22f5%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/biomart-users/89817796-1086-405c-acab-0ec0fded22f5%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.


--
<font color="green">Please consider environment before you print this!</font>

--
You received this message because you are subscribed to the Google Groups "biomart-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/biomart-users.
To view this discussion on the web, visit https://groups.google.com/d/msgid/biomart-users/460610be-eb18-4380-8ca2-1092718bef30%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [biomart-users] Ensembl ids to gene symbol: Error The query to the BioMart webservice returned an invalid result

Syed Haider-5
Hi Sanjeev,

50K+ ids in the same query are perhaps too many. Worth sending multiple queries (sequentially) with smaller list of ids e.g 500 each!

Best,
Syed


On Thu, 13 Jun 2019 at 17:30, Sanjeev Sariya <[hidden email]> wrote:
Dear Haider,

Thanks for looking into it.
The code works fine, say if I provide 10-20 ensembl gene ids. It starts honking with current list of ensembl ids I've, which is 50K+.

G_list <- getBM(filters= "ensembl_gene_id", attributes= c("ensembl_gene_id","hgnc_symbol"),  values=head(df$gene_ID),mart= mart)


It works fine with above code. If I remove head, I get error:

Batch submitting query [>------------------------------]   3% eta:  1hError in getBM(filters = "ensembl_gene_id", attributes = c("ensembl_gene_id",  :
 
The query to the BioMart webservice returned an invalid result: biomaRt expected a character string of length 1. Please report this to the mailing list.



--Sanjeev

---------------------------------------------------------------------------------------------------

---

On Wednesday, 12 June 2019 17:42:30 UTC-4, Syed Haider wrote:
Hi Sanjeev,

Not sure whether it was but one thing i couldnt see in your code is your genersem$gene_ID.

Here is an equivalent (but modified gene.id variable) example that works on my end:


library(biomaRt);


mart<-useMart(biomart = "ENSEMBL_MART_ENSEMBL", dataset = "hsapiens_gene_ensembl", host = 

"www.ensembl.org", ensemblRedirect = FALSE);


gene.ids <- c("ENSG00000284532", "ENSG00000238933", "ENSG00000275693");


G_list <- getBM(filters= "ensembl_gene_id", attributes= c("ensembl_gene_id","hgnc_symbol"), values=gene.ids, mart= mart)



Best,
Syed



On Wed, 12 Jun 2019 at 17:30, Sanjeev Sariya <[hidden email]> wrote:
hi All,

I'm trying to get mapped gene symbol to a list of ENSEMBL Ids i've. 


The query to the BioMart webservice returned an invalid result: biomaRt expected a character string of length 1. Please report this to the mailing list.

##set mart   #
mart
<-useMart(biomart = "ENSEMBL_MART_ENSEMBL", dataset = "hsapiens_gene_ensembl", host = "www.ensembl.org", ensemblRedirect = FALSE)

##run code  
G_list
<- getBM(filters= "ensembl_gene_id", attributes= c("ensembl_gene_id","hgnc_symbol"), values=genersem$gene_ID,mart= mart)
##


I'm using following platform and R packages:
BLAS: /mnt/mfs/cluster/bin/R-3.4/lib/libRblas.so
LAPACK
: /mnt/mfs/cluster/bin/R-3.4/lib/libRlapack.so
other attached packages
:
[1] biomaRt_2.34.2

loaded via a
namespace (and not attached):
 
[1] Rcpp_1.0.1           AnnotationDbi_1.42.1 xml2_1.2.0
 
[4] magrittr_1.5         BiocGenerics_0.24.0  hms_0.4.2
 
[7] progress_1.2.0       IRanges_2.12.0       bit_1.1-14
[10] R6_2.4.0             rlang_0.3.3          httr_1.4.0
[13] stringr_1.4.0        blob_1.1.1           tools_3.4.2
[16] parallel_3.4.2       Biobase_2.38.0       DBI_1.0.0
[19] bit64_0.9-7          digest_0.6.18        assertthat_0.2.1
[22] crayon_1.3.4         S4Vectors_0.16.0     bitops_1.0-6
[25] curl_3.3             RCurl_1.95-4.12      memoise_1.1.0
[28] RSQLite_2.1.1        stringi_1.4.3        compiler_3.4.2
[31] prettyunits_1.0.2    stats4_3.4.2         XML_3.98-1.19
[34] pkgconfig_2.0.2


Let me know if I can circumvent this anyhow.
Thanks!

--
You received this message because you are subscribed to the Google Groups "biomart-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/biomart-users.
To view this discussion on the web, visit https://groups.google.com/d/msgid/biomart-users/89817796-1086-405c-acab-0ec0fded22f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
<font color="green">Please consider environment before you print this!</font>

--
You received this message because you are subscribed to the Google Groups "biomart-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/biomart-users.
To view this discussion on the web, visit https://groups.google.com/d/msgid/biomart-users/460610be-eb18-4380-8ca2-1092718bef30%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
<font color="green">Please consider environment before you print this!</font>

--
You received this message because you are subscribed to the Google Groups "biomart-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/biomart-users.
To view this discussion on the web, visit https://groups.google.com/d/msgid/biomart-users/CACLWztEiXXcmSFmyybFrTBjVvpZMnmcBAYiw-Rd3eVTXdeDFoA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.