Skip to main content

homoppi

homoppi
Testing CI
Package PyPI Latest Release Python versions PyPI Downloads
Meta License - MIT Ruff

🧬 What is it?

homoppi predicts protein-protein interactions (PPIs) for any species with a proteome by transferring experimentally known interactions through homology:

  • Interolog mapping (IM) — a query pair (A, B) is predicted to interact when homologs (A′, B′), found by blastp, form a known PPI in a template library.
  • Domain-domain interaction (DDI) — a query pair is predicted to interact when their Pfam domains (annotated by hmmscan) form a known domain-domain interaction (3did, optionally expanded with an EM algorithm from known PPIs).

Each method integrates all matched templates into a probability, S = 1 − ∏(1 − s_template), and reports the full supporting evidence (template pairs, species, alignment statistics) so every prediction is traceable. The two methods complement each other: IM needs conserved full-length homologs, while DDI still fires on fast-evolving proteins that keep their domain architecture.

homoppi workflow

📦 Installation

pip install homoppi
conda install -c bioconda blast hmmer   # external engines, found on PATH

Requires Python >= 3.11. Binaries can also be pointed to explicitly with --blastp-bin / --hmmscan-bin / etc.

⚡ Quickstart

A tiny self-contained demo ships in examples/ — from that directory, every command below runs as-is:

# 1. build the reference database once
homoppi makedb --out db/ --ppi data/ppis.tsv --fasta 9606=data/templates_9606.fasta \
    --ddi data/ddis.tsv --pfam-hmm data/toy_pfam.hmm

# 2. score query pairs with both methods and merge
homoppi run --db db/ --workdir runs/demo --fasta data/query.fasta \
    --pairs data/pairs.tsv --fused

For real use, swap in your own libraries (see Input formats) and query proteome. Batch mode scales to tens of thousands of pairs — unique proteins are searched once, then all pairs are scored from the cached tables. Omitting --pairs switches to proteome-wide all-vs-all mode. Each stage is also its own command (blast, domainanno, interolog, ddi) with cached, resumable results.

📄 Input formats

File Columns Notes
PPI library (--ppi) protein_a protein_b taxid score score optional, must be in [0, 1]; unscored templates fall back to --default-template-score (default 0)
Template proteomes (--fasta TAXID=PATH, repeatable) FASTA UniProt-style headers auto-parsed; else first token, or --id-regex; proteins absent from the PPI library are dropped
DDI library --ddi-3did 3did flat file, --ddi-em EM scores, or --ddi pre-scored TSV pfam_a pfam_b score 3did+EM scored as ½(S_known + S_EM)
Pfam (--pfam-hmm, --pfam-dat) Pfam-A.hmm, Pfam-A.hmm.dat pressed into the db; .dat provides clans for --resolve-clan-overlap
Query pairs (--pairs) 2 columns, header optional IDs must match the query FASTA headers (first token)

Where the data comes from. PPI templates: IntAct ships ready-made MI confidence scores, or aggregate several databases (BioGRID, HitPredict, ...) and score them with the HIPPIE scheme — either way, normalize scores into [0, 1]. DDI templates: 3did flat file, optionally expanded with homoppi ddi-em. Domain models: Pfam-A.hmm (+ .hmm.dat) from the EBI FTP.

📊 Outputs

<workdir>/results/ per method (interolog.* / ddi.*), plus combined.summary.tsv from run:

Table Columns
*.summary.tsv (one row per query pair) query_a, query_b, n_templates, s_im/s_ddi, best_template_a/_b, best_template_taxid/_source, best_template_score
interolog.evidence.tsv (one row per template) template pair, taxid, template_score, per-side pident, qcov, scov, evalue
ddi.evidence.tsv (one row per template) domain pair, source (3did/em), template_score, per-side cevalue
combined.summary.tsv n_im_templates, s_im, n_ddi_templates, s_ddi (+ s_fused = 1−(1−s_im)(1−s_ddi) with --fused)
*.params.json snapshot of every effective parameter of the run

Workdir layout: blast/ and hmmscan/ keep both raw and filtered search results, logs/ the external-tool logs, state.json the stage cache that powers resume.

🎛 Thresholds and options

Defaults follow the published method: blastp homologs at identity ≥ 30%, query coverage ≥ 40%, E-value ≤ 1e-10; hmmscan domains at conditional E-value ≤ 1e-10 (or --cut-tc). Self pairs are discarded unless --include-self; --taxids restricts IM evidence to chosen template species.

Optional strictness knobs, all off by default:

  • --min-subject-coverage — also require the template side of a blastp hit to be covered (HSP-union fraction of the template length).
  • --min-hmm-coverage — require a domain hit to span this fraction of the Pfam HMM model.
  • --resolve-clan-overlap — overlapping hits from the same Pfam clan keep only the best one, preventing double-counted DDI evidence (needs makedb --pfam-dat).

Tightening thresholds on an existing workdir only re-filters the cached raw output; loosening them (or changing the query) reruns the external search automatically.

🧮 Expanding the DDI library with EM

Domain pairs co-occurring across known interacting proteins are scored by expectation-maximization (Deng et al. 2002) and merged with 3did:

homoppi domainanno --db db/ --workdir runs/templates --fasta human.fasta
homoppi ddi-em --db db/ --domains runs/templates/hmmscan/domains.tsv --out em_scores.tsv
homoppi makedb --out db/ --ddi-3did 3did_flat --ddi-em em_scores.tsv

⏱ Performance

  • Unique query proteins are searched once; scoring 1,000 pairs from cached tables takes seconds.
  • Measured on 8 threads against a 7-species library (1.06 M scored PPIs, 49 k proteins): 300 query proteins × 1,000 pairs through both methods in ~5 minutes (hmmscan dominates).
  • Proteome-wide mode streams evidence to disk; memory scales with the number of predicted pairs, not the evidence volume.

📚 References

📄 License

MIT

Metadata

Release files for homoppi 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for homoppi 0.1.1
File Size Uploaded Provenance
homoppi-0.1.1.tar.gz 445.5 kB With provenance Details

Built distribution (wheel)

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

Total release size: 486.1 kB

Release files / homoppi-0.1.1.tar.gz

Download URL homoppi-0.1.1.tar.gz
Size 445.5 kB
Tags Source
SHA-256 checksum
How to use checksums
40a676dbc6e54feb7ea2f4991511c0c1b742dff39311a7d176dc10bd51cbe4c2
BLAKE2b-256 checksum
How to use checksums
a70fc280215a46cc4479f0604185a230bd9b3363d54ed950e6a0b4fa219926b3
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 18, 2026.

Transparency log

Release files / homoppi-0.1.1-py3-none-any.whl

Download URL homoppi-0.1.1-py3-none-any.whl
Size 40.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f2287cb419dc4dbdb3ddbcafdabecc2f5752a9cb87fffdbbf0aa8c94f535abb9
BLAKE2b-256 checksum
How to use checksums
eede45d3d2729c05f61e3cb9a3b732a7ea3ca467800ff7102372a2b4b537ab98
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 18, 2026.

Transparency log

Security for homoppi 0.1.1

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for homoppi-0.1.1.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 Aug 18, 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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

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