Question: How can I download data from plants.ensembl.org using wget in biomart?
0
gravatar for utsafar
12 days ago by
utsafar10
utsafar10 wrote:

using commands like this:

wget -O result.txt 'http://www.ensembl.org/biomart/martservice?query=<Query virtualSchemaName="default" formatter="TSV" header="0" uniqueRows="0" count="" datasetConfigVersion="0.6"><Dataset name="hsapiens_gene_ensembl" interface="default"><Filter name="ensembl_gene_id" value="ENSG00000139618"/><Attribute name="ensembl_gene_id"/><Attribute name="ensembl_transcript_id"/><Attribute name="hgnc_symbol"/><Attribute name="uniprotswissprot"/></Dataset></Query>'

I can easily download data from ensembl.org, but when I try to use the same commands for plants.ensembl.org I just go to http://plants.ensembl.org/index.html.

How can I solve my problem?

biomart ensembl wget • 103 views
ADD COMMENTlink modified 9 days ago by Astrid_Ensembl220 • written 12 days ago by utsafar10

Mike and Astrid, thanks to your helps I found my mistakes:

This is my wrong command:

wget -O result.txt 'http://www.plants.ensembl.org/biomart/martview/martservice?query=<Query virtualSchemaName="plants_mart" formatter="CSV" header="0" uniqueRows="0" count="" datasetConfigVersion="0.6"><Dataset name="atauschii_eg_gene" interface="default"><Attribute name="ensembl_peptide_id"/></Dataset></Query>'

First mistake: I forgot to remove 'www.' from my url

2nd mistake: '/martview' will be removed

So this is the example correct command to get aegilops tauschii gene IDs from plants.ensembl.org:

wget -O result.txt 'http://plants.ensembl.org/biomart/martservice?query=<Query virtualSchemaName="plants_mart" formatter="CSV" header="0" uniqueRows="0" count="" datasetConfigVersion="0.6"><Dataset name="atauschii_eg_gene" interface="default"><Attribute name="ensembl_gene_id"/></Dataset></Query>'
ADD REPLYlink modified 8 days ago • written 8 days ago by utsafar10
3
gravatar for Mike Smith
11 days ago by
Mike Smith1.1k
EMBL Heidelberg / de.NBI
Mike Smith1.1k wrote:

This is a pretty unusual way to query Ensembl, typically people use the Perl API or biomaRt R-package, which should make constructing queries a lot easier, but if this suits your workflow then great.

I don't know how this is different from what you're trying, but this works for me:

wget -O result.txt 'http://plants.ensembl.org/biomart/martservice?query=<Query virtualSchemaName="plants_mart" formatter="TSV" header="0" uniqueRows="0" count="" datasetConfigVersion="0.6">     
<Dataset name="athaliana_eg_gene" interface="default">
    <Filter name="ensembl_gene_id" value="AT1G01010"/>
    <Attribute name="ensembl_gene_id"/>
    <Attribute name="ensembl_transcript_id"/>
    <Attribute name="external_gene_name"/>
</Dataset>
</Query>'

You can paste the URL into a browser to check its working, and here's the contents of the output file:

% cat result.txt 
AT1G01010   AT1G01010.1 NAC001
ADD COMMENTlink written 11 days ago by Mike Smith1.1k
3
gravatar for Astrid_Ensembl
9 days ago by
EMBL-EBI
Astrid_Ensembl220 wrote:

You could also look into the Ensembl Genomes REST API as an alternative: http://rest.ensemblgenomes.org

E.g. this endpoint: http://rest.ensemblgenomes.org/documentation/info/lookup rest.ensemblgenomes.org/lookup/id/AT1G01010?content-type=application/json;expand=1

The endpoint documentation includes wget examples.

ADD COMMENTlink written 9 days ago by Astrid_Ensembl220
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1891 users visited in the last hour