Bactopia turns a FASTQ into a finished bacterial genome analysis
A flexible pipeline for complete analysis of bacterial genomes
At a glance
- What is it?
- Bactopia is a Nextflow pipeline for complete analysis of bacterial genomes, splitting into a per-isolate analysis pipeline and a set of comparative Bactopia Tools for summary reports, pan-genome and phylogeny. It installs as a single Conda environment, and its output structure is designed so you can rerun comparative steps over any subset of isolates.
- Who is it for?
- Adopt Bactopia if you analyse bacterial isolates in batches and want assembly, annotation, typing and contamination checks assembled into one repeatable command rather than a pile of scripts. Skip it if you work on a single genome or need custom analyses the pipeline does not cover, since the tools it wraps are fixed at the versions pinned in versions.yml.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 79 days ago.
- What is it written in?
- Mainly Nextflow, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 20, 2026, and from our analysis. They are not legal advice.
Editorial analysis
Two halves: per-isolate analysis and comparative tools
Bactopia describes itself as a flexible pipeline for complete analysis of bacterial genomes, with the stated goal of processing your data with a broad set of tools so you can get to the interesting part of the analysis sooner. The project splits into two main parts. The Bactopia Analysis Pipeline is the main per-isolate workflow, built with Nextflow, and it takes input FASTQs, either local or pulled from SRA and ENA, through numerous analyses including quality control, assembly, annotation, minmer sketch queries and sequence typing. The Bactopia Tools are a set of independent workflows for comparative analyses, which may include summary reports, pan-genome analysis and phylogenetic tree construction. The two halves connect through one design decision. Because of the predictable output structure, you can pick and choose which samples to include for processing with a Bactopia Tool, so the comparative stage is not a separate pipeline with its own input preparation but a second pass over the first stage's output.
Installing it as one Conda environment
The installation section explains the reasoning first, and the reasoning is the interesting part. Bactopia has a lot of tools built into its workflow, all of them lead to numerous dependencies, and navigating dependencies can often turn into a very frustrating process. With that in mind, from the onset Bactopia was developed to only include programs that are installable using Conda. The environment is created with mamba, which the README marks as recommended, or with standard conda.
# Recommended
mamba create -n bactopia -c conda-forge -c bioconda bactopia
# or with standard conda
conda create -n bactopia -c conda-forge -c bioconda bactopiaAfter a few minutes you have an environment named bactopia, which you activate like any other.
conda activate bactopiaConda itself runs on Windows, macOS and Linux, and Bactopia has been tested using the Miniforge installer, with the Anaconda installer expected to work the same. The Bioconda channel is where the wrapped tools live, and the package is also published to Anaconda Server under bioconda/bactopia. The repository layout backs the design up, with a main.nf and nextflow.config at the root, a modules directory and a workflows directory holding the pipeline and the tools, a subworkflows directory, a conf directory for configuration, an environment.yml, versions.yml for pinned tool versions, a catalog.json, nextflow_schema.json for parameter validation, and a tests directory.
Running the pipeline on one isolate, then on many
The quick start covers the input shapes you will actually use. First you fetch the datasets, then you run the pipeline.
bactopia datasetsFor paired-end reads, the sample name and the read files are given explicitly.
bactopia --R1 R1.fastq.gz --R2 R2.fastq.gz --sample SAMPLE_NAME \
--datasets datasets/ --outdir OUTDIRSingle-end reads use the --SE flag. Several samples at once go through a file list.
bactopia prepare MY-FASTQS/ > fastqs.txt
bactopia --fastqs fastqs.txt --datasets datasets --outdir OUTDIRAnd public sequence data is handled by accession rather than by local files, either one experiment at a time with --accession, or a search across the archives written to a file first.
bactopia search "staphylococcus aureus" > accessions.txt
bactopia --accessions accessions.txt --dataset datasets --outdir ${OUTDIR}The single-experiment variant takes the accession directly, for example an SRX identifier, and points at the datasets directory and the output directory. The overall shape is consistent across all of them, which is what makes a pipeline like this learnable in an afternoon.
Where the pipeline came from, and what it borrows
The project history is short and explains the design. Bactopia was inspired by Staphopia, a workflow the authors released targeting Staphylococcus aureus genomes. Using what they learned from Staphopia and from user feedback, Bactopia was developed from scratch with usability, portability and speed in mind from the start. That Staphopia connection persists in the documentation, which includes a tutorial replicating it, and the paper the project is associated with is in mSystems with DOI 10.1128/mSystems.00190-20. The acknowledgements section is candid about the scale of the borrowing, describing Bactopia as a case of standing upon the shoulders of giants and noting that nearly every component was created by others and made freely available. The README asks that any datasets or tools you used be cited, and there is a public list of each dataset and tool Bactopia uses for that purpose. The licence is MIT, and the releases are v4.1.0 from 2026-08-05, v4.0.0 from 2026-04-29 and v3.2.0 from 2025-03-21, with the last push to the repository on 2026-08-05.
The alternatives, and how they differ in approach
The README lists alternatives and is careful to say the author has not personally used them. AQUAMIS is described as species-specific quality control, assembly and contamination detection for microbial isolate sequences. ASA3P is an automatic and scalable pipeline for assembly, annotation and higher-level analysis of closely related bacterial isolates. MicroPIPE is an end-to-end workflow for high-quality complete bacterial genome construction. Nullarbor is another alternative in the same space. ProkEvo is an automated, reproducible and scalable framework for high-throughput bacterial population genomics analyses, and Public Health Bacterial Genomics is another option in the same space. The differences are mostly of design centre. Some alternatives are built around a narrower set of organisms and questions. A tool like ProkEvo or ASA3P is built for throughput across large populations with an emphasis on reproducibility and scaling. Bactopia's pitch is different again: it is the flexible pipeline that lets you run a broad set of tools per isolate and then reuse the results for whatever comparative questions you have afterwards, with the predictable output structure as the mechanism.
Where Bactopia is the wrong choice
Three limits. The first is that the tool set is fixed at the versions pinned in versions.yml, so if your analysis needs a specific tool at a specific version, or a method the pipeline does not wrap, you cannot add it without forking. The README calls the pipeline flexible, and it is flexible in the sense of breadth and configuration rather than extensibility. The second is the install cost, which the README is unusually blunt about. Building the environment takes minutes and pulls a large dependency tree from conda-forge and bioconda, and on a machine where you cannot reach those channels, for example an air-gapped analysis environment, you are stuck. The third is that the per-isolate analysis is not free in compute either. Assembly and annotation are the expensive steps, and the pipeline is designed to run a broad set of analyses on every isolate rather than a chosen subset, which is the right default for a completeness-oriented tool and the wrong one if you only need a quick quality check on thousands of samples. A per-sample run of a QC tool would be faster for that case, and the comparative tools are only useful if you have already paid the per-isolate cost.
Editorial conclusion
Adopt Bactopia if you analyse bacterial isolates in batches and want assembly, annotation, typing and contamination checks assembled into one repeatable command rather than a pile of scripts. Skip it if you work on a single genome or need custom analyses the pipeline does not cover, since the tools it wraps are fixed at the versions pinned in versions.yml. Before you start, read the predictable output structure documentation, because that structure is what makes the comparative tools usable on a subset of your samples.
Frequently asked questions
What is Bactopia?
It is a flexible pipeline for complete analysis of bacterial genomes, built with Nextflow, that processes input FASTQs, local or from SRA and ENA, through quality control, assembly, annotation, minmer sketch queries, sequence typing and more. It is MIT licensed and the documentation is at bactopia.io.
How do I install Bactopia?
Create a Conda environment from conda-forge and bioconda, using `mamba create -n bactopia -c conda-forge -c bioconda bactopia` or the equivalent conda create command, then activate it with `conda activate bactopia`. The project only includes tools that are installable with Conda, to avoid dependency resolution problems.
How do I run Bactopia on multiple samples or public accessions?
For local files, `bactopia prepare MY-FASTQS/ > fastqs.txt` writes a file list and you pass it with --fastqs. For public data, `bactopia search "staphylococcus aureus" > accessions.txt` writes accessions and you pass them with --accessions, while a single experiment takes --accession directly.
What are Bactopia Tools and how do they differ from the analysis pipeline?
Bactopia Tools are independent workflows for comparative analyses such as summary reports, pan-genome analysis and phylogenetic tree construction. They rely on the predictable output structure of the per-isolate analysis pipeline, so you can choose which samples to include for processing.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/bactopia-bactopia)Was this useful?