No retraction, correction or concern found when last checked on Oct 16, 2026.
Logomaker: beautiful sequence logos in Python
Ammar Tareen, Justin B Kinney
Bioinformatics · 2019 · CC BY
Abstract
Summary. Sequence logos are visually compelling ways of illustrating the biological properties of DNA, RNA and protein sequences, yet it is currently difficult to generate and customize such logos within the Python programming environment. Here we introduce Logomaker, a Python API for creating publication-quality sequence logos. Logomaker can produce both standard and highly customized logos from either a matrix-like array of numbers or a multiple-sequence alignment. Logos are rendered as native matplotlib objects that are easy to stylize and incorporate into multi-panel figures.
Availability and implementation. Logomaker can be installed using the pip package manager and is compatible with both Python 2.7 and Python 3.6. Documentation is provided at http://logomaker.readthedocs.io; source code is available at http://github.com/jbkinney/logomaker.
Full text
From PubMed Central, U.S. National Library of Medicine, as current on Oct 16, 2026. Paragraph numbers are ours, so an answer can point at one.
1 Introduction
Sequence logos provide evocative graphical representations of the functional properties of DNA, RNA and protein sequences. Logos consist of characters stacked upon one another at a series of integer-valued positions, with the height of each character conveying some type of information about its biological importance. This graphical representation was introduced by for illustrating statistical properties of multiple-sequence alignments. Although the specific representation they advocated is still widely used, sequence logos have since evolved into a general data visualization strategy that can be used to illustrate many different kinds of biological information. For example, logos can be used to illustrate base-pair-specific contributions to protein–DNA binding energy, the effects of mutations in massively parallel selection experiments, and attribution method visualizations of deep neural networks.
A substantial number of software tools for generating sequence logos have been described. However, each of these tools substantially limits the kinds of logos that one can make and the ways in which those logos can be styled. For example, WebLogo was one of the first logo-generating tools to be described and is still perhaps the most widely used. WebLogo allows users to create two standard types of sequence logos (information logos and probability logos) from a list of input sequences. However, it does not allow one to generate logos from arbitrary matrices of character heights. This capability is needed for illustrating the ΔΔG values of energy matrix models (Fig. 1B), the log-enrichment values obtained in high-throughput selection experiments (Fig. 1E) or importance scores that describe the predictions of deep neural networks (Fig. 1F). Moreover, although WebLogo is available as a Python package, the graphics it generates are written directly to file. This prevents logos from being customized using the matplotlib routines familiar to most Python users, or automatically incorporated into multi-panel figures.
In contrast to WebLogo and the other tools described above, ggseqlogo enables the creation of sequence logos within the R programming environment from arbitrary user-provided data. Importantly, ggseqlogo renders logos using native vector graphics, which facilitates post-hoc styling and the incorporation of logos into multi-panel figures. However, similar software is not yet available in Python. Because many biological data analysis pipelines are written in Python, there is a clear need for such logo-generating capabilities. Here we describe Logomaker, a Python package that addresses this need.
2 Implementation
Logomaker is a flexible Python API for creating sequence logos. Logomaker takes a pandas DataFrame as input, one in which columns represent characters, rows represent positions and values represent character heights (Fig. 1A). This enables the creation of logos for any type of data that are amenable to such a representation. The resulting logo is drawn using vector graphics embedded within a standard matplotlib Axes object, thus facilitating a high level of customization as well as incorporation into complex figures. Indeed, the logos in Figure 1 were generated as part of a single multi-panel matplotlib figure. Logomaker provides a variety of options for styling the characters within a logo, including the choice of font, color scheme, vertical and horizontal padding, etc. Logomaker also enables the highlighting of specific sequences within a logo (Fig. 1E), as well as the use of value-specific transparency in logos that illustrate probabilities (Fig. 1C). If desired, users can further customize individual characters within any rendered logo.
Because sequence logos are still commonly used to represent the statistics of multiple-sequence alignments, Logomaker provides methods for processing such alignments into matrices that can then be used to generate logos. Multiple types of matrices can be generated in this way, including matrices that represent probabilities (Fig. 1C), log odds ratios (Fig. 1E) or the information values described by (Fig. 1D). Methods for transforming between these types of matrices are also provided. Finally, Logomaker supports the creation of masked matrices and logos that, e.g., represent deep neural network importance scores, as in Figure 1F.
3 Conclusion
Logomaker thus fills a major need in the Python community for flexible logo-generating software. Indeed, Logomaker has already been used to generate logos for multiple preprints and publications. Logomaker is thoroughly tested, has minimal dependencies and can be installed from PyPI by executing ‘pip install logomaker’ at the command line. A step-by-step tutorial on how to use Logomaker, as well as comprehensive documentation, is available at http://logomaker.readthedocs.io.
References 39
- 1.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 2.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 3.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 4.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 5.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 6.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 7.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 8.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 9.
- 10.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 11.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 12.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 13.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 14.
- 15.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 16.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 17.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 18.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 19.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 20.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 21.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 22.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 23.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 24.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 25.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 26.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 27.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 28.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 29.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 30.
- 31.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 32.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 33.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 34.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 35.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 36.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 37.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 38.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
- 39.
This reference’s wording can’t be shown under the paper’s licence.
Not in our library
Cited by papers we hold 10
- Human SARS-CoV-2 challenge uncovers local and systemic response dynamics · 2024Corrected
- Broadly neutralizing and protective nanobodies against SARS-CoV-2 Omicron subvariants BA.1, BA.2, and BA.4/5 and diverse sarbecoviruses · 2022Not checked
- MicrobioSee: A Web-Based Visualization Toolkit for Multi-Omics of Microbiology · 2022Not checked
- AlphaPeptDeep: a modular deep learning framework to predict peptide properties for proteomics · 2022No notice
- Genomic diversity and ecology of human-associated Akkermansia species in the gut microbiome revealed by extensive metagenomic assembly · 2021No notice
- DeepTCR is a deep learning framework for revealing sequence concepts within T-cell repertoires · 2021Corrected
- Undinarchaeota illuminate DPANN phylogeny and the impact of gene transfer on archaeal evolution · 2020No notice
- Stop codon context influences genome-wide stimulation of termination codon readthrough by aminoglycosides · 2020No notice
- Deep Mutational Scanning of SARS-CoV-2 Receptor Binding Domain Reveals Constraints on Folding and ACE2 Binding · 2020No notice
- Quantitative mapping of protein-peptide affinity landscapes using spectrally encoded beads · 2019Not checked
Reads
Read by people on this page
None yet.
Checked or read by AI through naulon
None yet.
A person counts once a day per paper. We keep no cookie and no address: a reader is a hash that changes every day. Any month under five reads shows no number.
Are you an author?
Is this your paper?
Claim it to add your note and be paid when agents cite it. Free.