Skip to content

Databases

Chloë Cornelissen edited this page Nov 13, 2026 · 6 revisions

To get started with CAT/BAT/RAT, you will have to get the database files on your system. You can either download preconstructed database files, or generate them yourself.

Downloading preconstructed database files

To download the database files, find the most recent preconstructed database on tbb.bio.uu.nl/tina/CAT_pack_prepare/, download and extract, and you are ready to go!

For NCBI nr:

$ wget https://tbb.bio.uu.nl/tina/CAT_pack_prepare/20261111_CAT_nr.tar.gz

$ tar -xvzf 20261111_CAT_nr.tar.gz

For GTDB:

$ wget tbb.bio.uu.nl/tina/CAT_pack_prepare/20260701_CAT_gtdb.tar.gz     # release 226

$ tar -xvzf 20260701_CAT_gtdb.tar.gz

Creating a fresh NCBI nr or GTDB database yourself

Instead of using the preconstructed database, you can construct a fresh database yourself. The download module can be used to download and process raw data, in preparation for building a new CAT pack database. This will ensure that all input dependencies are met and correctly formatted for CAT_pack prepare.

Currently, two databases are supported, NCBI's nr and the Genome Taxonomy Database (GTDB) proteins.

NCBI non-redundant protein database (nr)

$ CAT_pack download --db nr --out_dir path/to/nr_data_dir

Will download the fasta file with the protein sequences, their mapping to a taxid, and the taxonomy information from NCBI over HTTPS.

$ CAT_pack download --db gtdb --out_dir path/to/gtdb_data_dir

The files required to build a CAT pack database are provided by the GTDB downloads page.

CAT_pack download fetches the necessary files and does some additional processing to get them ready for CAT_pack prepare:

  • The taxonomy information from GTDB is transformed into NCBI style nodes.dmp and names.dmp files.
  • Protein sequences are extracted from gtdb_proteins_aa_reps.tar.gz and are subjected to a round of deduplication. The deduplication reduces the redundancy in the DIAMOND database, thus simplifying the alignment process. Exact duplicate sequences are identified based on a combination of the MD5sum of the protein sequences and their length. Only one representative sequence is kept, with all duplicates encoded in the fasta header. This information is later used by CAT_pack prepare to assign the LCA of the protein sequence appropriately in the .fastaid2LCAtaxid file.
  • The mapping of all protein sequences to their respective taxonomy is created.
  • In addition, the newick formatted trees of Bacteria and Archaea are downloaded and - artificially - concatenated under a single root node, to produce a <YYYY-MM-DD>.gtdb.tree file. This file is not used by the CAT pack but may come in handy for downstream analyses.

When the download and processing of the files is finished successfully you can build a CAT pack database with CAT_pack prepare.

For all command line options available see: command line options.

Creating a custom database yourself

Follow the build a reference database guide to build a new database if you need a newer snapshot.

Clone this wiki locally