This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Retrieve Download Link For A Given File From Ucsc Mysql Server

Hi everyone,

I would like to know how to retrieve the download link for a specific file e.g. wgEncodeHaibTfbsH1hescAtf3V0416102AlnRep1.bam, through UCSC Public MySQL server? Because I have hundreds of file names (and their UCSC accession numbers) obtained from querying the metaDb, and I want to get the download links for these files now. Thanks!

ucsc mysql encode

1 answer

You might find this page useful, even if you do not use R for analysis:

http://watson.nci.nih.gov/~sdavis/tutorials/publicdatatutorial/publicDataTutorial.pdf

See section 5.1. To construct a URL from the resulting data.frame, you simply need to paste the base url:

http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/

followed by the value in the "composite" column like:

wgEncodeHaibTfbs

followed by the value in the "fileName" column like:

wgEncodeHaibTfbsH1hescAtf3V0416102AlnRep1.bam

The result looks like:

http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeHaibTfbs/wgEncodeHaibTfbsH1hescAtf3V0416102AlnRep1.bam

Log in to answer this question.