Skip to main content

Full Guide

Bactopia is a complete pipeline for the analysis of bacterial genomes, which includes more than 150 bioinformatics tools. In this section, each step of the pipeline will be described in detail. This includes the input data, output data, and the parameters for each step.

Bactopia Workflow

Looking at the workflow overview below, it might not look like much is happening, but I can assure you that a lot is going on. The workflow is broken down into 8 steps, which are:

  1. Gather - Collect all the data in one place
  2. QC - Quality control of the data
  3. Assembler - Assemble the reads into contigs
  4. Annotator - Annotate the contigs
  5. Sketcher - Create a sketch of the contigs, and query databases
  6. Sequence Typing - Determine the sequence type of the contigs
  7. Antibiotic Resistance - Determine the antibiotic resistance of the contigs and proteins
  8. Merlin - Automatically run species-specific tools based on distance

This guide is meant to be extensive, so it will be very detailed. If you are looking for a guide to get started quickly, please check out the Beginner's Guide.

Otherwise, let's get started!

Step 1 - Gather

The main purpose of the gather step is to get all the samples into a single place. This includes downloading samples from ENA/SRA or NCBI Assembly. The tools used are:

ToolDescription
artFor simulating error-free reads for an input assembly
fastq-dlDownloading FASTQ files from ENA/SRA
ncbi-genome-downloadDownloading FASTA files from NCBI Assembly

This gather step also does basic QC checks to help prevent downstream failures.

Outputs

Merged Results

Below are results that are concatenated into a single file.

FilenameDescription
meta.tsvA tab-delimited file with bactopia metadata for all samples

gather

Below is a description of the per-sample results from the gather subworkflow.

FilenameDescription
-meta.tsvA tab-delimited file with bactopia metadata for each sample

Failed Quality Checks

Built into Bactopia are few basic quality checks to help prevent downstream failures. If a sample fails one of these checks, it will be excluded from further analysis. By excluding these samples, complete pipeline failures are prevented.

FilenameDescription
-gzip-error.txtSample failed Gzip checks and excluded from further analysis
-low-basepair-proportion-error.txtSample failed basepair proportion checks and excluded from further analysis
-low-read-count-error.txtSample failed read count checks and excluded from further analysis
-low-sequence-depth-error.txtSample failed sequenced basepair checks and excluded from further analysis
Poor samples are excluded to prevent downstream failures

Samples that fail any of the QC checks will be excluded from further analysis. Those samples will generate a *-error.txt file with the error message. Excluding these samples prevents downstream failures that cause the whole workflow to fail.

Example Error: Input FASTQ(s) failed Gzip checks

If input FASTQ(s) fail to pass Gzip test, the sample will be excluded from further analysis.

Example Text from <SAMPLE_NAME>-gzip-error.txt
<SAMPLE_NAME> FASTQs failed Gzip tests. Please check the input FASTQs. Further analysis is discontinued.

Example Error: Input FASTQs have disproportionate number of reads

If input FASTQ(s) for a sample have disproportionately different number of reads between the two pairs, the sample will be excluded from further analysis. You can adjust this minimum read count using the --min_proportion parameter.

