Download ENCODE Project BED files using REST API
1
0
Entering edit mode
7.4 years ago
mark.ziemann ★ 1.9k

I'm trying to programmatically download all the narrowpeak bed files which match my search with the ENCODE project web app. I have tried instructions on the REST API using the python command as suggested by the documentation, but it doesn't seem to extract the download path. Maybe my search brings up too many results?

I was hoping someone could help me to extract the download paths for the above search using the API so I can automate this step. Thanks in advance!

ChIP-Seq python • 2.3k views
ADD COMMENT
1
Entering edit mode
ADD REPLY
0
Entering edit mode

Perfect! That's exactly what I was after!

ADD REPLY
2
Entering edit mode
7.4 years ago
mark.ziemann ★ 1.9k

I figured out how to do. If you use the web app search tool and click the download button, the "files.txt" will be downloaded. The 1st line of the file looked something like this.

"https://www.encodeproject.org/metadata/type=Experiment&assay_title=ChIP-seq&target.investigated_as=transcription+factor&replicates.library.biosample.donor.organism.scientific_name=Homo+sapiens&files.file_type=bed+narrowPeak/metadata.tsv"

You'll see that the last part of the URL is specifying the metadata in TSV format. The full URL of the dataset can be extracted from the metadata TSV file, which can then be downloaded with wget -N "$URL" and then best to check the md5sum as well to make sure the file is complete and not corrupted.

ADD COMMENT

Login before adding your answer.

Traffic: 1636 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