Hi Julian Below are some example strings for the GET URL request, hope they help.
http://www.biomart.org/biomart/martservice?query=<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE Query><Query virtualSchemaName = "default" Header = "1" count = "" softwareVersion = "0.5" formatter="FASTA" ><Dataset name = "hsapiens_gene_ensembl" interface = "default" ><Attribute name = "peptide" /><Attribute name = "str_chrom_name" /><Attribute name = "gene_stable_id" /><Attribute name = "biotype" /><Filter name = "chromosome_name" value = "22"/></Dataset></Query> http://www.biomart.org/biomart/martservice?query=<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE Query><Query virtualSchemaName = "default" Header = "1" count = "" softwareVersion = "0.5" ><Dataset name = "hsapiens_gene_ensembl" interface = "default" ><Attribute name = "ensembl_gene_id" /><Attribute name = "ensembl_transcript_id" /></Dataset></Query> http://www.biomart.org/biomart/martservice?query=<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE Query><Query virtualSchemaName = "default" Header = "1" count = "" softwareVersion = "0.5" formatter="CSV"><Dataset name = "hsapiens_gene_ensembl" interface = "default" ><Attribute name = "ensembl_gene_id" /><Attribute name = "ensembl_transcript_id" /><Filter name = "in_encode_region" excluded = "1"/></Dataset></Query> For any specific query, please write back. Kind Regards Syed On Mon, 2007-03-12 at 09:56 +0000, Arek Kasprzyk wrote: > On 12 Mar 2007, at 03:48, Julian Catchen wrote: > > > Hello, > > > > Does anyone have any example XML queries they are using to poll the > > Ensembl biomart interface? I have gotten some simple examples working > > that pull down lists of ensembl IDs by using examples from the > > documentation. However, I can't seem to find any examples of how to > > query for FASTA formatted cDNA sequences or translations. Also, I > > can't find any documentation of how to request gzipped data. > > > > Hi Julian, > please go to www.biomart.org/biomart/martview, create your favourite > query using MView and click > XML button. This will give you the exact xml format required for your > web service query. In principle anything > that you can do with MView you should be also able to do with > webservice XML. If not, that we need > to fix it. > > In order to invoke a formatter you simply need to add > 'formatter="FASTA' to your xml query. > > For example the below query will give you peptides from chromosome 22 > in FASTA format: > > > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE Query> > <Query virtualSchemaName = "default" Header = "1" count = "" > softwareVersion = "0.5" formatter="FASTA" > > > <Dataset name = "hsapiens_gene_ensembl" interface = "default" > > <Attribute name = "peptide" /> > <Attribute name = "str_chrom_name" /> > <Attribute name = "gene_stable_id" /> > <Attribute name = "biotype" /> > <Filter name = "chromosome_name" value = "22"/> > </Dataset> > </Query> > > > > you can run this query using the webExample.pl script: > > > http://cvs.sanger.ac.uk/cgi-bin/viewcvs.cgi/biomart-perl/scripts/ > webExample.pl?view=markup > > > > > > I used to have all of these automated through simple URL GET queries > > that no longer seem to work with Ensembl post version 41. > > > > URL GET query still work but the format has changed. We have not yet > documented it properly. > > I am cc-ing your email to mart-dev so someone from there will send you > a few examples > > hope that helps, > a. > > > > Any pointers to examples or documentation for XML queries would be > > appreciated. > > > > Thanks, > > > > julian > > > > > ------------------------------------------------------------------------ > ------- > Arek Kasprzyk > EMBL-European Bioinformatics Institute. > Wellcome Trust Genome Campus, Hinxton, > Cambridge CB10 1SD, UK. > Tel: +44-(0)1223-494606 > Fax: +44-(0)1223-494468 > ------------------------------------------------------------------------ > ------- > > -- ====================================== Syed Haider. EMBL-European Bioinformatics Institute Wellcome Trust Genome Campus, Hinxton, Cambridge CB10 1SD, UK. ======================================
