ProkaryONT is a comprehensive, production-grade automated pipeline for Oxford Nanopore Technologies (ONT)-based prokaryotic genome assembly, polishing, taxonomic classification, quality assessment, and high-fidelity ensemble functional annotation.
It orchestrates industry-standard bioinformatics tools via a robust, subcommand-driven shell interface, allowing both rapid automated runs and hands-on, step-by-step manual curation.
The pipeline is split into three main execution phases: Core Assembly & Polishing (Stages 1β4), Primary Downstream Analysis (Taxonomy & Single-Tool Annotation), and an Ensemble Annotation & Reconcilation Pipeline.
graph TD
A[Raw ONT FASTQ + Summary] --> Stage1[Stage 1: QC & Estimate<br/>NanoPlot / LRGE / Raven / Meryl<br/>+ Fastcat / Porechop_ABI scan / SNIKT]
Stage1 --> Stage2[Stage 2: Preprocess & Filter<br/>Porechop_ABI / Chopper / Seqkit / Filtlong<br/>+ Fastplong QC report]
Stage2 --> Stage3[Stage 3: Autocycler Assembly]
Stage3 --> C1{"π Curation 1: Assemblies"}
C1 --> Stage2b[Clustering & tree QC<br/>autocycler cluster / ETE3]
Stage2b --> C2{"π Curation 2: Clusters"}
C2 --> Stage2c[Trim, Resolve & Combine<br/>autocycler trim/resolve/combine / MUMmer]
Stage2c --> C3{"π Curation 3: Dotplots"}
C3 --> Stage2d[Consensus Assembly + Depth Mapping]
Stage2d --> Stage4[Stage 4: Polish & Orient<br/>Dorado Polishing / Dnaapler Reorientation]
Stage4 --> FinalAssembly[Final Assembly: dnaapler_reoriented.fasta]
FinalAssembly --> TaxStage[Taxonomy Stage<br/>GTDB-Tk / mlst / Barrnap 16S]
FinalAssembly --> AssessStage[Assess & Annotate Stage<br/>Bakta / QUAST / CheckM2 / BUSCO / Merqury]
FinalAssembly --> EnsembleStage[Ensemble Annotation Pipeline]
EnsembleStage --> 07a[07a: Gene Prediction<br/>Pyrodigal / Glimmer3 / GeneMarkS-2]
EnsembleStage --> 07b[07b: Track A Annotation<br/>Bakta / DRAM / RASTtk]
EnsembleStage --> 07c[07c: Track B Annotation<br/>eggNOG-mapper / InterProScan / KofamScan / DIAMOND SwissProt]
EnsembleStage --> 07d[07d: Track C Annotation<br/>geNomad / Phanotate]
07a & 07b & 07c & 07d --> 07e[07e: Reconcile & Merge<br/>GFF3 / TSV / GenBank / JSON]
-
Automated Genome Size Estimation: Integrates weighted estimates from
LRGE(k-mer-based) and a fastRavendraft assembly ((2*Raven + LRGE) / 3) to configure downstream subsampling. -
Robust Subsample Assemblies: Subsamples input reads and runs up to 10 assemblers in parallel (including
Flye,Canu,Hifiasm,Raven,Miniasm,MetaMDBG,Myloasm,Plassembler,NextDenovo, andWtdbg2) using GNUParallel. -
ETE3-Based Tree Checks: Evaluates the clustering tree dynamically to flag clades showing branch lengths exceeding
$5\times$ the median or single-assembler dominance. -
Automated Plot Generation: Distributes pairwise alignments using
Autocycler dotplotfor small replicons (plasmids) andMUMmer(nucmer + mummerplot) for chromosome-scale sequences to review overlap trimming. -
Real-Time Read-Depth Tracking: Maps filtered reads back to consensus using
minimap2andsamtoolsto generate coverage metrics and flag high-copy-number replicons (depth$> 1.5\times$ relative to the chromosome). -
Dorado-Based Polishing: Checks for moves tables (
mv:B:ctags) in BAM files and prompts for read group resolution (unification, selection, or ignoring) in multi-read-group runs. -
Smart Reorientation: Utilizes
Dnaaplerto locate start genes (e.g.,dnaAfor chromosomes,repAfor plasmids,terLfor phages) and rotate contigs to a standardized biological origin. -
Ensemble Annotation Engine:
-
Genomic Predictions: Merges predictions from
Pyrodigal,Glimmer3, andGeneMarkS-2using a consensus algorithm with a Pyrodigal tiebreaker. -
Assembly Features (Track A): Coordinates structural annotation via
Bakta,DRAM, and imported BV-BRCRASTtkrecords. -
Homology Databases (Track B): Consolidates predictions from
eggNOG-mapper,InterProScan,KofamScan, andDIAMOND SwissProt. -
Prophage Discovery (Track C): Extracts prophage intervals using
geNomadand annotates phage-specific ORFs withPhanotate. -
Consensus Reconciliation: Merges all annotation data into a single
GFF3,TSVannotation matrix, fully annotatedGenBankflatfile, and an isolate summaryJSON.
-
Genomic Predictions: Merges predictions from
To run the pipeline, ensure the following tools are available in your $PATH:
- Filtering & QC:
filtlong,seqkit,NanoPlot,fastcat,porechop_abi,snikt.R,chopper,fastplong - Draft Estimation:
lrge,raven - Subsampling & Assembly:
autocycler(v0.1.0+),meryl,samtools, GNUparallel, and desired assemblers (flye,canu,hifiasm,metaMDBG,miniasm,minipolish,minimap2,plassembler, etc.) - Tree Analysis: Python 3 with
ete3library (optional) - Dotplots:
mummer(specificallynucmer,mummerplot) - Polishing & Reorientation:
dorado,dnaapler
- Taxonomy:
gtdbtk(requires GTDB reference DB),mlst,barrnap - Assessment:
quast,checkm2,busco(with lineages),merqury(requiresmerqury.sh) - Gene Finding:
pyrodigal,glimmer3 - Ensemble Annotation:
bakta(requires database),DRAM.py,emapper.py(eggNOG-mapper),interproscan.sh,exec_annotation(KofamScan),diamond,genomad(requires database),phanotate.py
The configuration file pipeline.conf controls all paths, database locations, threads, and parameter thresholds. Key variables include:
# --- Required inputs ---
input_fastq=input.fastq.gz
sequencing_summary=sequencing_summary.txt
pod5_dir=pod5_dir/
sample_name=MyBacteria
# --- Compute & Filtering ---
threads=128
read_type=ont_r10
filtlong_min_length=200
filtlong_keep_percent=90
# --- Databases ---
gtdbtk_data_path=/path/to/gtdbtk_db
bakta_db=/path/to/bakta_db
genomad_db=/path/to/genomad_db
interproscan_db=/path/to/interproscan
kofam_profiles=/path/to/kofam/profiles
kofam_ko_list=/path/to/kofam/ko_listThe main interface to the pipeline is prokaryont.sh.
chmod +x prokaryont.sh
./prokaryont.sh --helpRuns read QC, filtering, multi-assembler subsampling, clustering, consensus combination, dorado polishing, and dnaapler reorientation.
./prokaryont.sh assemble --config pipeline.confNote
During assembly, the pipeline will pause at Manual Curation Points to allow file inspection (e.g., verifying draft assembly sizes, moving misclustered contigs, inspecting dotplots). You can bypass these pauses by passing the --skip-curation flag (or uncommenting skip_curation=true in the configuration).
If the pipeline halts during assembly or you wish to adjust parameters, you can resume from specific steps using:
./prokaryont.sh assemble --config pipeline.conf --resume-from [cluster|trim|dnaapler]cluster: Skips read filtering and assemblies, resumes from Autocycler clustering. (post-split: resumes Stage 3 from clustering, skipping the subsample/multi-assembler step β assumesfiltered_input.fastq.gzfrom Stage 2 already exists)trim: Skips assembly and clustering, resumes from Autocycler overlap trimming/resolving.dnaapler: Skips polishing, resumes from Dnaapler reorientation.
Executes GTDB-Tk classification, MLST typing, and Barrnap 16S rRNA gene extraction.
./prokaryont.sh taxonomy --config pipeline.confReview the taxonomy outputs to update your organism details (genus, species, gram stain) in pipeline.conf prior to annotation.
Runs Bakta annotation and standard quality assessment metrics (QUAST, CheckM2, BUSCO, and Merqury).
./prokaryont.sh annotate --config pipeline.confFor high-fidelity structural and functional annotation, run the ensemble scripts sequentially:
# A. Predict consensus gene coordinates
bash 07a_predict_genes.sh --assembly dnaapler_reoriented.fasta --config pipeline.conf
# B. Run assembly-level annotations (Track A)
bash 07b_annotate_trackA.sh --assembly dnaapler_reoriented.fasta --bakta-db /path/to/bakta_db
# C. Run protein-level sequential annotations (Track B)
bash 07c_annotate_trackB.sh --consensus-proteins 13_gene_prediction/consensus/consensus_proteins.faa --config pipeline.conf
# D. Run prophage annotation (Track C)
bash 07d_annotate_trackC.sh --assembly dnaapler_reoriented.fasta --genomad-db /path/to/genomad_db
# E. Reconcile and merge all annotation files
bash 07e_reconcile_merge.sh \
--assembly dnaapler_reoriented.fasta \
--consensus-gff 13_gene_prediction/consensus/consensus_genes.gff3 \
--bakta-dir 14_trackA/bakta \
--emapper-out 15_trackB/eggnog \
--interproscan-out 15_trackB/interproscan \
--kofamscan-out 15_trackB/kofamscan \
--phanotate-gff 16_trackC_prophage/phanotate/phanotate_genes.gff3 \
--sample-name MyBacteriaFollowing a full run, the workspace directory will contain:
βββ 01_qc/ # NanoPlot quality reports for raw/filtered reads
βββ 02_genome_size/ # LRGE, Raven estimates, and Meryl histograms
βββ assemblies/ # Fasta and job logs from subsampled assemblers
βββ autocycler_out/ # Autocycler compressed outputs and GFA clusters
β βββ cluster_metadata.tsv # Per-cluster assembly and resolve metrics
β βββ consensus_assembly.fasta # Combined draft assembly
βββ 07_taxonomy/ # GTDB-Tk, MLST, and Barrnap 16S fasta
βββ bakta_result/ # Single-run Bakta annotation
βββ 10_quast/ # QUAST assembly statistics
βββ 11_checkm2/ # CheckM2 quality reports (completeness/contamination)
βββ 12_busco/ # BUSCO conserved single-copy ortholog checks
βββ 13_gene_prediction/ # Multi-caller prediction outputs (Pyrodigal/Glimmer)
βββ 14_trackA/ # Track A annotators (Bakta, DRAM)
βββ 15_trackB/ # Track B database searches (eggNOG, Pfam, Kofam)
βββ 16_trackC_prophage/ # geNomad & Phanotate mobile element annotations
βββ 17_final_annotation/ # Final integrated ensemble annotations
β βββ final_annotation.gff3 # Fully reconciled GFF3 file
β βββ final_annotation.gbk # Fully reconciled GenBank file
β βββ annotation_matrix.tsv # Gene-by-annotation matrix
β βββ summary.json # Isolate summary statistics
βββ polished_assembly.fasta # Dorado-polished assembly
βββ dnaapler_reoriented.fasta # Polished and reoriented final genome
βββ contig_characteristics.tsv # Combined length, cluster, depth, and copy number flags
βββ metrics.tsv # Autocycler metrics table with read statistics
βββ pipeline.log # Global execution log of the pipeline runs
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.