There is a newer version of the record available.

Published October 7, 2026 | Version v0.3.6

BACoN: Bait, Assemble and Compare Nanopore reads

Authors/Creators

Description

Added

  • Reference annotations: --annotation FILE (GenBank or GFF3, gzipped or not), or a GenBank file as -r (its sequence is the reference, named as in NCBI's fasta of the record, and its features the annotation). The report's genome map then shows the genes of each strand, the LSC/IRb/SSC/IRa regions of a plastome derived from its inverted repeats, and labels for the genes with the most SNPs, and a new sortable table gives each SNP's region, gene, context and effect on the coding sequence (codon and amino-acid change, synonymous/missense/nonsense/stop lost or retained/start lost or retained; translation table 11 unless the annotation says otherwise, tables 1–5, 9, 11, 13 and 14 known; no effect at a transl_except codon). Genes in several pieces (trans-spliced, or across the origin of a circular sequence) are read from either format in their order of translation. The annotation is for the report only: it is not part of any checkpoint, so adding it to a finished run reruns nothing; it is copied to OUTPUT/annotation.gb or .gff3 and recorded in run_info.json. snps.vcf is unchanged.
  • Sample metadata: --metadata FILE (TSV or CSV with a sample column and any other columns), and the columns of a sample sheet other than sample and file (--metadata wins column by column). The report shows the columns in the samples table (sortable, numbers as numbers), and one column, --color-by or the first with at most 8 distinct values that is not free text (none for no colours), colours the tree (a circle and the value after each name) and the heatmap (a second band on both axes, with a legend), with a table of the groups of identical genomes against its values. The metadata columns are also in the MultiQC samples table. For the report only: not part of any checkpoint, copied to OUTPUT/metadata.tsv and recorded in run_info.json.

Changed

  • report.html has a new look (light and dark themes, numbered figures) and new figures: bar charts of the depth and of the N bases of each sample; the tree drawn with a coloured square for each group of identical genomes, the supports and a scale bar in substitutions per site with its equivalent in SNPs; a heatmap of the distances with colour classes fitted to their range and the groups of identical genomes as coloured bands; and a genome map with the positions of the VCF's SNPs and, for templated assemblies, the N bases along the reference.
  • The bundled example is an annotated, plastid-like reference (LSC, IRb, SSC, IRa; 23 synthetic genes, as GenBank and fasta) with a sample metadata file; its 20 SNPs fall in chosen genes and contexts, and example/run_example.sh checks their effects as well as the distances, so the example shows every feature of the report. The published reports and the wiki pictures were rebuilt with all the features.
  • The report's page is wider (1,440 px at most), so that a samples table with metadata columns fits; printed, its tables are complete (landscape, cells wrap).
  • Sample sheets and metadata files are read strictly where it matters: an unclosed quote in a CSV, or a quoted value over several lines, is an error naming the line; a TSV's cells are split on tabs only (a cell entirely in quotes loses them, as before; other quotes are kept as written); two columns with the same name are an error saying so. In a sample sheet, lines starting with # are comments before and after the header, as before; in a metadata file, only before it (so a value such as #FF0000 may come first).
  • A moved or copied output folder resumes without rerunning anything, even when the copy did not keep the files' times (cp -r without -a, scp, an archive): in such a folder, the input of each step and of the comparison is recognized by its size (0.3.5 ran filtering, assembly and comparison again).
  • The report's SNP table has a Sequence column when the reference has several sequences, and its summary counts the SNPs on sequences without annotation. The N track rescales a templated assembly to the reference only when their lengths differ by 5% or less (indels); a shorter or longer record is counted at its own positions. A metadata.tsv found in the output folder but not given to the run is said to be so in the report's metadata line (run_info.json and the MultiQC table do not have it).
  • GFF3 annotations: the lines of a CDS across the origin listed by ascending coordinate (a sorted file) are read in the order of translation on both strands, with the sequence length from ##sequence-region or, without it, from the reference; a single line ending beyond the length of a sequence flagged Is_circular=true (Bakta's way of writing a feature across the origin) is split into its two parts instead of being ignored.

Fixed

  • An unclosed quote in a sample sheet silently swallowed the rows after it (their samples were not run).
  • A first run interrupted before its end left its copies annotation.gb (or .gff3) and metadata.tsv looking hand-made to the next run, which kept them when it had no annotation or metadata: the copies are now recorded in .checkpoints/copies.json as they are written, not only in run_info.json at the end.
  • The annotation copy replaced non-ASCII characters with ?; the file's bytes are copied as they are (decompressed when gzipped).
  • python -m bacon.report on a copied output folder read the comparison files of the original folder through the absolute paths of run_info.json; it reads the folder's own files, and notes a missing one. On a run that did not finish, it says so (resume it to get a report) instead of "not a BACoN output folder".
  • The report's VCF reader classed each distinct sample column instead of each distinct genotype, which was slow with per-sample fields (GT:DP...).
  • The report: the VCF is read about 25 times faster for large runs; the support of a branch at the root could be drawn outside the tree; heatmap group labels overlapped with many small groups; long sample names were cut in the bar charts; the small grey text, the "no value" markers and the numbers in some heatmap cells had too little contrast.

Upgrading to 0.3.6

  • Sample sheets of 0.3.5 are read as before (quoted TSV cells, lines starting with # after the header), except that an unclosed quote in a CSV is an error instead of silently losing the rows after it.
  • Output folders of 0.3.2 to 0.3.5 resume as they are; nothing runs again. A copy made without the files' times no longer reruns filtering, assembly and comparison.

Notes

If you use BACoN, please cite it as below, together with the programs it runs (see the wiki).

Files

duceppemo/BACoN-v0.3.6.zip

Files (2.1 MB)

Name Size
md5:0d45c4650f0ec86af89321d83070a157
2.1 MB Preview Download

Additional details

Related works

Is supplement to
Software: https://github.com/duceppemo/BACoN/tree/v0.3.6 (URL)

Software