Introduction
Visualising multiple sequence alignments (MSAs) is a common task in computational biology. Many alignment viewers have a graphical user interface (GUI) and are hence unsuitable for use on headless or remote systems such as high-performance computing (HPC) clusters. Command-line tools do exist, for example
alan[
1], which stands out as a particularly elegant solution, since it is built on standard Unix tools such as
awk and
less — indeed, it served as the initial inspiration for the present work. This means, however, that
alan’s interactivity is limited to that of a pager: features such as zooming, reordering sequences, as well as computing and displaying a consensus sequence are absent. While
showalign[
2] can compute a consensus, it does not support colouring residues, and the user must explicitly call a pager in order to scroll through the alignment. Other programs like
alen[
3] are interactive, but not all have built-in residue colour schemes or the ability to visually represent metrics such as similarity to the consensus, or to reorder sequences according to such metrics. The capacity to fit a large alignment on screen, typically by only displaying a subset of the sequences and columns, is also rare. In summary, text-based MSA viewers collectively provide a substantial range of functions, but no viewer implements all, or even most, of them. In this work we introduce
termal, which combines most of these features in a single application.
Interface
Apart from the alignment sequences, which occupy the main pane,
termal also displays sequence labels and ordinal numbers, a consensus sequence, and a conservation bar plot; it also displays sequence metrics such as similarity to the consensus, or (ungapped) length (
Figure 1). The alignment can be scrolled one sequence/column at a time using arrow keys or familiar Vim-style motion keys
h,
j,
k, and
l; similar keystrokes allow jumping by screenfuls or to the edges of the alignment.
By default, residues of nucleotide alignments are coloured according to Jalview’s[
4] nucleotide colour scheme, while protein alignments use that of ClustalX[
5]. An alternative colour scheme for protein is Lesk’s[
6], and all alignments can be rendered in monochrome.
Alignments that exceed the screen size—horizontally, vertically, or both—can be zoomed out to display only the first and last row and column, along with a sample of equidistant intermediates in both dimensions; the sample size is adjusted to fill the available screen space. This allows regions of high conservation to be spotted without scrolling. An alternative zoomed-out mode preserves the alignment’s aspect ratio, at the cost of some unused space.
The sequences can be reordered according to the currently-displayed sequence metric, in increasing or decreasing order. This allows e.g. to group the most complete sequences together, or those that best match the consensus.
The width of the label pane can be adjusted to fit label length, and both the side and bottom panes can be hidden to maximise the space allocated to the alignment.
termal includes a built-in help screen that lists all key bindings.
Availability
termal is distributed under the MIT license. It is available as a precompiled, statically-linked binary (for Linux, MacOS, and Windows), with no external dependencies or runtime environment required, from
https://github.com/sib-swiss/termal.git. Alternatively, users with Rust installed can install it via
cargo install termal-msa. The source code has also been deposited on Zenodo (
https://zenodo.org/records/15472432).
Conclusion
While this work is not intended as a comprehensive review of terminal-based alignment viewers, we surveyed several of them, including showalign, alan, alv, and alen. To our knowledge, termal combines a unique set of features in a terminal interface. Its minimal dependencies and fast startup make termal suitable for both ad-hoc use and for integration into semi-automated workflows requiring alignments to be reviewed in a terminal. Accordingly, termal fills a niche for fast, interactive MSA exploration directly in the terminal, making it an ideal tool for remote bioinformatics workflows.
Author Contributions
Thomas Junier: Conceptualization, Software, Validation, Visualization Writing – Original Draft, Writing – Review & Editing.
Acknowledgments
The development of termal was funded by Swiss National Science Foundation BRIDGE Discovery grant 40B2-0_194701. The author wishes to thank Drs Guillaume Cailleau and Sébastien Moretti for insightful comments on the program.
Conflicts of Interest
The author declares no conflict of interest.
References
- Dunne, M. Alan: A lightweight alignment viewer for the terminal. https://github.com/mpdunne/alan, 2020. Accessed 2025-04-13.
- Rice, P.; Longden, I.; Bleasby, A. EMBOSS: the European Molecular Biology Open Software Suite. Trends in Genetics 2000, 16, 276–277. [Google Scholar] [CrossRef] [PubMed]
- Nissen, J. alen: Interactive terminal-based MSA viewer. https://github.com/jakobnissen/alen, 2023–2024. Accessed 2025-04-13.
- Waterhouse, A.M.; Procter, J.B.; Martin, D.M.; Clamp, M.; Barton, G.J. Jalview Version 2—a multiple sequence alignment editor and analysis workbench. Bioinformatics 2009, 25, 1189–1191. [Google Scholar] [CrossRef] [PubMed]
- Larkin, M.; Blackshields, G.; Brown, N.; Chenna, R.; McGettigan, P.; McWilliam, H.; Valentin, F.; Wallace, I.; Wilm, A.; Lopez, R.; et al. Clustal W and Clustal X version 2.0. Bioinformatics 2007, 23, 2947–2948. [Google Scholar] [CrossRef] [PubMed]
- Lesk, A.M. Introduction to bioinformatics; Oxford university press, 2019.
- Klabnik, S.; Nichols, C. The Rust Programming Language; No Starch Press, 2019.
- Arvestad, L. alv: a console-based viewer for molecular sequence alignments. Journal of Open Source Software 2018, 3, 955. [Google Scholar] [CrossRef]
- Wilm, J. ; contributors. Alacritty - A cross-platform, GPU-accelerated terminal emulator. https://github.com/alacritty/alacritty, 2017–2024. Accessed 2025-04-13.
- Goyal, K. Kitty - The fast, feature-rich, GPU-based terminal emulator. https://sw.kovidgoyal.net/kitty/, 2017–2024. Accessed 2025-04-13.
- Hashimoto, M. Ghostty - A modern, GPU-accelerated terminal emulator. https://github.com/mitchellh/ghostty, 2023–2024. Accessed 2025-04-13.
|
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).