Skip to main content

mgnifam

mgnifam

PyPI Bioconda DOI

Iterative HMM-based protein family generation over very large sequence databases.

Given a chunk of MMseqs2 clusters and a protein FASTA, mgnifam generate_families builds an HMM from each cluster, recruits new members from the whole database, re-aligns, and either converges on a family or discards the cluster. It is the core algorithm of the mgnifams Nextflow pipeline, extracted into a standalone, tested package.

Documentation: vagkaratzas.github.io/mgnifam

Install

pip install mgnifam        # or: uv tool install mgnifam

Or from bioconda, into its own environment:

conda create -n mgnifam -c conda-forge -c bioconda mgnifam
conda activate mgnifam

Channel order matters — put conda-forge before bioconda, per the bioconda setup. The package is noarch, and conda pulls in a Python 3.13 interpreter itself, so it does not have to be the one already on your PATH. mamba/micromamba work the same way with the same flags.

Requires Python >= 3.13. Verify with mgnifam --version.

To work on the package itself, or to reproduce published results byte-for-byte, install from the repository against the committed lockfile instead — see Reproducibility, which is scoped to that resolved dependency set:

git clone https://github.com/vagkaratzas/mgnifam && cd mgnifam
uv sync --frozen

Quick start

Build families from a chunk of clusters:

mgnifam generate_families \
    --clusters_chunk clusters.tsv \
    --fasta_file mgnifams_input.fa

Refresh existing families against a new release:

mgnifam update_families \
    --hmm_input previous_output/hmm \
    --fasta_file new_release.fa

Group families into clans by how much their members cover the same residues:

mgnifam compute_clans \
    --members output/1_families.tsv output/2_families.tsv \
    --fasta_file mgnifams_input.fa

For generate_families and update_families, --fasta_file must be an uncompressed FASTA with unique sequence names. Pass every threshold explicitly on a production run.

The documentation covers the rest:

  • Generating families: input formats, sequence naming, every flag, and sharing one SSI index across chunks
  • Updating families: --skip_refine, family identity, and retrying a chunk in place
  • Computing clans: residue overlap, clan thresholds, and sizing a release-scale run
  • Outputs: every file, exit status, and the MultiQC summary
  • Reproducibility: what is byte-identical, and how outputs differ from the legacy script
  • Python API

Development

uv lock --check && uv sync --frozen
uv run pre-commit install
uv run pre-commit run --all-files
uv run pytest

The documentation site lives in docs/; see Development to build it.

Metadata

Release files for mgnifam 4.1.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 mgnifam 4.1.0
File Size Uploaded Provenance Actions
mgnifam-4.1.0.tar.gz 402.0 kB With provenance Details for mgnifam-4.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mgnifam 4.1.0
File Interpreter ABI Platform Actions
mgnifam-4.1.0-py3-none-any.whl Python 3 none any Details for mgnifam-4.1.0-py3-none-any.whl

Total release size: 456.5 kB

Release files / mgnifam-4.1.0.tar.gz

Download URL mgnifam-4.1.0.tar.gz
Size 402.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d4b54025c687167951f9e4465d1b592198c9379f0a0cbd0e2988f8cbdc4d703e
BLAKE2b-256 checksum
How to use checksums
7f7a41d1c7927537ce3221f6b42f99af1c99a914bcc7f0d33ab49a5c9ba45727
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 5, 2026.

Transparency log

Release files / mgnifam-4.1.0-py3-none-any.whl

Download URL mgnifam-4.1.0-py3-none-any.whl
Size 54.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3fca35d72617f50f5fff926d1a1851b7676ae170caefdb5c6a0f784e011b5e2c
BLAKE2b-256 checksum
How to use checksums
61e03079ac624b8c916d3f78b92c0a85dfddbe4c0e73c8f4d85ffcfe52bb7845
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 5, 2026.

Transparency log

Security for mgnifam 4.1.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mgnifam-4.1.0.tar.gz

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 Nov 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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