# Bakta
## Installation
```
conda create -n bakta
conda activate bakta
conda install -c conda-forge -c bioconda bakta
```
## 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 and installed manually:
`wget https://zenodo.org/record/14916843/files/db-light.tar.xz`
`bakta_db install -i db-light.tar.xz`
If required, or desired, the AMRFinderPlus DB can also be updated manually:
`amrfinder_update --force_update --database db-light/amrfinderplus-db/`
## Analysis
### Genome annotation
```
bakta --db ./bakta/db/ --output bakta --verbose --threads 20
```
### Genome annotation for multiple genomes
#### Script
```
#!/bin/bash
outputdir="bakta"
fnadir="/path/to/fna/files/fna_coded"
extension=".fna"
cpus=4
dbdir="/path/to/bakta/db"
# Create output directory if it doesn't exist
if [ ! -d "$outputdir" ]; then
mkdir "$outputdir"
fi
allfna=("${fnadir}"/*"${extension}")
for file in "${allfna[@]}"
do
bname=$(basename "$file" "${extension}")
bakta --db "$dbdir" --prefix "$bname" --output "$outputdir/$bname" --verbose "$file"
done
```