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!
1 answer
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.
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.
Log in to answer this question.
you might want to try the Encodexplorer http://bioconductor.org/packages/release/bioc/html/ENCODExplorer.html
Perfect! That's exactly what I was after!