Repository navigation
Build a reference database
For a custom CAT pack database, you must have the following input ready before you launch a CAT_pack prepare run.
-
A fasta file containing all protein sequences you want to include in your database.
-
A
names.dmpfile that contains mappings of taxids to their ranks and scientific names. The format must be the same as the NCBI standardnames.dmp(uses\t|\tas field separator).
An example looks like this:
1 | root | scientific name |
2 | Bacteria | scientific name |
562 | Escherichia coli | scientific name |
- A
nodes.dmpfile that describes the child-parent relationship of the nodes in the taxonomy tree and their (official) rank. The format must be the same as the NCBI standardnodes.dmp(uses\t|\tas the field separator).
An example looks like this:
1 | 1 | no rank |
2 | 1 | superkingdom |
1224 | 2 | phylum |
1236 | 1224 | class |
91437 | 1236 | order |
543 | 91347 | family |
561 | 543 | genus |
562 | 561 | species |
For more information on the nodes.dmp and names.dmp files, see the NCBI taxdump_readme.txt.
- A 2-column, tab-separated file containing the mapping of each sequence in the fasta file to a taxid in the taxonomy.
This file must contain the header
accession.version taxid.
An example looks like this
accession.version taxid
protein_1 562
protein_2 123456
Once all of the above requirements are met you can run CAT_pack prepare.
All the input needs to be explicitly specified for CAT_pack prepare to work, for example:
$ CAT_pack prepare \
--db_fasta path/to/fasta \
--names path/to/names.dmp \
--nodes path/to/nodes.dmp \
--acc2tax path/to/acc2taxid.txt.gz \
--db_dir path/to/output_dir
will create an output_dir that will look like this
output_dir
├── 2023-11-05_CAT_pack.log
├── 2023-11-05_CAT_pack.dmnd
├── 2023-11-05_CAT_pack.fastaid2LCAtaxid
├── 2023-11-05_CAT_pack.taxids_with_multiple_offspring
├── names.dmp
└── nodes.dmp
Notes:
- All database and taxonomy files are stored together in
output_dir. Use this directory with-dfor CAT, BAT, RAT. - The
nodes.dmpandnames.dmpfiles in theoutput_dirdirectory are copied from their original location. - The default prefix is
<YYYY-MM-DD>_CAT_pack. You can customize it with the--common_prefixoption.
For all command line options available see
$ CAT_pack prepare -h