Programmatic access to the Genome Browser

From genomewiki
Revision as of 09:46, 6 July 2015 by Max (talk | contribs)
Jump to navigationJump to search

The UCSC API for retrieving data and uploading data is RESTful but does not use JSON. Download usually requires client-side C tools that convert to/from binary files, data upload uses custom text files.

Here are some common tasks that can be done from scripts with the UCSC Genome Browser, assuming that you know the standard Unix command line tools:

Get the chromosome sequence for a range

Get the "wiggle" (x-y-plot) graph data for a chromosome range

Download data stored in a database table

  • use Tools - Table Browser - "Describe schema" to browse the database schema. All fields have a human readable description and the links to other tables are shown.
  • mysql --no-defaults -h genome-mysql.cse.ucsc.edu -u genome -A -e 'select * from pubsBingBlat' -NB > out.txt

Get a copy of the current Genome Browser image from a script

Upload a custom track and link to the genome browser with the track loaded