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.
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.
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 can be found at Read the Docs. The detailed changelog is available here.
Contributions are welcome! -- e.g. report or fix bugs, discuss or add features, improve the documentation. See the CONTRIBUTING.md file for details.