Example Text from <SAMPLE_NAME>-low-basepair-proportion-error.txt
<SAMPLE_NAME> FASTQs failed to meet the minimum shared basepairs (X``). They shared Ybasepairs, with R1 havingAbp and R2 havingB` bp. Further analysis is discontinued.

Example Error: Input FASTQ(s) has too few reads

If input FASTQ(s) for a sample have less than the minimum required reads, the sample will be excluded from further analysis. You can adjust this minimum read count using the --min_reads parameter.

Example Text from <SAMPLE_NAME>-low-read-count-error.txt
<SAMPLE_NAME> FASTQ(s) contain X total reads. This does not exceed the required minimum Y read count. Further analysis is discontinued.

Example Error: Input FASTQ(s) has too little sequenced basepairs

If input FASTQ(s) for a sample fails to meet the minimum number of sequenced basepairs, the sample will be excluded from further analysis. You can adjust this minimum read count using the --min_basepairs parameter.

Example Text from <SAMPLE_NAME>-low-sequence-depth-error.txt
<SAMPLE_NAME> FASTQ(s) contain X total basepairs. This does not exceed the required minimum Y bp. Further analysis is discontinued.

Parameters

Required

The following parameters are how you will provide either local or remote samples to be processed by Bactopia.

ParameterDescription
--samplesA FOFN (via bactopia prepare) with sample names and paths to FASTQ/FASTAs to process
Type: string
--r1First set of compressed (gzip) Illumina paired-end FASTQ reads (requires --r2 and --sample)
Type: string
--r2Second set of compressed (gzip) Illumina paired-end FASTQ reads (requires --r1 and --sample)
Type: string
--seCompressed (gzip) Illumina single-end FASTQ reads (requires --sample)
Type: string
--ontCompressed (gzip) Oxford Nanopore FASTQ reads (requires --sample)
Type: string
--hybridCreate hybrid assembly using Unicycler. (requires --r1, --r2, --ont and --sample)
Type: boolean
--short_polishCreate hybrid assembly from long-read assembly and short read polishing. (requires --r1, --r2, --ont and --sample)
Type: boolean
--sampleSample name to use for the input sequences
Type: string
--accessionsA file containing ENA/SRA Experiment accessions or NCBI Assembly accessions to processed
Type: string
--accessionSample name to use for the input sequences
Type: string
--assemblyA assembled genome in compressed FASTA format. (requires --sample)
Type: string
--check_samplesValidate the input FOFN provided by --samples
Type: boolean

Dataset

Define where the pipeline should find input data and save output data.

ParameterDescription
--speciesName of species for species-specific dataset to use
Type: string
--ask_merlinAsk Merlin to execute species specific Bactopia tools based on Mash distances
Type: boolean
--coverageReduce samples to a given coverage, requires a genome size
Type: integer, Default: 100
--genome_sizeExpected genome size (bp) for all samples, required for read error correction and read subsampling
Type: string, Default: 0
--use_baktaUse Bakta for annotation, instead of Prokka
Type: boolean

Citations

If you use Bactopia and gather results in your analysis, please cite the following.

Step 2 - QC

The qc module uses a variety of tools to perform quality control on Illumina and Oxford Nanopore reads. The tools used are:

ToolTechnologyDescription
bbtoolsIlluminaA suite of tools for manipulating reads
fastpIlluminaA tool designed to provide fast all-in-one preprocessing for FastQ files
fastqcIlluminaA quality control tool for high throughput sequence data
fastq_scanNanoporeA tool for quickly scanning FASTQ files
lighterIlluminaA tool for correcting sequencing errors in Illumina reads
NanoPlotNanoporeA tool for plotting long read sequencing data
nanoqNanoporeA tool for calculating quality metrics for Oxford Nanopore reads
porechopNanoporeA tool for removing adapters from Oxford Nanopore reads
rasusaNanoporeRandomly subsample sequencing reads to a specified coverage

Similar to the gather step, the qc step will also stop samples that fail to meet basic QC checks from continuing downstream.

Outputs

Quality Control

Below is a description of the per-sample results from qc subworkflow.

FilenameDescription
<SAMPLE_NAME>.fastq.gzA gzipped FASTQ file containing the cleaned Illumina single-end, or Oxford Nanopore reads
<SAMPLE_NAME>_R{1|2}.fastq.gzA gzipped FASTQ file containing the cleaned Illumina paired-end reads
<SAMPLE_NAME>-{final|original}.jsonA JSON file containing the QC results generated by fastq-scan
<SAMPLE_NAME>-{final|original}_fastqc.html(Illumina Only) A HTML report of the QC results generated by fastqc
<SAMPLE_NAME>-{final|original}_fastqc.zip(Illumina Only) A zip file containing the complete set of fastqc results
<SAMPLE_NAME>-{final|original}_fastp.json(Illumina Only) A JSON file containing the QC results generated by fastp
<SAMPLE_NAME>-{final|original}_fastp.html(Illumina Only) A HTML report of the QC results generated by fastp
<SAMPLE_NAME>-{final|original}_NanoPlot-report.html(ONT Only) A HTML report of the QC results generated by NanoPlot
<SAMPLE_NAME>-{final|original}_NanoPlot.tar.gz(ONT Only) A tarball containing the complete set of NanoPlot results

Failed Quality Checks

Built into Bactopia are few basic quality checks to help prevent downstream failures. If a sample fails one of these checks, it will be excluded from further analysis. By excluding these samples, complete pipeline failures are prevented.

FilenameDescription
.error-fastq.gzA gzipped FASTQ file of Illumina Single-End or Oxford Nanopore reads that failed QC
_R{1|2}.error-fastq.gzA gzipped FASTQ file of Illumina Single-End or Oxford Nanopore reads that failed QC
-low-read-count-error.txtSample failed read count checks and excluded from further analysis
-low-sequence-coverage-error.txtSample failed sequenced coverage checks and excluded from further analysis
-low-sequence-depth-error.txtSample failed sequenced basepair checks and excluded from further analysis
Poor samples are excluded to prevent downstream failures

Samples that fail any of the QC checks will be excluded from further analysis. Those samples will generate a *-error.txt file with the error message. Excluding these samples prevents downstream failures that cause the whole workflow to fail.

Example Error: After QC, too few reads remain

If after cleaning reads, a sample has less than the minimum required reads, the sample will be excluded from further analysis. You can adjust this minimum read count using the --min_reads parameter.

Example Text from <SAMPLE_NAME>-low-read-count-error.txt
<SAMPLE_NAME> FASTQ(s) contain X total reads. This does not exceed the required minimum Y read count. Further analysis is discontinued.

Example Error: After QC, too little sequence coverage remains

If after cleaning reads, a sample has failed to meet the minimum sequence coverage required, the sample will be excluded from further analysis. You can adjust this minimum read count using the --min_coverage parameter.

Note: This check is only performed when a genome size is available.

Example Text from <SAMPLE_NAME>-low-sequence-coverage-error.txt
After QC, <SAMPLE_NAME> FASTQ(s) contain X total basepairs. This does not exceed the required minimum Y bp (Zx coverage). Further analysis is discontinued.

Example Error: After QC, too little sequenced basepairs remain

If after cleaning reads, a sample has failed to meet the minimum number of sequenced basepairs, the sample will be excluded from further analysis. You can adjust this minimum read count using the --min_basepairs parameter.

Example Text from <SAMPLE_NAME>-low-sequence-depth-error.txt
<SAMPLE_NAME> FASTQ(s) contain X total basepairs. This does not exceed the required minimum Y bp. Further analysis is discontinued.

QC Parameters

ParameterDescription
--use_bbmapIllumina reads will be QC'd using BBMap
Type: boolean
--use_porechopUse Porechop to remove adapters from ONT reads
Type: boolean
--skip_qcThe QC step will be skipped and it will be assumed the inputs sequences have already been QCed.
Type: boolean
--skip_qc_plotsQC Plot creation by FastQC or Nanoplot will be skipped
Type: boolean
--skip_error_correctionFLASH error correction of reads will be skipped.
Type: boolean
--adaptersA FASTA file containing adapters to remove
Type: string, Default: /home/robert_petit/bactopia/data/EMPTY_ADAPTERS
--adapter_kKmer length used for finding adapters.
Type: integer, Default: 23
--phixphiX174 reference genome to remove
Type: string, Default: /home/robert_petit/bactopia/data/EMPTY_PHIX
--phix_kKmer length used for finding phiX174.
Type: integer, Default: 31
--ktrimTrim reads to remove bases matching reference kmers
Type: string, Default: r
--minkLook for shorter kmers at read tips down to this length, when k-trimming or masking.
Type: integer, Default: 11
--hdistMaximum Hamming distance for ref kmers (subs only)
Type: integer, Default: 1
--tpeWhen kmer right-trimming, trim both reads to the minimum length of either
Type: string, Default: t
--tboTrim adapters based on where paired reads overlap
Type: string, Default: t
--qtrimTrim read ends to remove bases with quality below trimq.
Type: string, Default: rl
--trimqRegions with average quality BELOW this will be trimmed if qtrim is set to something other than f
Type: integer, Default: 6
--maqReads with average quality (after trimming) below this will be discarded
Type: integer, Default: 10
--minlengthReads shorter than this after trimming will be discarded
Type: integer, Default: 35
--ftmIf positive, right-trim length to be equal to zero, modulo this number
Type: integer, Default: 5
--tossjunkDiscard reads with invalid characters as bases
Type: string, Default: t
--ainWhen detecting pair names, allow identical names
Type: string, Default: f
--qoutPHRED offset to use for output FASTQs
Type: string, Default: 33
--maxcorMax number of corrections within a 20bp window
Type: integer, Default: 1
--sampleseedSet to a positive number to use as the random number generator seed for sampling
Type: integer, Default: 42
--ont_minlengthONT Reads shorter than this will be discarded
Type: integer, Default: 1000
--ont_minqualMinimum average read quality filter of ONT reads
Type: integer
--porechop_optsExtra Porechop options in quotes
Type: string
--nanoplot_optsExtra NanoPlot options in quotes
Type: string
--bbduk_optsExtra BBDuk options in quotes
Type: string
--fastp_optsExtra fastp options in quotes
Type: string

Citations

If you use Bactopia and qc results in your analysis, please cite the following.

Step 3 - Assembler

The assembler module uses a variety of assembly tools to create an assembly of Illumina and Oxford Nanopore reads. The tools used are:

ToolDescription
DragonflyeAssembly of Oxford Nanopore reads, as well as hybrid assembly with short-read polishing
ShovillAssembly of Illumina paired-end reads
Shovill-SEAssembly of Illumina single-end reads
UnicyclerHybrid assembly, using short-reads first then long-reads

Summary statistics for each assembly are generated using assembly-scan.

Outputs

Merged Results

Below are results that are concatenated into a single file.

FilenameDescription
assembly-scan.tsvAssembly statistics for all samples

Dragonflye

Below is a description of the per-sample results for Oxford Nanopore reads using Dragonflye.

FilenameDescription
<SAMPLE_NAME>.fna.gzThe final assembly produced by Dragonflye
<SAMPLE_NAME>.tsvA tab-delimited file containing assembly statistics
flye-info.txtA log file containing information about the Flye assembly
{flye|miniasm|raven}-unpolished.fasta.gzRaw unprocessed assembly produced by the used assembler
{flye|miniasm|raven}-unpolished.gfa.gzRaw unprocessed assembly graph produced by the used assembler

Shovill

Below is a description of the per-sample results for Illumina reads using Shovill or Shovill-SE.

FilenameDescription
<SAMPLE_NAME>.fna.gzThe final assembly produced by Dragonflye
<SAMPLE_NAME>.tsvA tab-delimited file containing assembly statistics
flash.hist(Paired-End Only) Numeric histogram of merged read lengths.
flash.histogram(Paired-End Only) Visual histogram of merged read lengths
{megahit|spades|velvet}-unpolished.gfa.gzRaw unprocessed assembly graph produced by the used assembler
shovill.correctionsList of post-assembly corrections made by Shovill

Hybrid Assembly (Unicycler)

Below is a description of the per-sample results for a hybrid assembly using Unicycler (--hybrid). When using Unicycler, the short-reads are assembled first, then the long-reads are used to polish the assembly.

FilenameDescription
<SAMPLE_NAME>.fna.gzThe final assembly produced by Dragonflye
<SAMPLE_NAME>.tsvA tab-delimited file containing assembly statistics
unicycler-unpolished.fasta.gzRaw unprocessed assembly produced by Unicycler
unicycler-unpolished.fasta.gzRaw unprocessed assembly graph produced by Unicycler

Hybrid Assembly (Short Read Polishing)

Below is a description of the per-sample results for a hybrid assembly using Dragonflye (--short_polish). When using Dragonflye, the long-reads are assembled first, then the short-reads are used to polish the assembly.

tip
Prefer --short_polish over --hybrid with recent ONT sequencing

Using Unicycler (--hybrid) to create a hybrid assembly works great when you have low-coverage noisy long-reads. However, if you are using recent ONT sequencing, you likely have high-coverage and using the --short_polish method is going to yeild better results (and be faster!) than --hybrid.

FilenameDescription
<SAMPLE_NAME>.fna.gzThe final assembly produced by Dragonflye
<SAMPLE_NAME>.tsvA tab-delimited file containing assembly statistics
flye-info.txtA log file containing information about the Flye assembly
{flye|miniasm|raven}-unpolished.fasta.gzRaw unprocessed assembly produced by the used assembler
{flye|miniasm|raven}-unpolished.gfa.gzRaw unprocessed assembly graph produced by the used assembler

Failed Quality Checks

Built into Bactopia are few basic quality checks to help prevent downstream failures. If a sample fails one of these checks, it will be excluded from further analysis. By excluding these samples, complete pipeline failures are prevented.

FilenameDescription
-assembly-error.txtSample failed read count checks and excluded from further analysis
Poor samples are excluded to prevent downstream failures

Samples that fail any of the QC checks will be excluded from further analysis. Those samples will generate a *-error.txt file with the error message. Excluding these samples prevents downstream failures that cause the whole workflow to fail.

Example Error: Assembled Successfully, but 0 Contigs

If a sample assembles successfully, but 0 contigs are formed, the sample will be excluded from further analysis.

Example Text from <SAMPLE_NAME>-assembly-error.txt
<SAMPLE_NAME> assembled successfully, but 0 contigs were formed. Please investigate <SAMPLE_NAME> to determine a cause (e.g. metagenomic, contaminants, etc...) for this outcome. Further assembly-based analysis of <SAMPLE_NAME> will be discontinued.

Example Error: Assembled successfully, but poor assembly size

If you sample assembles successfully, but the assembly size is less than the minimum allowed genome size, the sample will be excluded from further analysis. You can adjust this minimum size using the --min_genome_size parameter.

Example Text from <SAMPLE_NAME>-assembly-error.txt
<SAMPLE_NAME> assembled size (000 bp) is less than the minimum allowed genome size (000 bp). If this is unexpected, please investigate <SAMPLE_NAME> to determine a cause (e.g. metagenomic, contaminants, etc...) for the poor assembly. Otherwise, adjust the --min_genome_size parameter to fit your need. Further assembly based analysis of <SAMPLE_NAME> will be discontinued.

Assembler Parameters

ParameterDescription
--shovill_assemblerAssembler to be used by Shovill
Type: string, Default: skesa
--dragonflye_assemblerAssembler to be used by Dragonflye
Type: string, Default: flye
--use_unicyclerUse unicycler for paired end assembly
Type: boolean
--min_contig_lenMinimum contig length <0=AUTO>
Type: integer, Default: 500
--min_contig_covMinimum contig coverage <0=AUTO>
Type: integer, Default: 2
--contig_namefmtFormat of contig FASTA IDs in 'printf' style
Type: string
--shovill_optsExtra assembler options in quotes for Shovill
Type: string
--shovill_kmersK-mers to use <blank=AUTO>
Type: string
--dragonflye_optsExtra assembler options in quotes for Dragonflye
Type: string
--trimEnable adaptor trimming
Type: boolean
--no_stitchDisable read stitching for paired-end reads
Type: boolean
--no_corrDisable post-assembly correction
Type: boolean
--unicycler_modeBridging mode used by Unicycler
Type: string, Default: normal
--min_polish_sizeContigs shorter than this value (bp) will not be polished using Pilon
Type: integer, Default: 10000
--min_component_sizeGraph dead ends smaller than this size (bp) will be removed from the final graph
Type: integer, Default: 1000
--min_dead_end_sizeGraph dead ends smaller than this size (bp) will be removed from the final graph
Type: integer, Default: 1000
--nanohqFor Flye, use '--nano-hq' instead of --nano-raw
Type: boolean
--medaka_modelThe model to use for Medaka polishing
Type: string
--medaka_roundsThe number of Medaka polishing rounds to conduct
Type: integer
--racon_roundsThe number of Racon polishing rounds to conduct
Type: integer, Default: 1
--no_polishSkip the assembly polishing step
Type: boolean
--no_miniasmSkip miniasm+Racon bridging
Type: boolean
--no_rotateDo not rotate completed replicons to start at a standard gene
Type: boolean
--reassembleIf reads were simulated, they will be used to create a new assembly.
Type: boolean
--polypolish_roundsNumber of polishing rounds to conduct with Polypolish for short read polishing
Type: integer, Default: 1
--pilon_roundsNumber of polishing rounds to conduct with Pilon for short read polishing
Type: integer

Citations

If you use Bactopia and assembler results in your analysis, please cite the following.

Step 4 - Annotator

Outputs

Prokka

Below is a description of the per-sample results from Prokka.

FilenameDescription
.blastdb.tar.gzA gzipped tar archive of BLAST+ database of the contigs, genes, and proteins
.faa.gzProtein FASTA file of the translated CDS sequences.
.ffn.gzNucleotide FASTA file of all the prediction transcripts (CDS, rRNA, tRNA, tmRNA, misc_RNA)
.fna.gzNucleotide FASTA file of the input contig sequences.
.gbk.gzThis is a standard GenBank file derived from the master .gff. If the input to prokka was a multi-FASTA, then this will be a multi-GenBank, with one record for each sequence.
.gff.gzThis is the master annotation in GFF3 format, containing both sequences and annotations. It can be viewed directly in Artemis or IGV.
.sqn.gzAn ASN1 format "Sequin" file for submission to GenBank. It needs to be edited to set the correct taxonomy, authors, related publication etc.
.tbl.gzFeature Table file, used by "tbl2asn" to create the .sqn file.
.tsvTab-separated file of all features (locus_tag,ftype,len_bp,gene,EC_number,COG,product)
.txtStatistics relating to the annotated features found.

Bakta

Below is a description of the per-sample results from Bakta.

FilenameDescription
.blastdb.tar.gzA gzipped tar archive of BLAST+ database of the contigs, genes, and proteins
.embl.gzAnnotations & sequences in (multi) EMBL format
.faa.gzCDS/sORF amino acid sequences as FASTA
.ffn.gzFeature nucleotide sequences as FASTA
.fna.gzReplicon/contig DNA sequences as FASTA
.gbff.gzAnnotations & sequences in (multi) GenBank format
.gff3.gzAnnotations & sequences in GFF3 format
.hypotheticals.faa.gzHypothetical protein CDS amino acid sequences as FASTA
.hypotheticals.tsvFurther information on hypothetical protein CDS as simple human readable tab separated values
.tsvAnnotations as simple human readable tab separated values
.txtBroad summary of Bakta annotations

Parameters

Prokka

ParameterDescription
--proteinsFASTA file of trusted proteins to first annotate from
Type: string
--prodigal_tfTraining file to use for Prodigal
Type: string
--compliantForce Genbank/ENA/DDJB compliance
Type: boolean
--centreSequencing centre ID
Type: string, Default: Bactopia
--prokka_coverageMinimum coverage on query protein
Type: integer, Default: 80
--prokka_evalueSimilarity e-value cut-off
Type: string, Default: 1e-09
--prokka_optsExtra Prokka options in quotes.
Type: string

Bakta Download

ParameterDescription
--bakta_dbTarball or path to the Bakta database
Type: string
--bakta_db_typeWhich Bakta DB to download 'full' (~30GB) or 'light' (~2GB)
Type: string, Default: full
--bakta_save_as_tarballSave the Bakta database as a tarball
Type: boolean
--download_baktaDownload the Bakta database to the path given by --bakta_db
Type: boolean

Bakta

ParameterDescription
--proteinsFASTA file of trusted proteins to first annotate from
Type: string
--prodigal_tfTraining file to use for Prodigal
Type: string
--repliconsReplicon information table (tsv/csv)
Type: string
--min_contig_lengthMinimum contig size to annotate
Type: integer, Default: 1
--keep_contig_headersKeep original contig headers
Type: boolean
--compliantForce Genbank/ENA/DDJB compliance
Type: boolean
--skip_trnaSkip tRNA detection & annotation
Type: boolean
--skip_tmrnaSkip tmRNA detection & annotation
Type: boolean
--skip_rrnaSkip rRNA detection & annotation
Type: boolean
--skip_ncrnaSkip ncRNA detection & annotation
Type: boolean
--skip_ncrna_regionSkip ncRNA region detection & annotation
Type: boolean
--skip_crisprSkip CRISPR array detection & annotation
Type: boolean
--skip_cdsSkip CDS detection & annotation
Type: boolean
--skip_sorfSkip sORF detection & annotation
Type: boolean
--skip_gapSkip gap detection & annotation
Type: boolean
--skip_oriSkip oriC/oriT detection & annotation
Type: boolean
--bakta_optsExtra Backa options in quotes. Example: '--gram +'
Type: string

Citations

If you use Bactopia and annotator results in your analysis, please cite the following.

Step 5 - Sketcher

The sketcher module uses Mash and Sourmash to create sketches and query RefSeq and GTDB.

Outputs

sketcher

Below is a description of the per-sample results from the sketcher subworkflow.

FilenameDescription
<SAMPLE_NAME>-k{21|31}.mshA Mash sketch of the input assembly for k=21 and k=31
<SAMPLE_NAME>-mash-refseq88-k21.txtThe results of querying the Mash sketch against RefSeq88
<SAMPLE_NAME>-sourmash-gtdb-rs207-k31.txtThe results of querying the Sourmash sketch against GTDB-rs207
<SAMPLE_NAME>.sigA Sourmash sketch of the input assembly for k=21, k=31, and k=51

Sketcher Parameters

ParameterDescription
--sketch_sizeSketch size. Each sketch will have at most this many non-redundant min-hashes.
Type: integer, Default: 10000
--sourmash_scaleChoose number of hashes as 1 in FRACTION of input k-mers
Type: integer, Default: 10000
--no_winner_take_allDisable winner-takes-all strategy for identity estimates
Type: boolean
--screen_iMinimum identity to report.
Type: number, Default: 0.8

Citations

If you use Bactopia and sketcher results in your analysis, please cite the following.

Step 6 - Sequence Typing

Outputs

Merged Results

Below are results that are concatenated into a single file.

FilenameDescription
mlst.tsvA merged TSV file with mlst results from all samples

mlst

Below is a description of the per-sample results from mlst.

FilenameDescription
<SAMPLE_NAME>.tsvA tab-delimited file with mlst result, see mlst - Usage for more details

Parameters

ParameterDescription
--schemeDon't autodetect, force this scheme on all inputs
Type: string
--minidMinimum DNA percent identity of full allelle to consider 'similar'
Type: integer, Default: 95
--mincovMinimum DNA percent coverage to report partial allele at all
Type: integer, Default: 10
--minscoreMinimum score out of 100 to match a scheme
Type: integer, Default: 50
--nopathStrip filename paths from FILE column
Type: boolean
--mlst_dbA custom MLST database to use, either a tarball or a directory
Type: string

Citations

If you use Bactopia and sequence typing results in your analysis, please cite the following.

Step 7 - Antibiotic Resistance

Outputs

Merged Results

Below are results that are concatenated into a single file.

FilenameDescription
amrfinderplus-genes.tsvA merged TSV file with AMRFinder+ results using nucleotide inputs
amrfinderplus-proteins.tsvA merged TSV file with AMRFinder+ results using protein inputs

AMRFinder+

Below is a description of the per-sample results from AMRFinder+.

FilenameDescription
-genes.tsvA TSV file with AMRFinder+ results using nucleotide inputs
-proteins.tsvA TSV file with AMRFinder+ results using protein inputs

Parameters

ParameterDescription
--ident_minMinimum proportion of identical amino acids in alignment for hit (0..1)
Type: number, Default: -1
--coverage_minMinimum coverage of the reference protein (0..1)
Type: number, Default: 0.5
--organismTaxonomy group to run additional screens against
Type: string
--translation_tableNCBI genetic code for translated BLAST
Type: integer, Default: 11
--amrfinder_noplusDisable running AMRFinder+ with the --plus option
Type: boolean
--report_commonReport proteins common to a taxonomy group
Type: boolean
--report_all_equalReport all equally-scoring BLAST and HMM matches
Type: boolean
--amrfinder_optsExtra AMRFinder+ options in quotes.
Type: string
--amrfinder_dbA custom AMRFinder+ database to use, either a tarball or a folder
Type: string

Citations

If you use Bactopia and antibiotic resistance results in your analysis, please cite the following.

Step 8 - Merlin

Outputs

Merged Results

Below are results that are concatenated into a single file.

FilenameDescription
agrvate.tsvA merged TSV file with AgrVATE results from all samples
clermontyping.csvA merged TSV file with ClermonTyping results from all samples
ectyper.tsvA merged TSV file with ECTyper results from all samples
emmtyper.tsvA merged TSV file with emmtyper results from all samples
genotyphi.tsvA merged TSV file with genotyphi results from all samples
hicap.tsvA merged TSV file with hicap results from all samples
hpsuissero.tsvA merged TSV file with HpsuisSero results from all samples
kleborate.tsvA merged TSV file with Kleborate results from all samples
legsta.tsvA merged TSV file with legsta results from all samples
lissero.tsvA merged TSV file with LisSero results from all samples
meningotype.tsvA merged TSV file with meningotype results from all samples
ngmaster.tsvA merged TSV file with ngmaster results from all samples
pasty.tsvA merged TSV file with pasty results from all samples
pbptyper.tsvA merged TSV file with pbptyper results from all samples
seqsero2.tsvA merged TSV file with seqsero2 results from all samples
seroba.tsvA merged TSV file with seroba results from all samples
shigapass.csvA merged CSV file with ShigaPass results from all samples
shigatyper.tsvA merged TSV file with ShigaTyper results from all samples
shigeifinder.tsvA merged TSV file with ShigEiFinder results from all samples
sistr.tsvA merged TSV file with SISTR results from all samples
spatyper.tsvA merged TSV file with spaTyper results from all samples
ssuissero.tsvA merged TSV file with SsuisSero results from all samples
sccmec.tsvA merged TSV file with sccmec results from all samples
stecfinder.tsvA merged TSV file with stecfinder results from all samples

AgrVATE

Below is a description of the per-sample results from AgrVATE.

FilenameDescription
-agr_gp.tabA detailed report for agr kmer matches
-blastn_log.txtLog files from programs called by AgrVATE
-summary.tabA final summary report for agr typing

ClermonTyping

Below is a description of the per-sample results from ClermonTyping.

FilenameDescription
<SAMPLE_NAME>.blast.xmlA BLAST XML file with the results of the ClermonTyping analysis
<SAMPLE_NAME>.htmlA HTML file with the results of the ClermonTyping analysis
<SAMPLE_NAME>.mash.tsvA TSV file with the Mash distances
<SAMPLE_NAME>.phylogroups.txtA TSV file with the final phylogroup assignments

ECTyper

Below is a description of the per-sample results from ECTyper.

FilenameDescription
<SAMPLE_NAME>.tsvA tab-delimited file with ECTyper result, see ECTyper - Report format for details
blast_output_alleles.txtAllele report generated from BLAST results

emmtyper

Below is a description of the per-sample results from emmtyper.

FilenameDescription
<SAMPLE_NAME>.tsvA tab-delimited file with emmtyper result, see emmtyper - Result format for details

hicap

Below is a description of the per-sample results from hicap.

FilenameDescription
<SAMPLE_NAME>.gbkGenBank file and cap locus annotations
<SAMPLE_NAME>.svgVisualization of annotated cap locus
<SAMPLE_NAME>.tsvA tab-delimited file with hicap results

HpsuisSero

Below is a description of the per-sample results from HpsuisSero.

FilenameDescription
<SAMPLE_NAME>_serotyping_res.tsvA tab-delimited file with HpsuisSero result

GenoTyphi

Below is a description of the per-sample results from GenoTyphi. A full description of the GenoTyphi output is available at GenoTyphi - Output

FilenameDescription
<SAMPLE_NAME>_predictResults.tsvA tab-delimited file with GenoTyphi results
<SAMPLE_NAME>.csvThe output of mykrobe predict in comma-separated format
<SAMPLE_NAME>.jsonThe output of mykrobe predict in JSON format

Kleborate

Below is a description of the per-sample results from Kleborate.

FilenameDescription
<SAMPLE_NAME>.results.txtA tab-delimited file with Kleborate result, see Kleborate - Example output for more details.

legsta

Below is a description of the per-sample results from legsta.

FilenameDescription
<SAMPLE_NAME>.tsvA tab-delimited file with legsta result, see legsta - Output for more details

LisSero

Below is a description of the per-sample results from LisSero.

FilenameDescription
<SAMPLE_NAME>.tsvA tab-delimited file with LisSero results

Mash

Below is a description of the per-sample results from Mash.

FilenameDescription
<SAMPLE_NAME>-dist.txtA tab-delimited file with mash dist results

meningotype

Below is a description of the per-sample results from meningotype .

FilenameDescription
<SAMPLE_NAME>.tsvA tab-delimited file with meningotype result

ngmaster

Below is a description of the per-sample results from ngmaster.

FilenameDescription
<SAMPLE_NAME>.tsvA tab-delimited file with ngmaster results

pasty

Below is a description of the per-sample results from pasty.

FilenameDescription
.blastn.tsvA tab-delimited file of all blast hits
.details.tsvA tab-delimited file with details for each serogroup
.tsvA tab-delimited file with the predicted serogroup

pbptyper

Below is a description of the per-sample results from pbptyper.

FilenameDescription
.tblastn.tsvA tab-delimited file of all blast hits
.tsvA tab-delimited file with the predicted PBP type

SeqSero2

Below is a description of the per-sample results from SeqSero2.

FilenameDescription
<SAMPLE_NAME>_result.tsvA tab-delimited file with SeqSero2 results
<SAMPLE_NAME>_result.txtA text file with key-value pairs of SeqSero2 results

Seroba

Below is a description of the per-sample results from Seroba. More details about the outputs are available from Seroba - Output.

FilenameDescription
<SAMPLE_NAME>.tsvA tab-delimited file with the predicted serotype
detailed_serogroup_info.txtDetailed information about the predicted results

ShigaPass

Below is a description of the per-sample results from ShigaPass.

FilenameDescription
<SAMPLE_NAME>.csvA CSV file with the predicted Shigella or EIEC serotype

ShigaTyper

Below is a description of the per-sample results from ShigaTyyper.

FilenameDescription
<SAMPLE_NAME>-hits.tsvDetailed statistics about each individual gene hit
<SAMPLE_NAME>.tsvThe final predicted serotype by ShigaTyper

ShigEiFinder

Below is a description of the per-sample results from ShigEiFinder.

FilenameDescription
<SAMPLE_NAME>.tsvA tab-delimited file with the predicted Shigella or EIEC serotype

SISTR

Below is a description of the per-sample results from SISTR.

FilenameDescription
<SAMPLE_NAME>-allele.fasta.gzA FASTA file of the cgMLST allele search results
<SAMPLE_NAME>-allele.json.gzJSON formated cgMLST allele search results, see SISTR - cgMLST search results for more details
<SAMPLE_NAME>-cgmlst.csvA comma-delimited summary of the cgMLST allele search results
<SAMPLE_NAME>.tsvA tab-delimited file with SISTR results, see SISTR - Primary results for more details

spaTyper

Below is a description of the per-sample results from spaTyper.

FilenameDescription
<SAMPLE_NAME>.tsvA tab-delimited file with spaTyper result

SsuisSero

Below is a description of the per-sample results from SsuisSero.

FilenameDescription
<SAMPLE_NAME>_serotyping_res.tsvA tab-delimited file with SsuisSero results

sccmec

Below is a description of the per-sample results from sccmec.

FilenameDescription
<SAMPLE_NAME>.tsvA tab-delimited file with sccmec results

TBProfiler

Below is a description of the per-sample results from TBProfiler.

FilenameDescription
<SAMPLE_NAME>.results.csvA CSV formated TBProfiler result file of resistance and strain type
<SAMPLE_NAME>.results.jsonA JSON formated TBProfiler result file of resistance and strain type
<SAMPLE_NAME>.results.txtA text file with TBProfiler results
<SAMPLE_NAME>.bamBAM file with alignment details
<SAMPLE_NAME>.targets.csq.vcf.gzVCF with variant info again reference genomes

mashdist

ParameterDescription
--mash_sketchThe reference sequence as a Mash Sketch (.msh file)
Type: string
--mash_seedSeed to provide to the hash function
Type: integer, Default: 42
--mash_tableTable output (fields will be blank if they do not meet the p-value threshold)
Type: boolean
--mash_mMinimum copies of each k-mer required to pass noise filter for reads
Type: integer, Default: 1
--mash_wProbability threshold for warning about low k-mer size.
Type: number, Default: 0.01
--max_pMaximum p-value to report.
Type: number, Default: 1.0
--max_distMaximum distance to report.
Type: number, Default: 1.0
--merlin_distMaximum distance to report when using Merlin .
Type: number, Default: 0.1
--full_merlinGo full Merlin and run all species-specific tools, no matter the Mash distance
Type: boolean
--use_fastqsQuery with FASTQs instead of the assemblies
Type: boolean

AgrVATE

ParameterDescription
--typing_onlyagr typing only. Skips agr operon extraction and frameshift detection
Type: boolean

ClermonTyping

ParameterDescription
--clermon_thresholdDo not use contigs under this size
Type: number

ECTyper

ParameterDescription
--opidPercent identity required for an O antigen allele match
Type: integer, Default: 90
--opcovMinumum percent coverage required for an O antigen allele match
Type: integer, Default: 90
--hpidPercent identity required for an H antigen allele match
Type: integer, Default: 95
--hpcovMinumum percent coverage required for an H antigen allele match
Type: integer, Default: 50
--verifyEnable E. coli species verification
Type: boolean
--print_allelesPrints the allele sequences if enabled as the final column
Type: boolean

emmtyper

ParameterDescription
--emmtyper_wfWorkflow for emmtyper to use.
Type: string, Default: blast
--cluster_distanceDistance between cluster of matches to consider as different clusters
Type: integer, Default: 500
--percidMinimal percent identity of sequence
Type: integer, Default: 95
--culling_limitTotal hits to return in a position
Type: integer, Default: 5
--mismatchThreshold for number of mismatch to allow in BLAST hit
Type: integer, Default: 5
--align_diffThreshold for difference between alignment length and subject length in BLAST
Type: integer, Default: 5
--gapThreshold gap to allow in BLAST hit
Type: integer, Default: 2
--min_perfectMinimum size of perfect match at 3 primer end
Type: integer, Default: 15
--min_goodMinimum size where there must be 2 matches for each mismatch
Type: integer, Default: 15
--max_sizeMaximum size of PCR product
Type: integer, Default: 2000

hicap

ParameterDescription
--database_dirDirectory containing locus database
Type: string
--model_fpPath to prodigal model
Type: string
--full_sequenceWrite the full input sequence out to the genbank file rather than just the region surrounding and including the locus
Type: boolean
--hicap_debughicap will print debug messages
Type: boolean
--gene_coverageMinimum percentage coverage to consider a single gene complete
Type: number, Default: 0.8
--gene_identityMinimum percentage identity to consider a single gene complete
Type: number, Default: 0.7
--broken_gene_lengthMinimum length to consider a broken gene
Type: integer, Default: 60
--broken_gene_identityMinimum percentage identity to consider a broken gene
Type: number, Default: 0.8

GenoTyphi

ParameterDescription
--kmerK-mer length
Type: integer, Default: 21
--min_depthMinimum depth
Type: integer, Default: 1
--modelGenotype model used.
Type: string, Default: kmer_count
--report_all_callsReport all calls
Type: boolean
--mykrobe_optsExtra Mykrobe options in quotes
Type: string

Kleborate

ParameterDescription
--kleborate_presetPreset module to use for Kleborate
Type: string, Default: kpsc
--kleborate_optsExtra options in quotes for Kleborate
Type: string

legsta

ParameterDescription
--noheaderDon't print header row
Type: boolean

LisSero

ParameterDescription
--min_idMinimum percent identity to accept a match
Type: number, Default: 95.0
--min_covMinimum coverage of the gene to accept a match
Type: number, Default: 95.0

meningotype

You can use these parameters to fine-tune your meningotype analysis

ParameterDescription
--finetypeperform porA and fetA fine typing
Type: boolean
--porBperform porB sequence typing (NEIS2020)
Type: boolean
--bastperform Bexsero antigen sequence typing (BAST)
Type: boolean
--mlstperform MLST
Type: boolean
--allperform MLST, porA, fetA, porB, BAST typing
Type: boolean

ngmaster

ParameterDescription
--csvoutput comma-separated format (CSV) rather than tab-separated
Type: boolean

pasty

ParameterDescription
--pasty_min_pidentMinimum percent identity to count a hit
Type: integer, Default: 95
--pasty_min_coverageMinimum percent coverage to count a hit
Type: integer, Default: 95

pbptyper

ParameterDescription
--pbptyper_min_pidentMinimum percent identity to count a hit
Type: integer, Default: 95
--pbptyper_min_coverageMinimum percent coverage to count a hit
Type: integer, Default: 95

SeqSero2

ParameterDescription
--run_modeWorkflow to run. 'a' allele mode, or 'k' k-mer mode
Type: string, Default: k
--input_typeInput format to analyze. 'assembly' or 'fastq'
Type: string, Default: assembly
--bwa_modeAlgorithms for bwa mapping for allele mode
Type: string, Default: mem

SISTR

ParameterDescription
--full_cgmlstUse the full set of cgMLST alleles which can include highly similar alleles
Type: boolean

spaTyper

ParameterDescription
--repeatsList of spa repeats
Type: string
--repeat_orderList spa types and order of repeats
Type: string
--do_enrichDo PCR product enrichment
Type: boolean

sccmec

ParameterDescription
--hammingReport the results as hamming distances
Type: boolean

TBProfiler Profile

ParameterDescription
--call_whole_genomeCall whole genome
Type: boolean
--mapperMapping tool to use. If you are using nanopore data it will default to minimap2
Type: string, Default: bwa
--callerVariant calling tool to use
Type: string, Default: freebayes
--calling_paramsExtra variant caller options in quotes
Type: string
--suspectUse the suspect suite of tools to add ML predictions
Type: boolean
--no_flagstatDon't collect flagstats
Type: boolean
--no_dellyDon't run delly
Type: boolean
--tbprofiler_optsExtra options in quotes for TBProfiler
Type: string

Citations

If you use Bactopia and merlin results in your analysis, please cite the following.

Additional Parameters

Optional

These optional parameters can be useful in certain settings.

ParameterDescription
--outdirBase directory to write results to
Type: string, Default: bactopia
--skip_compressionOuput files will not be compressed
Type: boolean
--datasetsThe path to cache datasets to
Type: string
--keep_all_filesKeeps all analysis files created
Type: boolean

Max Job Request

Set the top limit for requested resources for any single job.

ParameterDescription
--max_retryMaximum times to retry a process before allowing it to fail.
Type: integer, Default: 3
--max_cpusMaximum number of CPUs that can be requested for any single job.
Type: integer, Default: 4
--max_memoryMaximum amount of memory that can be requested for any single job.
Type: string, Default: 128.GB
--max_timeMaximum amount of time that can be requested for any single job.
Type: string, Default: 240.h
--max_downloadsMaximum number of samples to download at a time
Type: integer, Default: 3

Nextflow Configuration

to fine-tune your Nextflow setup.

ParameterDescription
--nfconfigA Nextflow compatible config file for custom profiles, loaded last and will overwrite existing variables if set.
Type: string
--publish_dir_modeMethod used to save pipeline results to output directory.
Type: string, Default: copy
--infodirDirectory to keep pipeline Nextflow logs and reports.
Type: string, Default: ${params.outdir}/pipeline_info
--forceNextflow will overwrite existing output files.
Type: boolean
--cleanup_workdirAfter Bactopia is successfully executed, the work directory will be deleted.
Type: boolean

Institutional config options

used to describe centralized config profiles. These should not be edited.

ParameterDescription
--custom_config_versionGit commit id for Institutional configs.
Type: string, Default: master
--custom_config_baseBase directory for Institutional configs.
Type: string, Default: https://raw.githubusercontent.com/nf-core/configs/master
--config_profile_nameInstitutional config name.
Type: string
--config_profile_descriptionInstitutional config description.
Type: string
--config_profile_contactInstitutional config contact information.
Type: string
--config_profile_urlInstitutional config URL link.
Type: string

Nextflow Profile

to fine-tune your Nextflow setup.

ParameterDescription
--condadirDirectory to Nextflow should use for Conda environments
Type: string
--registryDocker registry to pull containers from.
Type: string, Default: dockerhub
--datasets_cacheDirectory where downloaded datasets should be stored.
Type: string, Default: <BACTOPIA_DIR>/data/datasets
--singularity_cache_dirDirectory where remote Singularity images are stored.
Type: string
--singularity_pull_docker_containerInstead of directly downloading Singularity images for use with Singularity, force the workflow to pull and convert Docker containers instead.
Type: boolean
--force_rebuildForce overwrite of existing pre-built environments.
Type: boolean
--queueComma-separated name of the queue(s) to be used by a job scheduler (e.g. AWS Batch or SLURM)
Type: string, Default: general,high-memory
--cluster_optsAdditional options to pass to the executor. (e.g. SLURM: '--account=my_acct_name'
Type: string
--container_optsAdditional options to pass to Apptainer, Docker, or Singularityu. (e.g. Singularity: '-D pwd'
Type: string
--disable_scratchAll intermediate files created on worker nodes of will be transferred to the head node.
Type: boolean

Helpful

Uncommonly used parameters that might be useful.

ParameterDescription
--monochrome_logsDo not use coloured log outputs.
Type: boolean
--nfdirPrint directory Nextflow has pulled Bactopia to
Type: boolean
--sleep_timeThe amount of time (seconds) Nextflow will wait after setting up datasets before execution.
Type: integer, Default: 5
--validate_paramsBoolean whether to validate parameters against the schema at runtime
Type: boolean, Default: True
--helpDisplay help text.
Type: boolean
--wfSpecify which workflow or Bactopia Tool to execute
Type: string, Default: bactopia
--list_wfsList the available workflows and Bactopia Tools to use with '--wf'
Type: boolean
--show_hidden_paramsShow all params when using --help
Type: boolean
--help_allAn alias for --help --show_hidden_params
Type: boolean
--versionDisplay version text.
Type: boolean