Skip to main content

PyMMseqs 🚀

GitHub Actions License PyPI Version Docker

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?

PyMMseqs Quick Tour


🗝️ 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 latest with 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 pymmseqs via pip or use the Docker image.

Where the MMseqs2 binary comes from

Wheels for Linux (x86_64, aarch64) and macOS (Apple Silicon, Intel) ship the MMseqs2 binary inside the package, so pip install pymmseqs needs no extra step. PyMMseqs looks for it in this order:

  1. MMSEQS2_PATH, if set — use this to point at your own MMseqs2 build.
  2. The binary bundled in the installed package.
  3. A copy previously downloaded to ~/.cache/pymmseqs/ (respects XDG_CACHE_HOME).
  4. Otherwise it downloads the pinned MMseqs2 release into that cache on first use.

Step 4 only happens on platforms we ship no wheel for. If your machine has no internet access, install MMseqs2 separately and set MMSEQS2_PATH.

⚠️ Linux x86_64 requires AVX2 (Intel Haswell / AMD Excavator, 2013 or newer). The bundled x86_64 binary is the AVX2 build, and a Python wheel cannot express a CPU-feature requirement. On an older CPU it fails with Illegal instruction (SIGILL). If that happens, grab the sse41 build from the MMseqs2 releases and set MMSEQS2_PATH to it.


🤝 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.

↑ Back to Top

Metadata

Release files for pymmseqs 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 pymmseqs 1.2.0
File Size Uploaded
pymmseqs-1.2.0.tar.gz 88.4 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for pymmseqs 1.2.0
File
pymmseqs-1.2.0-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details
pymmseqs-1.2.0-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details
pymmseqs-1.2.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details
pymmseqs-1.2.0-py3-none-manylinux1_x86_64.manylinux_2_5_x86_64.whl Python 3 none Linux glibc 2.5+ x86-64 Details
pymmseqs-1.2.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
pymmseqs-1.2.0-py3-none-macosx_10_15_x86_64.whl Python 3 none macOS 10.15+ x86-64 Details

Total release size: 47.4 MB

Release files / pymmseqs-1.2.0.tar.gz

Download URL pymmseqs-1.2.0.tar.gz
Size 88.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9c29ee1327dd58656f166887aab466c7cf29f673037dc612edacb056a178f212
BLAKE2b-256 checksum
How to use checksums
f93212061e31947de85c6e110bc6056b400f3954fe5499663dd908f080831d23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.

Transparency log

Release files / pymmseqs-1.2.0-py3-none-musllinux_1_2_x86_64.whl

Download URL pymmseqs-1.2.0-py3-none-musllinux_1_2_x86_64.whl
Size 6.9 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
5599c8f274ccb18bf82e57e16383045fc68cbf241c5def10842202ac9d97381a
BLAKE2b-256 checksum
How to use checksums
99d8ce9045423a0d83c6d3409be21a826b09f4ede7b641f82ec8370a46e89f3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.

Transparency log

Release files / pymmseqs-1.2.0-py3-none-musllinux_1_2_aarch64.whl

Download URL pymmseqs-1.2.0-py3-none-musllinux_1_2_aarch64.whl
Size 6.5 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
dfadc6a1d1d2175a23679450b61cdf8c4a45d13e89312cba6f0dfd4bdb0ed7ba
BLAKE2b-256 checksum
How to use checksums
cc8be669dea38b10a1c420d558ef5c24f37375d4c6ac70c7332076bf82bc2df1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.

Transparency log

Release files / pymmseqs-1.2.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL pymmseqs-1.2.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 6.5 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
6599e3b3c9aaf5b8fd93f010e5ece50d3ec1675e8c58e8649b8258cec3cc30d6
BLAKE2b-256 checksum
How to use checksums
04f9e919718d6997cce52b67e2068dc0e5395bbcb08e2546911cccff322d8c57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.

Transparency log

Release files / pymmseqs-1.2.0-py3-none-manylinux1_x86_64.manylinux_2_5_x86_64.whl

Download URL pymmseqs-1.2.0-py3-none-manylinux1_x86_64.manylinux_2_5_x86_64.whl
Size 6.9 MB
Tags Linux glibc 2.5+ x86-64 Python 3
SHA-256 checksum
How to use checksums
b2e78132a637b0e957f4222a047b53ef12c747087ebe3634e55e758c120ee09e
BLAKE2b-256 checksum
How to use checksums
ea294d56c8b6c38cf436a8c0d04d0a21593d3c85671ccee1853168e15479886d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.

Transparency log

Release files / pymmseqs-1.2.0-py3-none-macosx_11_0_arm64.whl

Download URL pymmseqs-1.2.0-py3-none-macosx_11_0_arm64.whl
Size 10.3 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
9c78ce921a80f884f49d7b6de1727bd0dd954fb13814984069de167f723e6cf9
BLAKE2b-256 checksum
How to use checksums
a35ee8e0ff076252e0e6ce012116646ad55294a5b6101f1ec0ef6175e8866654
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.

Transparency log

Release files / pymmseqs-1.2.0-py3-none-macosx_10_15_x86_64.whl

Download URL pymmseqs-1.2.0-py3-none-macosx_10_15_x86_64.whl
Size 10.3 MB
Tags Python 3 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
f2064598012cd1b986e5fb5d9d8f5089e1fda73298d1ccbebd485c799dd62cb6
BLAKE2b-256 checksum
How to use checksums
950982584095d82733cef421dcfb116e38ad989d4c528e240e0aa2064195d6ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.2.0 This release

7 release files

1.1.0

4 release files

1.0.7

4 release files

1.0.6

4 release files

1.0.5

4 release files

1.0.4

4 release files

1.0.3

4 release files

1.0.2

4 release files

1.0.1

4 release files

1.0.0

6 release files

0.0.25

1 release file

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