Installation¶
Docker (recommended)¶
Use Docker with Docker Compose to run the published Variation Normalizer API.
Get the Compose files¶
Clone the repository to get compose.yaml and uta-setup.sql:
Run the commands below from the repository directory. The Compose file uses the published API image from GitHub Container Registry.
Tip
If you only need these two files, download them directly:
Prepare the data¶
- Download the SeqRepo 2024-12-20 snapshot to
/usr/local/share/seqrepo/2024-12-20. - Download
uta_20241220.pgd.gzfrom https://dl.biocommons.org/uta/ using a web browser and place it besidecompose.yaml.
If SeqRepo is stored elsewhere, update both the host volume mount and the
container's SEQREPO_ROOT_DIR in compose.yaml. The environment variable must
point to the snapshot directory inside the container.
For Docker Desktop, open Settings > Resources > File sharing and add
/usr/local/share/seqrepo to the shared directories. Without access to the
snapshot, the API reports OSError: Unable to open SeqRepo directory.
Start the service¶
The first startup loads UTA into the persistent uta_vol volume (this may take a few minutes).
Compose reports the status of all three containers.
[+] up 3/3
✔ Container variation-normalization-uta-1 Running
✔ Container variation-normalization-gene-dynamodb-local-1 Running
✔ Container variation-normalization-api-1 Started
Open the API interface at http://localhost:8001/variation.
Python library¶
With Python 3.11 or newer, install the library from PyPI:
The library requires SeqRepo, UTA, and Gene Normalizer data.
Required resources¶
SeqRepo¶
SeqRepo supplies reference
sequences. To download the 2024-12-20 snapshot:
python3 -m pip install biocommons.seqrepo
sudo mkdir -p /usr/local/share/seqrepo
sudo chown "$USER" /usr/local/share/seqrepo
seqrepo pull -i 2024-12-20/
When using the Python library, set SEQREPO_ROOT_DIR to the snapshot directory.
The default is /usr/local/share/seqrepo/latest.
UTA¶
The Universal Transcript Archive (UTA) supplies transcript alignments through Cool-Seq-Tool.
To connect a Python process on the host to the Compose database:
For a separate database deployment, follow the UTA installation guide.
Gene Normalizer¶
Gene Normalizer supplies normalized gene concepts. The Compose setup includes its database image. To connect a Python process on the host to that local database:
export GENE_NORM_DB_URL=http://localhost:8000
export AWS_ACCESS_KEY_ID=dummy
export AWS_SECRET_ACCESS_KEY=dummy
export AWS_DEFAULT_REGION=us-east-2
For a separate database deployment, follow the Gene Normalizer installation guide.