Python wrapper for MMseqs2
Project description
PyMMseqs 🚀
PyMMseqs is a powerful Python wrapper for MMseqs2. It seamlessly integrates MMseqs2’s advanced functionality into your Python workflows, allowing you to effortlessly execute MMseqs2 commands and parse their outputs into convenient Python objects for further analysis. Whether you're clustering sequences, searching databases, or analyzing large-scale biological data, PyMMseqs simplifies the process while maintaining the performance and flexibility of MMseqs2.
🎯 5-Minute Tour of PyMMseqs
Want to see the power of PyMMseqs in action?
Try our quick tour on Google Colab and experience the full power of PyMMseqs, all in just 5 minutes!
Ready to dive in?
🗝️ Features
- Seamless Integration: Execute MMseqs2 commands directly within your Python code, eliminating the need for shell scripting or external command-line tools.
- Output Parsing: Convert MMseqs2 outputs into Python objects (e.g., Pandas DataFrame, generators, dictionaries) for easy manipulation and analysis.
- High Performance: Leverage the speed and efficiency of MMseqs2 while enjoying the flexibility of Python.
- Cross-Platform: Use PyMMseqs via pip or Docker, ensuring compatibility across different environments. PyMMseqs works seamlessly on Linux and macOS.
Note: Windows users should either use Windows Subsystem for Linux (WSL) or Docker to run PyMMseqs.
🛠️ Installation
PyMMseqs can be installed in two ways: via pip (recommended for most users) or using a Docker image (ideal for reproducible environments).
Installing via pip
The pymmseqs package is currently available on PyPI. To install it, use the following command:
pip install pymmseqs
Using Docker Image
For users who prefer not to install PyMMseqs locally or want a pre-configured environment, a Docker image is available on GitHub Container Registry (GHCR).
Debian-based Image
To pull the Debian-based Docker image, run:
docker pull ghcr.io/heispv/pymmseqs:latest-debian
Note: If you want to use a specific version of PyMMseqs, you can replace
latestwith the desired version.
Tip: Using Docker ensures that all dependencies, including MMseqs2, are pre-installed and configured, making it ideal for reproducible workflows.
🚀 Example Usage
Here's a simple example to get you started with PyMMseqs. This example demonstrates how to perform sequence clustering and parse the results.
If you were using MMseqs2 directly in the terminal, you would run the following command to cluster sequences:
mmseqs easy-cluster human.fasta human_clust tmp --min-seq-id 0.9
With PyMMseqs, you can achieve the same result directly in Python, and parse the output to Python objects for further analysis.
from pymmseqs.commands import easy_cluster
# Perform clustering on a FASTA file (equivalent to the terminal command above)
human_cluster = easy_cluster("human.fasta", "human_clust", "tmp", min_seq_id=0.9)
# Get results as a Python generator for easy processing
cluster_gen = human_cluster.to_gen()
# Let's get the representative sequence of a cluster with more than 100 members
for cluster in cluster_gen:
if len(cluster["members"]) > 100:
print(f"Representative sequence of a large cluster: {cluster['rep']}")
break
📖 Documentation
For detailed usage instructions, advanced examples, and API references, please visit the PyMMseqs Wiki.
🔧 Prerequisites
To use PyMMseqs, you only need:
- Python: Version 3.10 or higher.
Note: All other dependencies, including MMseqs2, are automatically installed when you install
pymmseqsvia pip or use the Docker image.
🤝 Contributing
We'd love your contributions to PyMMseqs! Simply fork, branch, commit, push, and open a PR.
For bug reports, feature requests, or questions, please open an issue on the GitHub Issues page.
📜 License
PyMMseqs is licensed under the MIT License.
🌟 Support
If you find PyMMseqs useful, please consider giving the repository a star on GitHub! ⭐
It helps others discover the project and motivates further development.
For questions, feedback, or support, feel free to open an issue or contact the maintainers.
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 Distributions
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 pymmseqs-1.0.6.tar.gz.
File metadata
- Download URL: pymmseqs-1.0.6.tar.gz
- Upload date:
- Size: 58.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba147285d12ddbcbada952687cf1870a70a90d3517e7923bb449487aef1e0b33
|
|
| MD5 |
86640092cc1a9405b8cd3b6b6fb86d58
|
|
| BLAKE2b-256 |
9076e81ce8dbdf3255ef1872677129352dc30b04c003972d303fb0ae15d00a0d
|
Provenance
The following attestation bundles were made for pymmseqs-1.0.6.tar.gz:
Publisher:
release.yaml on peymanvahidi/pymmseqs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pymmseqs-1.0.6.tar.gz -
Subject digest:
ba147285d12ddbcbada952687cf1870a70a90d3517e7923bb449487aef1e0b33 - Sigstore transparency entry: 978682685
- Sigstore integration time:
-
Permalink:
peymanvahidi/pymmseqs@6b0525fb35b8215974eaba2f033ff16c6e604aed -
Branch / Tag:
refs/tags/v1.0.6 - Owner: https://github.com/peymanvahidi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@6b0525fb35b8215974eaba2f033ff16c6e604aed -
Trigger Event:
push
-
Statement type:
File details
Details for the file pymmseqs-1.0.6-cp310-cp310-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: pymmseqs-1.0.6-cp310-cp310-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 7.4 MB
- Tags: CPython 3.10, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
868a43d856da81bb6fdc996c4bdf69bd7adfd9493c675cd788ca7c930b4a580b
|
|
| MD5 |
37e6507e122dae3b5a344c03951a7254
|
|
| BLAKE2b-256 |
3d85b93c0914e714e4d000dbacd4bc563eebed77880bf26d049342aebf4a6f91
|
Provenance
The following attestation bundles were made for pymmseqs-1.0.6-cp310-cp310-musllinux_1_2_x86_64.whl:
Publisher:
release.yaml on peymanvahidi/pymmseqs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pymmseqs-1.0.6-cp310-cp310-musllinux_1_2_x86_64.whl -
Subject digest:
868a43d856da81bb6fdc996c4bdf69bd7adfd9493c675cd788ca7c930b4a580b - Sigstore transparency entry: 978682796
- Sigstore integration time:
-
Permalink:
peymanvahidi/pymmseqs@6b0525fb35b8215974eaba2f033ff16c6e604aed -
Branch / Tag:
refs/tags/v1.0.6 - Owner: https://github.com/peymanvahidi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@6b0525fb35b8215974eaba2f033ff16c6e604aed -
Trigger Event:
push
-
Statement type:
File details
Details for the file pymmseqs-1.0.6-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: pymmseqs-1.0.6-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 7.4 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
faa3f946faae0a72c97a587557b07c732ba6a7894ea03059a0ae83c1e881d15a
|
|
| MD5 |
0ae14087ada836bc1190c568b1cf26f7
|
|
| BLAKE2b-256 |
95f20f5c11b3acaf34c6aaa19568c2c189a05a3934fe4b3de2cfda8d08ab8c82
|
Provenance
The following attestation bundles were made for pymmseqs-1.0.6-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yaml on peymanvahidi/pymmseqs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pymmseqs-1.0.6-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl -
Subject digest:
faa3f946faae0a72c97a587557b07c732ba6a7894ea03059a0ae83c1e881d15a - Sigstore transparency entry: 978682733
- Sigstore integration time:
-
Permalink:
peymanvahidi/pymmseqs@6b0525fb35b8215974eaba2f033ff16c6e604aed -
Branch / Tag:
refs/tags/v1.0.6 - Owner: https://github.com/peymanvahidi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@6b0525fb35b8215974eaba2f033ff16c6e604aed -
Trigger Event:
push
-
Statement type:
File details
Details for the file pymmseqs-1.0.6-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: pymmseqs-1.0.6-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 10.1 MB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fb125a0926eb9896173beb2cac0ecfb1d3b284f63caccf61a180ec0de0e0c85
|
|
| MD5 |
8d50e903033273f53d4b0dae6b19960e
|
|
| BLAKE2b-256 |
56b04fd0d941d4adc3990ad0d9ea63c0b3a30a1b25409ac7453019d7b72a4b8b
|
Provenance
The following attestation bundles were made for pymmseqs-1.0.6-cp310-cp310-macosx_11_0_arm64.whl:
Publisher:
release.yaml on peymanvahidi/pymmseqs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pymmseqs-1.0.6-cp310-cp310-macosx_11_0_arm64.whl -
Subject digest:
3fb125a0926eb9896173beb2cac0ecfb1d3b284f63caccf61a180ec0de0e0c85 - Sigstore transparency entry: 978682843
- Sigstore integration time:
-
Permalink:
peymanvahidi/pymmseqs@6b0525fb35b8215974eaba2f033ff16c6e604aed -
Branch / Tag:
refs/tags/v1.0.6 - Owner: https://github.com/peymanvahidi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@6b0525fb35b8215974eaba2f033ff16c6e604aed -
Trigger Event:
push
-
Statement type: