Skip to main content

A Python framework for bioinformatics

The sugar project aims to provide a lightweight framework to facilitate rapid application development for bioinformatics.

It thus provides classes and functions for working with DNA and RNA sequences, as well as related annotations, and it provides parsers and writers for various file formats using a plugin interface.

Installation

Sugar requires a Python version >=3.11. Use pip to install the package, e.g.

pip install rnajena-sugar

Other installation options are described in the documentation.

Run tests with the sugar test command. Note that tests that require an Internet connection are skipped by default, this behavior can be turned off with the --web option. Also, depending on the installation and platform, some tests may be skipped or have an expected failure, to see details about the reasons please use the --verbose flag.

Getting started

Read about how to get started in the tutorial section of the documentation.

from sugar import read
seqs = read()  # load example GenBank file
print(seqs)
print(seqs[1].fts)  # show features attached to second sequence
seqs.plot_ftsviewer(show=True)  # plot attached features
aas = seqs['cds'].translate()
print(aas)
aas.write('translated_cds.fasta')

Documentation and Changelog

Documentation can be found at Read the Docs. The detailed changelog is available here.

Contributions

Contributions are welcome! -- e.g. report or fix bugs, discuss or add features, improve the documentation. See the CONTRIBUTING.md file for details.

Citation

If you found this package useful, please consider citing it.

Eulenfeld T (2025), Sugar: A Python framework for bioinformatics, Journal of Open Source Software, 10(111), 8122, doi:10.21105/joss.08122

Metadata

Release files for rnajena-sugar 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rnajena-sugar 1.2.0
File Size Uploaded
rnajena_sugar-1.2.0.tar.gz 336.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rnajena-sugar 1.2.0
File Interpreter ABI Platform
rnajena_sugar-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 774.8 kB

Release files / rnajena_sugar-1.2.0.tar.gz

Download URL rnajena_sugar-1.2.0.tar.gz
Size 336.1 kB
Tags Source
SHA-256 checksum
How to use checksums
44dff108d19f48d1458865ab4a3360df767f5dfad432cf1651e7410638f0f640
BLAKE2b-256 checksum
How to use checksums
105566ca5afc8866eacae0d6b2c5555a7f761d216550be4a859e4451a5efbe59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.0

Release files / rnajena_sugar-1.2.0-py3-none-any.whl

Download URL rnajena_sugar-1.2.0-py3-none-any.whl
Size 438.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
202e83221d9db9516a80cfbc3187717545dab8058f9dc67ad44cce551429ebdd
BLAKE2b-256 checksum
How to use checksums
85c61163b06255b18b5925961c381a19a9d60909923e3fefd6dea44012319ec5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.0

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page