ChromaZ — Contig Alignment Viewer & Chromatogram Editor

Languages: English | Русский
ChromaZ is a cross-platform desktop C++/Qt6 application for Sanger sequencing. It opens .ab1 and .scf chromatograms and FASTA, FASTQ, GenBank and SnapGene .dna files, assembles the reads into a contig or aligns them to a reference (eight built-in algorithms, or Bowtie 2 and minimap2), and shows every read with its trace and base qualities under the consensus.
In the same window you can trim and edit reads, find point heteroplasmy (double peaks), compare the consensus with an annotated reference, find primer binding sites and design primers with Primer3, translate sequences and list ORFs, map restriction sites and run a virtual gel, and use lab calculators. The results are exported as FASTA, FASTQ, GenBank, SCF, TSV, PDF or PNG, and the same steps run from the command line. ChromaZ runs on Windows, Linux and macOS and is free software under the MIT License.
Screenshot

📥 Downloads & Installation
The links below always download the latest version; all versions are on the Releases page:
Checksums. Every release contains SHA256SUMS.txt. Check a download with sha256sum -c SHA256SUMS.txt --ignore-missing (Linux), shasum -a 256 -c SHA256SUMS.txt --ignore-missing (macOS) or Get-FileHash <file> -Algorithm SHA256 (Windows PowerShell; compare with the line in SHA256SUMS.txt).
Portable mode. The portable packages contain an empty marker file ChromaZ.portable next to the program (ChromaZ.exe, ChromaZ, or ChromaZ.app on macOS). With the marker, ChromaZ keeps its settings (Data/ChromaZ.ini), the autosaved session and the downloaded external tools in the Data folder next to the program, so the folder can be moved or run from a USB stick. If the marker is missing or the folder is not writable, ChromaZ uses the usual user folders.
- Linux: the folder contains Qt and the few X11 libraries that are often missing; the rest (X11 or Wayland, OpenGL, fonts) comes from the system. Reading aloud needs
speech-dispatcher of the system.
- macOS: a freshly downloaded app is started by macOS from a temporary read-only copy, where the marker is not visible. Move the
ChromaZ folder once in Finder (for example to a USB stick or to Applications) and the Data folder is used.
The external programs Bowtie 2, minimap2 and Primer3 are not included in the packages — see External tools.
What changed in each version is listed in CHANGELOG.md.
🌟 Key Features
🧬 Contig Assembly & Alignment
- Built-in alignment algorithms (the Algo list on the toolbar and the Alignment menu):
- Overlap (CAP3-style) — the default for Sanger reads: overlap assembly with no penalty for 5’/3’ overhangs.
- Affine-Gap Block (Gotoh) — semi-global alignment with separate gap-open and gap-extension penalties.
- Needleman-Wunsch — global alignment; Smith-Waterman — local alignment.
- Seed & Extend (BLAST-like) — $k$-mer seeds extended along the best diagonal.
- Banded DP — banded dynamic programming for long reads; Wavefront (WFA) — wavefront alignment.
- Clustal-style progressive MSA — k-mer distance matrix → UPGMA guide tree → profile-to-profile alignment of all reads together with the reference.
- Bowtie 2 and minimap2 (separate programs, with a loaded reference): reads are mapped to the reference. minimap2 presets —
map-ont (Sanger and Nanopore reads, default), lr:hq (accurate long reads, minimap2 2.27 or later), map-hifi (PacBio HiFi), sr (short reads) — are chosen in the list next to the algorithm or in Alignment → minimap2 Preset. Ends of long reads (over 2,000 bases) that stick out of the reference by more than 100 bases are trimmed instead of widening the alignment.
- Auto-contig or reference: the seed is the longest of the reads that overlap the most other reads (shared 16-mers on either strand; for reads of one template this is simply the longest read), or a reference is loaded from FASTA / GenBank / SnapGene
.dna / TXT (File → Load Reference Sequence…, toolbar button 🎯); Remove Reference returns to the auto-contig.
- Large read sets: for a FASTA/FASTQ file with more than 2,000 records a dialog offers to load all reads, a random sample or the longest N (
--max-reads in batch mode).
- Background, multi-threaded alignment on all CPU cores, with a progress bar and Cancel; the window stays responsive.
- Consensus refinement: optional rounds (Refine) re-align all reads to the consensus of the previous round.
- Reverse complement detection (Auto RC): complementary reads are turned automatically (
[RC]), with a manual toggle.
⚖ Consensus
- Quality-weighted (default): every base votes with its Phred quality, in the spirit of CAP3; a gap votes with the lower quality of the neighbouring bases of the same read and wins only when its weight exceeds the sum of the letters; when the second letter comes within 10 of the best one, the consensus gets N (or the IUPAC code of the pair). Each consensus column gets a quality — the weight of the chosen letter minus the strongest rival — used by the FASTQ export and by primer design.
- Majority: one vote per base (Alignment → Consensus or the ⚖ Consensus button on the View & Zoom toolbar;
--consensus majority). Gaps vote only between the first and the last base of a read, so the overhangs of other reads do not vote; a gap wins only when gaps outnumber letters; a tie between letters gives N (or the IUPAC code).
- IUPAC consensus: ambiguity codes (R, Y, S, W, K, M) instead of N.
📈 Chromatograms, Quality & Trimming
- Four-colour trace plot for
.ab1 and .scf (A — green, C — blue, G — black/yellow, T — red), Phred quality colours per base (green $Q \ge 30$, yellow $Q \ge 20$, red $Q < 20$) and 1-based rulers above every read, the consensus and the reference.
- ✂ Trim Low Quality — one click: the modified Mott algorithm with an error limit (0.05 by default) or a Phred threshold, with a minimum remaining length (50); the arrow opens Trim Settings (also “trim when files are loaded”). Command line:
--trim-mott, --trim-quality.
- ✂ Trim Vector Primers — removes the primers shown in the primer library (M13, T7, SP6, pGEX…, at least 12 nt) from the read ends.
- Deleted bases stay in the read with their trace and quality: a blank slot that is restored by typing a letter and survives re-alignment. Bases are removed for good only by trimming.
🔵 Point Heteroplasmy
- The 🔵 Heteroplasmy button finds bases where a second peak stands out of the background noise — the method of PHFinder (Suárez Menéndez et al., PeerJ 2023): the secondary peak must reach MR % of the main one (default 20), the secondary peaks of three neighbours on each side must stay below SR × it (0.4), and reads with mean quality below AQ (40) are skipped. The thresholds and a reference region to search are set in ⚙ Heteroplasmy Settings… (the arrow next to the button).
- Hits are marked in cyan in the header, in the read and on the mini-map; ◀ PH / PH ▶ jump between them.
- 📋 Heteroplasmy Report… (the same arrow): every double peak per read — strand, reference position, column, position in the read, called base, main and secondary peak, their ratio and heights, mean quality and the status of the read; double-click shows the peak in the alignment; TSV export.
- Command line:
--heteroplasmy, --ph-main-ratio, --ph-secondary-ratio, --ph-min-quality, --ph-region, --export-ph.
- 🗂 Analysis Panel (bottom dock) with tabs:
- Coverage — the mini-map (read depth, Phred strip, a GC band in a 50-bp window from blue 0 % through white 50 % to red 100 %, SNP and heteroplasmy ticks, the visible region; click or drag to navigate) and statistics (covered columns, depth, low-quality columns, total GC); the 🛠 Sequencing Primers for Weak Regions… button;
- Differences, Primers, ORFs, Bookmarks — described below.
- Header rows (View → Header Rows): the reference, its annotations (up to 3 lanes), primer sites, ORF arrows, the six frames of the reference (ORF A), the consensus with its primer sites and ORF arrows, the six frames of the consensus (ORF B).
🏷 Reference Annotations (GenBank & SnapGene)
- The FEATURES of a GenBank reference or the annotations of a SnapGene
.dna file are drawn in up to three lanes, with tooltips (type, location, strand, qualifiers); right-click a feature to select it, copy its sequence or translate it (/codon_start, /transl_table). 🏷 Features shows or hides the row.
- Circular molecules (
circular in LOCUS, the SnapGene flag) are digested as circles in the virtual gel; the GenBank export carries the features covered by the consensus.
- SnapGene
.dna (reference): sequence, circular flag, annotations and primers. The primers of the file go into the primer library with the note “from ” (from -r only for the session); sequences already in the library are not added twice.
📋 Differences from the Reference
- The Differences tab lists substitutions, MNVs, insertions, deletions, ambiguous positions and uncovered regions, with the effect in CDS features (synonymous, amino-acid change, nonsense, stop lost, frameshift or in-frame indel, start lost) and the support on the + and − strands; double-click jumps to the column.
- 📋 Differences button (arrow: Export Differences TSV…),
--export-diff. Needs a loaded reference.
🎯 Primer Library & Binding Sites
- Library: 23 built-in sequencing primers (names and sequences checked against the Addgene list “Sequencing Primers”, revision of 22 October 2025) and your own primers — Add, Paste, Import / Export FASTA, Remove, show or hide. The library is shared by all projects and stored in the settings;
--primers <file> adds primers for one session.
- Binding sites on both strands (IUPAC codes allowed, up to 2 mismatches, the last 8 bases of the 3’ end exact) in the Primer sites row — on the reference, or on the consensus without one; the tooltip shows the nearest-neighbour $T_m$ with the Tm Conditions (Na⁺ 50 mM, Mg²⁺ 1.5 mM, primer 250 nM by default).
- 🎯 Primers button: a click shows or hides the row; the arrow opens the Primers tab, the FASTA import, Tm Conditions and the primers for weak regions.
🛠 Primer Design (Primer3)
- 🛠 Design Primers… (Results toolbar, Primers tab, right-click menu) opens a window that stays open next to the alignment. The template is the consensus (primers avoid bases below Q20) or the reference; the target comes from the selection:
- PCR primers around the target — product from the target length + 40 to + 400 bp by default, primers 18–20–25 nt, $T_m$ 57–60–63 °C, 5 pairs;
- Sequencing primers to cover the target — one or several regions, usable read length 500 bp;
- Check library primers — $T_m$, GC, self-dimers, hairpin, 3’-end stability and the sites on the template.
- Selected results are drawn as dashed arrows in the Primer sites row (lane
PRIMER3:); 🎯 Add to Library names them <project>_F1, <project>_R1, …
- 🛠 Sequencing Primers for Weak Regions… (Coverage tab): the targets are the consensus regions read by fewer than 2 reads or with a mean quality below Q20.
- $T_m$ here is calculated by Primer3 (SantaLucia 1998, counting 0.6 mM dNTPs that bind Mg²⁺) and is usually 1–2 °C lower than ChromaZ’s own $T_m$ of the same primer. Primer3 is a separate program — see External tools.
➡ Translation & ORFs
- ORF A / ORF B: six-frame translation of the reference and of the consensus.
- ORFs tab: open reading frames of both with a minimum length (75 aa by default) and a start rule (ATG, also the alternative starts of the genetic code, or stop to stop); double-click selects an ORF; Copy Protein, Copy DNA, Protein Properties…, Export Proteins (FASTA)…. ➡ ORFs shows ORF arrows above the sequences.
- Genetic codes: standard, vertebrate mitochondrial (with its start codons ATT, ATC, ATA, ATG, GTG) and bacterial/plastid; GenBank
/transl_table 1, 2 and 11.
🔎 Search, Go To & Bookmarks
- Search (toolbar box, Find ◀ / ▶): IUPAC codes, up to 3 mismatches, both strands, protein search in the six frames (menu next to the box); the status bar shows “Match 3 of 12”.
- ⤵ Go to (Ctrl+G): a reference position (with a reference) or a consensus position, a column (
c1234) or the name of a feature.
- Bookmarks with notes: Ctrl+B sets or removes one on the selection, F2 edits the note, Ctrl+Alt+→ / Ctrl+Alt+← jump; 🔖 Bookmark button, Bookmarks tab. Bookmarks are stored in the project and follow reference positions (columns without a reference).
- SNP navigation (
◀ SNP / SNP ▶) and a vertical guide line that follows the mouse over all tracks.
✂️ Restriction Analysis
- REBASE data (
bionetc.txt, the list of about 700 commercially available enzymes; REBASE is a free, independent resource — see Licenses). If the file is missing at build time, CMake downloads the current list from REBASE.
- Enzyme selection with the number of sites in the consensus or in the reference and quick picks Unique cutters, Two cutters, Non-cutters, Site ≥ 6 bp; named enzyme sets; the default set is unchanged (all enzymes).
- Cut positions with labels above the consensus (degenerate IUPAC sites, Type IIS cutters such as BsaI); sites at one position share a label.
- Virtual Gel: an agarose gel of the consensus digested with the chosen enzymes (linear or circular, undigested lane, ladder, fragment table, PNG export).
🔬 Properties & Lab Calculators
- 📊 Properties (selection): GC content and profile; $T_m$ by the Wallace rule, the GC formula and the nearest-neighbour method (SantaLucia 1998) with ΔH, ΔS, ΔG; Amount — molecular weight of the single and double strand with a choice of the 5’ end, ε260, nmol and µg per OD, ng ↔ pmol ↔ copies; protein — molecular weight, pI and charge at pH 7 (Bjellqvist pK values), ε280 and Abs 0.1 % (Pace et al. 1995), composition, Kyte-Doolittle hydrophobicity; 🧮 Open in Calculators.
- 🧮 Calculators (Analysis & Tools toolbar, Analysis menu) — work without loaded data; the selection is filled in, the values are remembered:
- Amount & Copies — molecular weight from the sequence (Σ NMP − (n − 1)·H₂O; 5’-OH, 5’-phosphate or 5’-triphosphate; ambiguous bases averaged) or from the length (ssDNA 308.95·N + 18.02, dsDNA 617.89·N + 36.03, RNA 321.44·N + 18.02); OD260 by base composition (ATDBio), 38 µg per OD for ssDNA (Cavaluzzi & Borer 2004), 50 / 33 / 40 µg per OD or ε260 from the spec sheet; ng ↔ pmol ↔ copies;
- Ligation — ng insert = ng vector × (insert length / vector length) × (insert : vector);
- Assembly (Gibson, HiFi) — pmol and volume for every fragment;
- Absorbance — concentration = A260 × factor × dilution, A260/A280 and A260/A230;
- Dilution & Molarity — C1·V1 = C2·V2 (any unknown), mass to weigh;
- OD600 — cells per ml (8 × 10⁸ per OD for E. coli; the factor is editable).
- 1-click NCBI BLASTn / BLASTp of the selection in the web browser.
🔊 Text-to-Speech
- The selection is read aloud base by base with the system speech synthesizer (
Qt6::TextToSpeech); voice and speed (0.5x–2.0x) on the toolbar and in the right-click menu — for checking a sequence against paper notes without looking away.
✍️ Editing & Workspace
- Keyboard editing: substitution (A, C, G, T, N,
-), insertion and deletion with automatic trace coordinates; Undo / Redo up to 100 steps.
- Recent files & autosave: File → Open Recent; the session is autosaved every 2 minutes and can be restored after a crash; unsaved changes are confirmed on exit.
- Settings (window layout, algorithm, thresholds, genetic code, toggles, primer library, calculator values, speech) are restored on start; Clear Workspace resets the tracks; drag & drop reorders tracks and opens files.
📄 Export, Printing & Projects
- File → Export (and the 📤 Export button): consensus FASTA, annotated GenBank, PNG of the view; aligned reads (gapped FASTA); reads as FASTA or FASTQ (as aligned or as read); consensus FASTQ with its quality; edited trace as SCF v3 (the selected read or all reads); differences TSV; the selection as a vector PDF or as PNG at 300 dpi (also in the right-click menu). The heteroplasmy report is exported from its window.
- Printing and PDF report with a chosen number of bases per line; Copy Selection as Image.
.ChromaZ projects: reads, traces, orientations, gaps and edits, the reference with its annotations, bookmarks and the consensus mode — zlib-compressed JSON, saved atomically; older plain-JSON projects still open (older ChromaZ versions cannot open the compressed format).
At first launch six toolbar rows show every button even in a 1280×800 window (in every interface language): File & Project; Alignment & Assembly; View & Zoom; Edit & Navigation with Text-to-Speech Controls; Analysis & Tools; Results & Annotations (🗂 Analysis Panel, 🏷 Features, 📋 Differences, 🎯 Primers, 🛠 Design Primers…, ➡ ORFs, 🔖 Bookmark). Related actions share one button with an arrow menu; menus repeat the buttons. Right-click a toolbar to hide or show toolbars.
🌐 Interface Language
- English, Russian, German, Spanish, Portuguese (Brazil), Latvian, Chinese (Simplified) and Hindi. By default ChromaZ follows the language of the system; View → 🌐 Language and the 🌐 button on the File & Project toolbar choose another one, which is used after a restart. The standard Qt dialogs and buttons are translated too (Qt has no Hindi translation, so they stay in English there).
- Batch mode (
--quit), the command-line help and the exported files (FASTA, GenBank, TSV, SCF) are always in English, so scripts and other programs read them the same way.
ChromaZ can run three programs that are not part of ChromaZ and not included in its packages: they are separate third-party software under their own licences. Alignment → External Tools… shows whether each one is found, its version and folder; Browse… chooses a folder, Reset returns to the automatic search.
| Program |
Used for |
Licence |
Linux |
macOS |
Windows |
| Bowtie 2 |
Alignment to a reference |
GPL-3.0 |
sudo apt install bowtie2 |
brew install bowtie2 |
Download… in External Tools: the official 2.5.5 archive from GitHub, SHA-256 checked |
| minimap2 |
Alignment of Sanger, Nanopore and PacBio reads to a reference |
MIT |
sudo apt install minimap2 |
brew install minimap2 |
A static build of the unmodified sources in the ChromaZ release tools-minimap2-<version>; the Download… button appears when the build is published |
| Primer3 |
Primer design and primer checks |
GPL-2.0-or-later (Amplicon3 part: GPL-3.0-or-later) |
sudo apt install primer3 |
brew install primer3 |
A static build in the ChromaZ release tools-primer3-<version> (with the sources), the same way |
- A download on Windows is offered only after your confirmation; the archive is checked against its pinned SHA-256 and only the needed files are kept in the ChromaZ data folder (
Data in portable mode).
- Search order: the folder chosen in External Tools,
CHROMAZ_BOWTIE2_DIR / CHROMAZ_MINIMAP2_DIR / CHROMAZ_PRIMER3_DIR, the ChromaZ data folder, the program folder, on macOS also /opt/homebrew/bin and /usr/local/bin, then PATH. Command line: --bowtie2-dir, --minimap2-dir.
- Primer3 also needs its thermodynamic parameters folder
primer3_config (next to the program or in the system share folders, for example /etc/primer3_config).
| Format |
Extension |
Description |
| ABI chromatogram |
.ab1 |
Read sequence + trace + Phred quality |
| Staden SCF (v2/v3) |
.scf |
Read sequence + trace + Phred quality; edited traces are exported as SCF v3 |
| FASTA / GenBank |
.fasta, .fa, .gb, .gbk |
Reads or a reference; GenBank features and the circular flag |
| SnapGene |
.dna |
Reference with annotations, primers and the circular flag |
| FASTQ |
.fastq, .fq |
Reads + Phred quality; reads and the consensus are exported as FASTQ |
| Plain text |
.txt |
Raw nucleotide lines |
| GenBank export |
.gbk |
Consensus with restriction sites and the reference features it covers |
| Tables |
.tsv |
Differences from the reference, heteroplasmy report |
| ChromaZ project |
.ChromaZ |
Full workspace |
🎹 Keyboard Shortcuts & Actions
| Shortcut / action |
Description |
| Ctrl + O |
Open sequencing files (AB1 / SCF / FASTA / GenBank / FASTQ / TXT); projects — File → Open Project |
| Ctrl + S / Ctrl + Shift + S |
Save / save as a .ChromaZ project |
| Ctrl + P |
Print & export the PDF report |
| Ctrl + Z / Ctrl + Y (Ctrl + Shift + Z) |
Undo / redo |
| Ctrl + C |
Copy the selected sequence (DNA or ORF protein) |
| Ctrl + F |
Find a sequence |
| Ctrl + G |
Go to a position, a column or a feature |
| Ctrl + B / F2 |
Set or remove a bookmark / edit its note |
| Ctrl + Alt + → / Ctrl + Alt + ← |
Next / previous bookmark |
| Mouse wheel / Ctrl + mouse wheel |
Zoom horizontally (base spacing) / vertically (peak height) |
| Right click |
BLASTn/BLASTp, properties, primer design, PDF/PNG of the selection, speech, GenBank export, enzymes, feature actions |
⌨ Command-Line Options
ChromaZ [options] [files...]
Files and options are applied right after start-up (also in the app: Help → Command-line options…). Options given on the command line do not change the saved settings.
| Option |
Description |
files... |
Sequencing files (.ab1 .scf .fasta .fa .gb .gbk .fastq .fq .txt) and/or a .ChromaZ project |
-p, --project <file> |
Open a .ChromaZ project |
-r, --reference <file> |
Use the first record of a FASTA/GenBank file, or a SnapGene .dna file, as the reference (the primers of a .dna file join the library for this session) |
-a, --algorithm <name> |
overlap (CAP3-style, default; also cap3), gotoh, nw, sw, seed (seed & extend, BLAST-like; also blast), banded, wfa, clustal (progressive MSA), bowtie2 or minimap2 (external programs, need --reference or a project with a reference), or 0–9 |
--bowtie2-dir <dir>, --minimap2-dir <dir> |
Folder with Bowtie 2 (bowtie2-align-s, bowtie2-build-s) / minimap2 |
--minimap2-preset <name> |
map-ont (default), lr:hq, map-hifi, sr |
--max-reads <n> |
Load at most this many reads from one FASTA/FASTQ file, as a random sample (0 = all, default 2000) |
--primers <file> |
Add the primers of a FASTA file (or name<TAB>sequence lines) to the library for this session |
-i, --min-identity <percent> |
Minimum identity for a read to join the contig (default 45) |
-t, --table <name> |
Genetic code: standard, mito, bacterial (or 0–2) |
--no-auto-rc |
Disable automatic reverse-complement detection |
--iupac |
IUPAC ambiguity codes in the consensus |
--consensus <mode> |
quality (default: bases vote with their Phred quality) or majority |
--refine <n> |
Consensus refinement rounds (0–10, default 0) |
--threads <n> |
Alignment threads (0 = automatic) |
--no-orf-a, --no-orf-b |
Hide the six-frame translation of the reference / consensus |
--restriction |
Show restriction sites |
--heteroplasmy |
Find point heteroplasmy (double peaks, PHFinder method) and mark it in cyan |
--ph-main-ratio <percent>, --ph-secondary-ratio <ratio>, --ph-min-quality <phred> |
Heteroplasmy thresholds: MR (default 20), SR (0.4; 100 = off), AQ (40) |
--ph-region <start-end> |
Look for heteroplasmy only at these reference positions, e.g. 16024-16569 |
--trim-mott <limit> |
Trim low-quality read ends with the modified Mott algorithm at this error limit (e.g. 0.05) |
--trim-quality <phred> |
Trim read ends below this Phred score |
--trim-vectors |
Trim the vector primers of the library from read ends |
--export-fasta, --export-gbk, --export-png, --export-pdf <file> |
Write the consensus FASTA / GenBank, the view as PNG, the PDF report |
--pdf-bases <n> |
Bases per line in the PDF report (default 60) |
--export-view-pdf <file>, --view-columns <start-end> |
The view (or these columns) as a vector PDF |
--export-aligned <file> |
Reference, consensus and reads as gapped FASTA in alignment columns |
--export-reads <file> |
Current reads as FASTA, or FASTQ for .fastq/.fq, as aligned |
--export-consensus-fastq <file> |
The consensus with its quality as FASTQ |
--export-diff <file> |
Differences of the consensus from the reference as TSV (needs --reference) |
--export-ph <file> |
Heteroplasmy report as TSV (with the current thresholds, also without --heteroplasmy) |
--save-project <file> |
Save the resulting workspace |
--quit |
Exit after the requested steps (batch mode; use QT_QPA_PLATFORM=offscreen without a display) |
-h, --help, -v, --version |
Help / version |
Examples:
ChromaZ read1.ab1 read2.ab1 --algorithm clustal --refine 2
ChromaZ -p sample.ChromaZ --export-fasta consensus.fasta --quit
ChromaZ reads/*.ab1 -r plasmid.gb --trim-mott 0.05 --trim-vectors --export-pdf report.pdf --quit
ChromaZ reads/*.ab1 -r plasmid.dna --export-diff differences.tsv --export-consensus-fastq consensus.fastq --quit
ChromaZ reads/*.ab1 -r plasmid.gb --export-view-pdf region.pdf --view-columns 100-250 --quit
ChromaZ mito/*.ab1 -r rCRS.fasta --heteroplasmy --ph-region 16024-16569 --export-ph ph.tsv --quit
ChromaZ reads/*.ab1 -r plasmid.fasta -a bowtie2 --export-fasta consensus.fasta --quit
ChromaZ nanopore.fastq -r plasmid.fasta -a minimap2 --max-reads 300 --export-fasta consensus.fasta --quit
🛠 Building & Compilation
Prerequisites
- C++17 compiler (GCC 11+, Clang 14+, MSVC 2019+)
- CMake 3.16+
- Qt 6 with the
Core, Gui, Widgets, Test, TextToSpeech and PrintSupport modules
- Qt Linguist tools (
lrelease) to build the translations into the program, and the Qt translations for the standard dialogs: on Debian/Ubuntu sudo apt install qt6-l10n-tools qt6-translations-l10n; the Qt online installer and brew install qt include them. Without lrelease ChromaZ is built in English only (with a warning)
- Optional, for the tests and the features that use them: Bowtie 2, minimap2 and Primer3 (
sudo apt install bowtie2 minimap2 primer3)
Linux Build (Debian Trixie / Ubuntu 24.04+)
git clone https://github.com/zajakin/ChromaZ.git
cd ChromaZ
cmake -B build -S src -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(nproc)
./build/ChromaZ
Tests
ctest --test-dir build (or ./build/ChromaZTests) runs 108 unit tests of the code without the GUI:
- file parsers — AB1, SCF v2/v3 (including damaged files), FASTA, FASTQ, GenBank features and locations, SnapGene
.dna;
- alignment — exact and reverse-complement reads, deleted bases that survive re-alignment, consensus refinement, progressive MSA, the auto-contig seed for reads of several clones, the memory estimate and cancellation;
- consensus — majority and quality-weighted votes, gaps and margins, IUPAC codes, quality of reverse reads;
- trimming (Mott and threshold), point heteroplasmy, SAM parsing;
- Bowtie 2, minimap2 and Primer3 — real runs when the programs are installed (skipped otherwise), the download helpers, portable mode;
- genetic codes, translation, ORFs, protein properties, restriction sites and site counts, differences and their effects in CDS, primer sites, search, coordinates, the GC window;
- exports (FASTA, FASTQ, SCF round trip), projects, the command-line parser, the choice of the interface language, $T_m$ formulas, the virtual gel and the lab calculators (checked against Biopython 1.85 values).
Translations
The texts of the interface are translated with Qt Linguist. The translations are in src/translations/chromaz_<language>.ts; when ChromaZ is built, lrelease turns them into .qm files inside the program. chromaz_en.ts holds only the English plural forms («1 read», «2 reads»).
cmake --build build --target update_translations # take the new and changed texts from the sources (lupdate)
linguist src/translations/chromaz_ru.ts # translate them in Qt Linguist
cmake --build build # build ChromaZ with the translation
A new language — for example French:
lupdate -no-obsolete -locations relative src -ts src/translations/chromaz_fr.ts
cmake -B build -S src # CMake finds the new .ts file
linguist src/translations/chromaz_fr.ts
cmake --build build
The language then appears in View → 🌐 Language; a regional variant is named like the Qt translation of the standard dialogs (zh_CN, pt_BR). Keep the placeholders (%1, %n), the HTML tags and the emoji at the start of the texts; give all plural forms of %n texts; do not translate the names of programs, enzymes and primers or the units.
CI and Signed Releases
- The unit tests run on Linux, Windows and macOS for every push and pull request; Bowtie 2, minimap2 and Primer3 are installed in CI only for the tests and checks and are never packaged.
- CI builds with
-DCHROMAZ_REQUIRE_TRANSLATIONS=ON: a release cannot be built without the translations; the build log shows how many texts of each translation are unfinished.
- A release is created once all three platforms build, with the installers, the portable packages and
SHA256SUMS.txt; the Chocolatey packages chromaz and chromaz.portable are published from the release.
- The Windows builds of minimap2 and Primer3 offered by Download… are made by the manual workflow Build external tools for Windows (
.github/workflows/tools.yml) from the unmodified sources, as pre-releases tools-<program>-<version>.
- Installers are signed automatically when these repository secrets exist (otherwise unsigned installers are built):
- Windows —
WIN_CERT_PFX_BASE64 (base64 of the .pfx code-signing certificate), WIN_CERT_PASSWORD
- macOS —
MACOS_CERT_P12_BASE64 (Developer ID Application certificate, base64 .p12), MACOS_CERT_PASSWORD, MACOS_SIGN_IDENTITY (e.g. Developer ID Application: Name (TEAMID))
- macOS notarization —
APPLE_ID, APPLE_TEAM_ID, APPLE_APP_PASSWORD (app-specific password); the DMG is then notarized and stapled.
📜 Licenses and Acknowledgements
- ChromaZ is distributed under the MIT License — see LICENSE.
- Qt 6 (LGPL-3.0): the Windows and macOS packages contain the unmodified Qt 6.7.2 libraries as separate dynamic libraries, which you may replace with your own build; the Linux portable package contains the same Qt 6.7.2 libraries, and the
.deb package uses the Qt of the system. The Qt translations of the standard dialogs (qtbase_<language>.qm, unmodified) are embedded in the program. Qt sources: https://download.qt.io/archive/qt/6.7/6.7.2/. The notices of the third-party code inside Qt are in licenses/Qt-6.7.2-third-party.txt.
- REBASE — the restriction enzyme data in
src/bionetc.txt come from REBASE, a free and independent resource (© R. J. Roberts); no charge is made for these data. They are not covered by the MIT License. Please cite: Roberts R.J. et al. (2010) Nucleic Acids Res. 38: D234–D236, doi:10.1093/nar/gkp874; Roberts R.J. et al. (2023) Nucleic Acids Res. 51: D629–D630, doi:10.1093/nar/gkac975.
- PHFinder — the heteroplasmy search follows the published method (Suárez Menéndez M. et al. (2023) PeerJ 11: e16028, doi:10.7717/peerj.16028); its code (GPL-3.0) is not used.
- Bowtie 2 (GPL-3.0), Primer3 (GPL-2.0-or-later) and minimap2 (MIT) are separate programs that ChromaZ only starts; they are not part of ChromaZ and not included in its packages.
- Built-in primers — names and sequences checked against the Addgene list “Sequencing Primers”.
- Calculator formulas and constants — nucleotide masses as in Biopython and the Thermo Fisher table “DNA and RNA Molecular Weights and Conversions”; ε260 by composition (ATDBio); 38 µg per A260 for ssDNA — Cavaluzzi & Borer (2004), doi:10.1093/nar/gnh015; ε280 — Pace et al. (1995), doi:10.1002/pro.5560041120; pK values — Bjellqvist et al. (1993, 1994), doi:10.1002/elps.11501401163, doi:10.1002/elps.1150150171; nearest-neighbour $T_m$ — SantaLucia (1998), doi:10.1073/pnas.95.4.1460.
- Details and the full licence texts:
licenses/ (THIRD-PARTY-NOTICES.txt, LGPL-3.0.txt, GPL-3.0.txt, Qt-6.7.2-third-party.txt) and NOTICE.md; in the program — Help → About ChromaZ → Third-Party Licenses… and Help → About Qt.
评论