bringing smiles to transcript users since 2013
Note
uta_20150903 is available. It adds NM_000314.5, which is the transcript preferred by HGMD for PTEN. The importance of this gene and the prevalence of HGMD justified this minor release. Otherwise, this release is identical to uta_20150827. The release is available via the postgresql database at uta.biocommons.org, the uta docker image, and dl.biocommons.org postgresql dump.
The UTA (Universal Transcript Archive) stores transcripts aligned to sequence references (typically genome reference assemblies). It supports aligning the same transcript to multiple references using multiple alignment methods. Specifically, it facilitates the following:
- querying for multiple transcript sources through a single interface
- interpretating variants reported in literature against obsolete transcript records
- identifying regions where transcript and reference genome sequence assemblies disagree
- comparing transcripts across from distinct sources
- comparing transcript alignments generated by multiple methods
- identifying ambiguities in transcript alignments
UTA is used by the hgvs package to map variants between genomic, transcript, and protein coordinates.
This code repository is primarily used for generating the UTA database. The primary interface for the database itself is via direct PostgreSQL access. (A REST interface is planned, but not yet available.)
Invitae provides a public instance of UTA. The connection parameters are:
param | value |
---|---|
host | uta.invitae.com |
port | 5432 (default) |
database | uta |
login | anonymous |
password | anonymous |
For example:
$ PGPASSWORD=anonymous psql -h uta.invitae.com -U anonymous -d uta
Or, in Python:
> import psycopg2, psycopg2.extras > conn = psycopg2.connect("host=uta.invitae.com dbname=uta user=anonymous password=anonymous") > cur = conn.cursor(cursor_factory=psycopg2.extras.DictCursor) > cur.execute("select * from uta_20140210.tx_def_summary_v where hgnc='BRCA1'") > row = cur.fetchone() > dict(row) { 'hgnc': 'BRCA1', 'tx_ac': 'ENST00000586385', 'cds_md5': '5d405c70b9b79add38d28e5011a6ddc0', 'es_fingerprint': '95d60b8d62f5c23cbeff3499eedf5e89', 'cds_start_i': 144, 'cds_end_i': 666, 'starts_i': [0, 148, 226, 267, 351, 406, 480, 541], 'ends_i': [148, 226, 267, 351, 406, 480, 541, 781], 'lengths': [148, 78, 41, 84, 55, 74, 61, 240], }
docker enables the distribution of lightweight, isolated packages that run on essentially any platform. When you use this approach, you will end up with a local UTA installation that runs as a local postgresql process. The only requirement is docker itself -- you will not need to install postgresql or any of its dependencies.
Fetch the uta docker image from docker hub.
$ docker pull biocommons/uta:uta_20150827
This process will likely take 1-3 minutes.
Run the image
$ docker run -dit --name uta_20150827 -p 50827:5432 biocommons/uta:uta_20150827
The first time you run this image, it will initialize a postgresql database cluster, then download a database dump and install it. -d starts the container in daemon (background) mode. To see progress:
$ docker logs -f uta_20150827
You will see messages from several processes running in parallel. Near the end, you'll see:
== You may now connect to uta. No password is required.
Hit Ctrl-C to stop watching logs. (The container will still be running.)
Test your installation
With the test commands below, you should see a table dump with at least 4 lines showing schema_version, create date, license, and uta (code) version used to build the instance.
Linux
On Linux, where docker runs natively,
-p 50827:5432
option to thedocker run
command causes localhost:50827 to be mapped to the container port 5432. The following command connects to the UTA instance:$ psql -h localhost -p 50827 -U anonymous -d uta -c 'select * from uta_20150827.meta'
With DockerToolbox (Mac and Windows)
On Mac and Windows, docker runs in a virtual machine using DockerToolbox. The
-p 50827:5432
option to thedocker run
maps VM port 50827 (not that of the host OS). In order to connect to UTA, you must use the IP address of the VM, like this:$ psql -h $(docker-machine ip default) -p 50827 -U anonymous -d uta -c 'select * from uta_20150827.meta'
Users should prefer the public UTA instance (uta.biocommons.org) or the docker installation wherever possible. When those options are not available, users may wish to create a local postgresql database from database dumps. Users choosing this method of installation should be experienced with PostgreSQL administration.
The public site and docker images are built from exactly the same dumps as provided below. Building a database from these should result in a local database that is essentially identical to those options.
Warning
Due to the heterogeneity of operating systems and PostgreSQL installations, installing from database dumps is unsupported.
The following commands will likely need modification appropriate for the installation environment.
Download an appropriate database dump from dl.biocommons.org.
Create a user and database.
You may choose any username and database name you like. uta and uta_admin are likely to ease installation.
$ createuser -U postgres uta_admin $ createdb -U postgres -O uta_admin uta
Restore the database.
$ gzip -cdq uta_20150827.pgd.gz | psql -U uta_admin -1 -v ON_ERROR_STOP=1 -d uta -Eae
Note
See the hgvs docs for information how to configure hgvs to use this instance.
To develop UTA, follow these steps.
- Setup a virtual environment.
With virtualenvwrapper:
mkvirtualenv uta-veOr, with virtualenv:
virtualenv uta-ve source uta-ve/bin/activate
Clone UTA.:
hg clone ssh://hg@bitbucket.org/biocommons/uta cd uta make develop
Restore a database or load a new one
UTA currently expects to have an existing database available. When the loaders are available, instructions will appear here. For now, creating an instance of TranscriptDB without arguments will cause it to connect to a populated Invitae database.