Sugar: A Python framework for bioinformatics

Eulenfeld T 2025 Sugar: A Python framework for bioinformatics Journal of Open Source Software 10, 8122.

Abstract

Modern bioinformatics requires the use of a variety of tools (e.g. BLAST for homology detection, Altschul et al., 1990) and databases (e.g. GenBank, Benson et al., 2012). Custom scripts often need to use the results of these tools, which are available in different formats. Sugar is a Python framework for bioinformatics which aims to facilitate rapid application development. The package allows to read and write various sequence and annotation formats, i.e. FASTA, GenBank, Stockholm, GFF, GTF, BLAST and others. Since sugar uses a plugin system for reading and writing, new file formats can be added not only within the sugar
package, but also within other packages, allowing for low barrier inclusion of new formats. Sugar includes classes for representing DNA/RNA sequences and annotations. The main functionality is exposed through methods of these classes and is therefore readily available. Sugar can be used by researchers and students of bioinformatics alike. The package has already been used as a library in the AnchoRNA package (Eulenfeld et al., 2025) and in several scripts that form the basis of the Ritsch et al. (2024) publication. Sugar can be installed from PyPI. Online documentation and tutorials are available on the GitHub project site