Secstructartist
A python module to plot secondary structure schemes
Install / Use
/learn @aethertier/SecstructartistREADME
secstructartist
This package allows to include pretty secondary structure schemes in matplotlib plots.

Table of content
Installation
Prerequisites
- General prerequisites:
- Python 3.10 or higher
- pip
- Third-party python packages:
- matplotlib
- numpy
Installation from PyPI
This is the recommended way to install the package.
# 1. Create a virtual environment (optional but recommended)
python3 -m venv secstructartist
source secstructartist/bin/activate
# 2. Install the Python module
pip install secstructartist
Installation from GitHub
Here, you will download the repository, and manually build and install the package.
# 1. Create a virtual environment (optional but recommended)
python3 -m venv secstructartist
source secstructartist/bin/activate
# 2. Clone the repository
git clone https://github.com/bickeld/secstructartist.git
cd secstructartist
# 3. Install the package
make install
# 4. Test installation (optional)
make test
Usage
In the examples/ directory there are
Jupyter notebooks
with plenty of code examples on how for simple and advanced use cases.
Therefore, only the basic usage will be covered here.
A simple example
import secstructartist as ssa
secstruct_str = (
'LLHHHHHHHHHHHHHHHHHHLLLLLLLLLLLLLLLLLLLLHHHHHHHLSSSSSSSSSSLL'
'LLSSSSSSSSLLLLSSSSSSLLLLLHHHHHHLLLLLSSSLLLLLLLLSSSHHHHHHHHHH'
'HHHHHHHHHHHHHHHLLLSSSSSSSHHHHHHHHHHHHHHHLLLLLSSSSSSLLLLLL'
)
ssa.draw_secondary_structure(secstruct_str)

Additional styles
The module comes with a couple of preset styles to choose from. These preset styles come in two categories:
- HSL style only use three secondary structure class (Helix, Sheet, Loop) as shown in the example above.
- DSSP styles on the other hand can parse the eight secondary structure classes returned by programs like DSSP or STRIDE.
Moreover, users are free to define their own styles, and save them as custom configuration styles for later use. For examples in how to create custom styles, check this Jupyter notebook.

License
Distributed under the GNU General Public License v3 (GPLv3) License.
Contributing
If you find a bug, please open a bug report. If you have an idea for an improvement or new feature, please open a feature request.

