Skip to content

npbhavya/baczy

Repository files navigation

Edwards Lab License: MIT GitHub language count GitHub last commit (branch) CI

install with pip Pip Downloads install with bioconda Bioconda Downloads

Baczy

Overview

Baczy is a Snakemake-based workflow for assembling and annotating bacterial host genomes. It extends Sphae, which assembles and annotates phage genomes, by enabling host genome assembly and functional annotation.

🔹 Features:
Quality control (Fastp)
Genome assembly (MEGAHIT, Hybracter)
Functional annotation (Bakta)
Taxonomic classification (GTDB-Tk)
Taxonomic tree (GTDB-Tk) ✔ Defense & resistance profiling (Defense-Finder, AMRFinderPlus, CapsuleDB)
Prophage detection (PhiSpy)
Pan-genome analysis (Panaroo)

Installion

Prerequisites installation

  • Install singularity or load the module On deepthought cluster
    module load apptainer

  • Install miniconda Download and install Miniconda: Miniconda Installation Guide

Steps for installing workflow

Setting up a conda environment

conda create -n baczy python=3.12
conda activate baczy

Using one of the methods below baczy can be downloaded within this environment

Option 1: Source Installation

#clone repository
git clone https://github.com/npbhavya/baczy.git

#move to sphae folder
cd baczy

#install
pip install -e .

#confirm the workflow is installed by running the below command 
baczy --help

Option 2: Pip installation Note: This installation doesnt include singualrity/docker, so that has to be downloaded separately.

pip install baczy

Option 3:Conda installation Note: This is currently not working - fixing this with the next version. Until then, use pip install

mamba install bioconda::baczy

Database setup

Download and place the required databases to a directory:

Set the databases path to variable $BACZY_DATABASE_PATH

export $BACZY_DATABASE_PATH=/home/user/database

Update the path /home/user/database to the correct database directory path

Running the workflow

Run Baczy using a single command!

Before starting the run The taxonomic tree is generated using GTDB-Tk, so update the lines

gtdbtk:
  outgroup: "d__Archaea"
  taxa_filter: "d__Bacteria"

This can be set to more specific genera:

gtdbtk:
  outgroup: "g__Escherichia"
  taxa_filter: "g__Achromobacter"

For paired end reads

baczy run --input sample-data/illumina --cores 32 --use-singularity --sdm apptainer --output test -k --use-conda

For long reads

baczy run --input sample-data/nanopore --sequencing longread --cores 32 -k --use-singularity --sdm apptainer --output test -k --use-conda

Intermediate files

Stored in:

baczy.out/PROCESSING

Final Results and Output

Stored in RESULT-short for short reads or RESULTS-long for long reads

Each folder contains:

  • {sample} folder
    • {sample}_amrfinderplus table: identified AMR genes in the genome
    • {sample}_contigs.fa or {sample}_final.fasta : assembled genomes for each genome
    • {sample}.faa : identified proteins
    • {sample}.fna : identified genes
    • {sample}.gbff
    • {sample}.gff3
    • {sample}.png and {sample}.svg : genome visualized
    • {sample}.txt: summary
    • {sample}_prophage_coordinates.tsv: location of the identified prophages using Phispy
  • amrfinder_summary.tsv : a table with all the AMRFinder genes in all the samples
  • bakta_summary.tsv : Bakta summary for all the samples saved to one table
  • checkm2_quality_report.tsv : Checkm2 completenes results
  • defensefinder_summary.tsv : All the defense systems found in all the samples
  • gtdbtk.ba120_summary.tsv : GTDBTK summary with the predicted taxa for each of the samples
  • gtdbtk.bac120.decorated.tree , gtdbtk.bac120.tree.table : GTDBTK tree and the tree table
    • visualize the tree on iTOL
  • prophage_regions.tsv : Location of the prophage regions in al the samples
  • Panaroo folder

About

Bacterial genome analysis workflow that identifies antibiotic resistance, defense mechanisms, virulence factors, prophages, and capsule-related genes.

Resources

Stars

5 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors