Installation

Bakta can be installed via BioConda, Docker, Singularity and Pip. However, we encourage to use Conda or Docker/Singularity to automatically install all required 3rd party dependencies.

In all cases a mandatory database must be downloaded.

BioConda

conda install -c conda-forge -c bioconda bakta

Podman (Docker)

We maintain a Docker image oschwengers/bakta providing an entrypoint, so that containers can be used like an executable:

podman pull oschwengers/bakta
podman run oschwengers/bakta --help

Installation instructions and get-started guides: Podman docs. For further convenience, we provide a shell script (bakta-podman.sh) handling Podman related parameters (volume mounting, user IDs, etc):

bakta-podman.sh --db <db-path> --output <output-path> <input>

For experienced users and full functionality (bakta_db & bakta_proteins), an image without entrypoint might be a better option. For these cases, please use one of the Biocontainer images:

export CONTAINER="quay.io/biocontainers/bakta:1.8.2--pyhdfd78af_0"
podman run -it --rm $CONTAINER bakta --help
podman run -it --rm $CONTAINER bakta_db --help

Pip

python3 -m pip install --user bakta

Bakta requires the following 3rd party software tools which must be installed and executable to use the full set of features:

Database download

Bakta requires a mandatory database which is publicly hosted at Zenodo: DOI We provide 2 types: full and light. To get best annotation results and to use all features, we recommend using the full (default). If you seek for maximum runtime performance or if download time/storage requirements are an issue, please try the light version. Further information is provided in the database section below.

List available DB versions (available as either full or light):

bakta_db list
...

To download the most recent compatible database version we recommend to use the internal database download & setup tool:

bakta_db download --output <output-path> --type [light|full]

Of course, the database can also be downloaded manually:

wget https://zenodo.org/record/10522951/files/db-light.tar.gz
tar -xzf db-light.tar.gz
rm db-light.tar.gz

If required, or desired, the AMRFinderPlus DB can also be updated manually:

amrfinder_update --force_update --database db-light/amrfinderplus-db/

If you're using bakta on Docker:

docker run -v /path/to/desired-db-path:/db --entrypoint /bin/bash oschwengers/bakta:latest -c "bakta_db download --output /db --type [light|full]"

As an additional data repository backup, we provide the most recent database version via our institute servers: full, light. However, the bandwith is limited. Hence, please use it with caution and only if Zenodo might be temporarily uncreachable or slow. In these cases, please also download the AMRFinderPlus database as indicated above.

Update an existing database:

bakta_db update --db <existing-db-path> [--tmp-dir <tmp-directory>]

Update using Docker:

docker run -v /path/to/desired-db-path:/db --entrypoint /bin/bash oschwengers/bakta:latest -c "bakta_db update --db /db/db-[light|full]"

The database path can be provided either via parameter (--db) or environment variable (BAKTA_DB):

bakta --db <db-path> genome.fasta

export BAKTA_DB=<db-path>
bakta genome.fasta

For system-wide setups, the database can also be copied to the Bakta base directory:

cp -r db/ <bakta-installation-dir>

As Bakta takes advantage of AMRFinderPlus for the annotation of AMR genes, AMRFinder is required to setup its own internal databases in a <amrfinderplus-db> subfolder within the Bakta database <db-path>, once via amrfinder_update --force_update --database <db-path>/amrfinderplus-db/. To ease this process we recommend to use Bakta's internal download procedure.