Skip to content

HTS Bioinf - Update Databases

Scope

This document describes the procedures for generating external annotation data sets for anno.

Data sources

The instructions on data sources generations are coordinated via ella-anno/opts/datasets.json and anno-targets/datasets.json files. Here is the table of distribution of data sources between these repositories, together with agreed frequencies of updates.

Data sources Repository Updates
ClinVar (and pubmed db) ella-anno monthly
HGMD (and pubmed db) anno-targets quarterly
wgsDB anno-targets quarterly
inDB anno-targets yearly
VEP ella-anno yearly
gnomAD, SeqRepo, UTA, RefSeq ella-anno irregularly
gnomad_sv, swegen_sv, annotsv anno-targets irregularly
gnomad_mt anno-targets irregularly

For the data sources with irregular updates, we will check every quarter for new updates, and update whenever there is a new suitable and significant release.

Update Procedure

Credentials for DO

To perform the steps of this procedure, a “Personal access token" to the DigitalOcean OUSAMG project is required. These should be in a file somewhere on your disk (e.g. $HOME/.digital_ocean/do_creds), formatted as

SPACES_KEY=<key>
SPACES_SECRET=<secret>.

Directions on creating these credentials are available here.

Credentials for NCBI API

An NCBI API token should also be obtained before starting the update. Follow the intructions here and here. Then export ENTREZ_API_KEY either in your terminal or in your bashrc file.

Credentials for HGMD

The easiest way to supply HGMD credentials is to simply append these to the file created in, e.g. $HOME/.digital_ocean/do_creds.

HGMD_USER=<>
HGMD_PASSWORD=<>

Automatic data generation

  1. Clone the relevant repository (i.e., ella-anno or anno-targets, refer to the table above).

  2. Update datasets.json with the version you wish to generate. If required (which is rare), modify the generate-commands accordingly.

  3. make build-annobuilder.

  4. make generate-(amg-)package PKG_NAME=<package name> (command with amg for anno-targets, check the Makefile if in doubt, i.e. make help).

  5. For ClinVar updates, append ENTREZ_API_KEY=<> in front of the make command.

  6. make upload-(amg-)package PKG_NAME=<package_name> DO_CREDS=$HOME/.digital_ocean/do_creds (command with amg for anno-targets, check the Makefile if in doubt).

  7. For ClinVar updates, append ENTREZ_API_KEY=<> in front of the make command.
  8. for HGMD updates you will need to supply the location of the reference fasta file as FASTA=/path/to/fasta. If you do not have this file locally, use make command to download it from DO:
make download-anno-package PKG_NAME=fasta DO_CREDS=$HOME/.digital_ocean/do_creds
  1. Commit and push the changes to datasets.json in a properly named branch. For this, it is preferred to create an MR from already existing issue in respective repository. Use the merge request template data_mr_template, which proposes basic sanity checks for the newly generated data.

  2. Merge MR into dev.

  3. After MR is merged, follow Release and deploy procedure for anno system.

Update literature reference database

In ELLA, we aim to keep data for all pubmed-references present in either HGMD or ClinVar. These pubmed ids are generated as line-separated text-files in the HGMD or ClinVar data directories.

  1. Clone anno-targets repository https://gitlab.com/alleles/anno-targets
  2. make dowload-amg-package PKG_NAME=hgmd
  3. make download-package PKG_NAME=clinvar
  4. cat anno-data/variantDBs/*/*_pubmed_ids.txt | sort -n | uniq > pubmed_ids.txt

Next steps are to download reference details for all these pubmed ids:

  1. Preparation. Because some of the operations below use git submodule under the hood, it is recommended to set your ssh in advance, e.g.
    eval $(ssh-agent -s)
    ssh-add  
  1. Clone the ELLA repository https://gitlab.com/alleles/ella
  2. Copy pubmed_ids.txt into the ELLA-folder
  3. make build; make dev; make shell. If you run into permission issues here, do chmod -R a+rwX /storage/ella
  4. ella-cli references fetch pubmed_ids.txt (this will take some time)
  5. Import the file created from the previous step to TSD ( references_YYMMDD.txt)

Finally, deposit the references in the ELLA database:

/tsd/p22/data/durable/production/ella/ops/prod-cli.sh
ella-cli deposit references <path to references_YYMMDD.txt>