BACoN extracts the Nanopore reads that match a reference sequence (typically an organelle genome) from many samples, assembles them, and compares the samples: SNP distances and a tree. It was designed for genome skimming, and works best with targeted sequencing that enriches the region of interest.
conda create -n bacon -c conda-forge -c bioconda bacon-nanopore
conda activate bacon
bacon -r chloroplast.fasta -i reads/ -o results/The bioconda package is named bacon-nanopore (conda-forge already has an unrelated bacon); the command is
bacon. To install from the source code instead, see Installation.
reads/ holds one fastq file per sample, or one folder per sample (such as MinKNOW's fastq_pass/barcode01/).
Open results/report.html for an overview: samples with their read counts, depth and assembly, the tree, a
heatmap of the SNP distances, and a methods paragraph. The same results are in summary.tsv,
4_compared/minimap2/snp_distances.tsv, 4_compared/minimap2/tree.nwk and 4_compared/minimap2/snps.vcf, and MultiQC picks up BACoN's
*_mqc.json files. Rerunning the same command resumes where it stopped; changing a parameter reruns only the
steps it affects. With --annotation chloroplast.gb (or a GenBank file as -r), the report also shows the
genes and the effect of each SNP; with --metadata samples.tsv (a table with a sample column and any others,
such as a group or a year), it shows the metadata in the samples table and colours every genome in the report
(tree, heatmap, bar charts, tables) by one column (--color-by). Neither reruns a step.
To check an installation, run the example (simulated reads with known SNPs; a few seconds). It is in the repository, not in the conda package:
curl -sL https://github.com/duceppemo/BACoN/archive/refs/tags/v0.4.0.tar.gz | tar -xz --strip-components=1 BACoN-0.4.0/example
bash example/run_example.shEverything else is in the wiki, whose sources are maintained in
docs/wiki:
- Installation — conda, pip, troubleshooting
- Usage — inputs, options, resuming, performance
- Methods — what each step does, and which assembler or SNP method to choose
- Example — the bundled simulated dataset and its report
- Tutorial — 28 potato cultivars from a public project
- Outputs — files and columns
- Validation — how the methods were chosen and tested
- FAQ — troubleshooting
- Development — tests, CI, releases
If BACoN is useful in your work, please cite it (see CITATION.cff):
Duceppe, M.-O. (2026). BACoN: Bait, Assemble and Compare Nanopore reads (v0.4.0). Zenodo. https://doi.org/10.5281/zenodo.22970412
and the programs it runs: minimap2, Filtlong, samtools or Flye or myloasm, SKA2 or Parsnp, and FastTree or IQ-TREE (references).
