Python package for creating simplified 2D protein visualizations. Specialized on showing differences and similarities between proteins of the same protein family.
Project description
FlatProt
FlatProt is a tool for 2D protein visualization aimed at improving the comparability of protein structures through standardized 2D visualizations. FlatProt focuses on creating highly comparable representations for same-family proteins. In this case FlatProt was used to generate comparable representations for 3 3FTx structures.
Contents
- Getting Started
- First Experiences with Google Colab
- Documentation
- Data
- Example Visualizations
- Domain Annotation File Format
- Runtime for Protein Sizes
- Reference
Getting Started
FlatProt needs python version: python= ">=3.11,<=3.13"
Download FlatProt via uv
We use and recommend uv as a fast, reliable Python package installer and resolver.
# Install FlatProt using uv
uv tool add FlatProt
# Install FlatProt using uv
uvx flatprot
Install Foldseek
Instructions for downloading the Foldseek software can be found in Foldseek's GitHub
--> FlatProt needs the path to the foldseek executable passed as argument to the main function to be used by the program.
Install dssp
Instructions for downloading dssp can be found here:
!The program runs on the mkdssp version 4.4.0! (some sources don't provide that (brew does!))
An example download workflow for usage can also be found in the google colab
First experiences with Google Colab
For direct usage of FlatProt including all parameters the following Collabs provide functionalities for using FlatProt without locally downloading anything. The runtime of the Colab is way longer than local usage. Therefore we don't advise using it for big amounts of data:
Annotation and Style Example
This notebook demonstrates how to apply custom styles and various annotations (point, line, area) to a FlatProt projection.
Same Family Alignment Example
This notebook demonstrates aligning three related three-finger toxin structures (Cobra, Krait, Snake) using a Foldseek database and then projecting them into 2D SVG visualizations using FlatProt.
Domain-Aligned Projection Example
Generate and compare different 2D SVG visualizations of a protein structure based on its domains: Normal Projection, Domain-Aligned Projection, Domain-Separated Projection.
Compute Cystine Bridges Example
This notebook demonstrates how to: Compute cystine (disulfide) bridges from a protein structure file (.cif); Create a FlatProt annotation file (.toml) highlighting these bridges; Generate a 2D SVG projection of the protein using flatprot project, applying the annotations.
Family Overlay Example
This example script demonstrates how to align KLK (Kallikrein) structures and overlay their FlatProt projections.
Documentation
FlatProt's documentation can found here:
The documentation includes:
- Detailed CLI usage instructions
- File format specifications
- API reference
important notes:
- input PDB files need a header to work (important for predicted structures)
- FlatProt's methods can be used via command line commands (cli)
Contributing
We welcome contributions to FlatProt! If you'd like to contribute, please follow these steps:
- Fork the repository: Create your own fork of the FlatProt repository on GitHub.
- Create a branch: Make your changes in a dedicated branch in your fork.
- Submit a pull request: Open a pull request from your branch to the
stagingbranch of the t03i/FlatProt repository.
Please ensure your contributions adhere to the project's coding style and include tests where appropriate. For major changes, please open an issue first to discuss what you would like to change.
See CONTRIBUTING.md for more detailed guidelines.
Data
This project uses datasets that can be found on Zenodo.
Example visualizations
Reference
If you use FlatProt in your research, please cite:
FlatProt: 2D visualization eases protein structure comparison Tobias Olenyi, Constantin Carl, Tobias Senoner, Ivan Koludarov, Burkhard Rost bioRxiv 2025.04.22.650077; doi: https://doi.org/10.1101/2025.04.22.650077
License
FlatProt is licensed under the Apache License 2.0. See the LICENSE file for more details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flatprot-2.0.0.tar.gz.
File metadata
- Download URL: flatprot-2.0.0.tar.gz
- Upload date:
- Size: 26.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22bbec00f49eda3827afc3a133795dc886c5668664477aa894bfdbfa2bc65f2b
|
|
| MD5 |
69711c26ab5d87e4a554611b2f680cfc
|
|
| BLAKE2b-256 |
7f3b15a16fb6d635c8a96874a168e04c4f5e57a53750d32add27bc7786168c41
|
Provenance
The following attestation bundles were made for flatprot-2.0.0.tar.gz:
Publisher:
release.yml on t03i/FlatProt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flatprot-2.0.0.tar.gz -
Subject digest:
22bbec00f49eda3827afc3a133795dc886c5668664477aa894bfdbfa2bc65f2b - Sigstore transparency entry: 203622639
- Sigstore integration time:
-
Permalink:
t03i/FlatProt@0d929c3b15e6389b7e46b4c183158498f85d8bea -
Branch / Tag:
refs/tags/v2.0.3 - Owner: https://github.com/t03i
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0d929c3b15e6389b7e46b4c183158498f85d8bea -
Trigger Event:
push
-
Statement type:
File details
Details for the file flatprot-2.0.0-py3-none-any.whl.
File metadata
- Download URL: flatprot-2.0.0-py3-none-any.whl
- Upload date:
- Size: 117.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae103ae57134b15c9b13197851eadd07b4f8c80dd4d6159ab4e523d944b68cbd
|
|
| MD5 |
67a5b545f6242b8fafa69c3433636907
|
|
| BLAKE2b-256 |
513bc80370a6bb5388dc2d5062c04127daa31c8c2a8a4658735060410c80a6a4
|
Provenance
The following attestation bundles were made for flatprot-2.0.0-py3-none-any.whl:
Publisher:
release.yml on t03i/FlatProt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flatprot-2.0.0-py3-none-any.whl -
Subject digest:
ae103ae57134b15c9b13197851eadd07b4f8c80dd4d6159ab4e523d944b68cbd - Sigstore transparency entry: 203622642
- Sigstore integration time:
-
Permalink:
t03i/FlatProt@0d929c3b15e6389b7e46b4c183158498f85d8bea -
Branch / Tag:
refs/tags/v2.0.3 - Owner: https://github.com/t03i
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0d929c3b15e6389b7e46b4c183158498f85d8bea -
Trigger Event:
push
-
Statement type: