[Users] RESTful queries -> results in text not HTML form

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

[Users] RESTful queries -> results in text not HTML form

Estrella, Heather
RESTful queries -> results in text not HTML form

Does anyone know how to use RESTful queries to obtain only the data results from a BioMart server (ex tab-delimited results) rather than HTML formatted results? Currently, the results Im pulling back contain the data within a web-page. I just want the data itself so that I can process it further using external scripts (perl/java). I can get the data using an R, but only from the BioMart databases hosting on the server Im connecting to. I would like to query across all the data (local and federated) that a BioMart host has access to.

Im using version 0.8 RC3.

Many thanks,

Heather


_______________________________________________
Users mailing list
[hidden email]
https://lists.biomart.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [Users] RESTful queries -> results in text not HTML form

Syed Haider
Hi Heather,

The RESTful webservice end-point is relative to your server name e.g

localhost:9000/martservice?query=[xmlQueryThatYouGetFromXmlButton]

e.g:

http://localhost:9000/martservice?query=<?xml version="1.0"
encoding="UTF-8"?><!DOCTYPE Query><Query client="webbrowser"
processor="TSV" limit="-1" header="1"><Dataset name="hsapiens_gene_vega"
config="hsapiens_gene_vega_config"><Attribute
name="refseq_dna"/></Dataset></Query>

BTW, the TSV results are obtained by setting processor="TSV" which is
set by default.

Syed

On 11/01/2011 18:27, Estrella, Heather wrote:
> Does anyone know how to use RESTful queries to obtain only the data results from a BioMart server (ex tab-delimited results) rather than HTML formatted results? Currently, the results I’m pulling back contain the data within a web-page. I just want the data itself so that I can process it further using external scripts (perl/java). I can get the data using an R, but only from the BioMart databases hosting on the server I’m connecting to. I would like to query across all the data (local and federated) that a BioMart host has access to.
>
> I’m using version 0.8 RC3.
>
> Many thanks,
>
> Heather
>
_______________________________________________
Users mailing list
[hidden email]
https://lists.biomart.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [Users] RESTful queries -> results in text not HTML form

Jack Hsu
In reply to this post by Estrella, Heather
Re: [Users] RESTful queries -> results in text not HTML form Hi Heather,

You can use the /rest/results web service, which takes in a required “query” URL query parameter.

E.g. /rest/results?query=<xml>

Make sure that you use “TSV” as the processor not “TSVX” in the query XML.

Here’s a working example from the DCC website:

http://dcc.icgc.org/rest/results?query=<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE Query><Query client="webbrowser" processor="TSV" limit="1000" header="0"><Dataset name="hsapiens_gene_ensembl_tcgaLAML,hsapiens_gene_ensembl_hopkinsBreast3,hsapiens_gene_ensembl_sangerBreast3b,hsapiens_gene_ensembl_tcgaBRCA,hsapiens_gene_ensembl_tcgaCOAD,hsapiens_gene_ensembl_hopkinsColon3,hsapiens_gene_ensembl_hopkinsGBM3,hsapiens_gene_ensembl_tcgaGBM3,hsapiens_gene_ensembl_tcgaKIRC,hsapiens_gene_ensembl_jpLiver3b,hsapiens_gene_ensembl_jpRiken3b,hsapiens_gene_ensembl_tcgaLUAD,hsapiens_gene_ensembl_TSPLung,hsapiens_gene_ensembl_tcgaLUSC,hsapiens_gene_ensembl_sangerMelanoma3b,hsapiens_gene_ensembl_hopkinsPanc3,hsapiens_gene_ensembl_oicrPanc3b,hsapiens_gene_ensembl_garvanPanc3,hsapiens_gene_ensembl_tcgaREAD,hsapiens_gene_ensembl_tcgaOV3,hsapiens_gene_ensembl_sangerLung3b,hsapiens_gene_ensembl_tcgaUCEC" config="hsapiens_gene_ensembl_2"><Filter name="ensembl_gene_id" value="ENSG00000133703"/><Attribute name="ensembl_gene_id_copy"/><Attribute name="ensembl_transcript_id"/><Attribute name="chromosome_name_copy"/><Attribute name="start_position_copy"/><Attribute name="end_position_copy"/><Attribute name="strand_copy"/><Attribute name="external_gene_id"/><Attribute name="gene_biotype_copy"/></Dataset></Query>

-jack


On 11-01-11 1:27 PM, "Estrella, Heather" <Heather.Estrella@...> wrote:

Does anyone know how to use RESTful queries to obtain only the data results from a BioMart server (ex tab-delimited results) rather than HTML formatted results? Currently, the results I’m pulling back contain the data within a web-page. I just want the data itself so that I can process it further using external scripts (perl/java). I can get the data using an R, but only from the BioMart databases hosting on the server I’m connecting to. I would like to query across all the data (local and federated) that a BioMart host has access to.

I’m using version 0.8 RC3.

Many thanks,

Heather


_______________________________________________
Users mailing list
[hidden email]
https://lists.biomart.org/mailman/listinfo/users