Tools similar to entrez-direct for ENA?
1
0
Entering edit mode
3.0 years ago
predeus ★ 2.1k

Hi all,

I was wondering if there are tools similar to entrez-direct from NCBI, that can be applied to ENA?

What I have is, say, a list of 50 ERR or ERX IDs. When looking through the browser, I can see that each one is linked to a bam file, which I'd like to download. E.g. this link should give an idea: https://www.ebi.ac.uk/ena/browser/view/ERX4126872?show=reads

As you can see the file is named in a way that's completely unrelated to the ENA ID. How can I avoid doing this manually?

Thank you in advance, as always.

SRA Entrez-direct ENA Entrez • 1.2k views
ADD COMMENT
0
Entering edit mode

https://sra-explorer.info/

it can give you all the URLs you need to download (which you then can loop in a terminal or such)

ADD REPLY
2
Entering edit mode
3.0 years ago
Michael 55k

On the page, look at the JSON link at the bottom.

You could use this as part of a REST API (which it indeed is) to automate the task in a simple script:

https://www.ebi.ac.uk/ena/portal/api/filereport?accession=ERX4126872&result=read_run&fields=fastq_ftp,submitted_ftp,sra_ftp&format=json&download=true&limit=0

The result is a JSON file you can parse to retrieve the FTP URL. Note, not all download options are available here.

{
 "run_accession":"ERR4161442",
 "fastq_ftp":"",
 "submitted_ftp":"ftp.sra.ebi.ac.uk/vol1/run/ERR416/ERR4161442/5dc932bd71fe4a0008e5699d.bam",
 "sra_ftp":""
}

You can also refer to the documentation of programmatic access to ENA:

For further simplicity, enaBrowserTools can be downloaded and run locally on the command line to fetch files associated with records by accession. It can also be used to bulk download records related to a specified Sample or Study.

This is as close to e-utils as you can get.

ADD COMMENT
0
Entering edit mode

Thank you! I just realized that you can retrieve not only JSON but also TSV, which is easier to parse afterwards.

ADD REPLY

Login before adding your answer.

Traffic: 2068 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6