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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

homoppi-0.1.1.tar.gz (445.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

homoppi-0.1.1-py3-none-any.whl (40.6 kB view details)

Uploaded Python 3

File details

Details for the file homoppi-0.1.1.tar.gz.

File metadata

  • Download URL: homoppi-0.1.1.tar.gz
  • Upload date:
  • Size: 445.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for homoppi-0.1.1.tar.gz
Algorithm Hash digest
SHA256 40a676dbc6e54feb7ea2f4991511c0c1b742dff39311a7d176dc10bd51cbe4c2
MD5 1eb7cafb252fc137bb60fd0f0078b49a
BLAKE2b-256 a70fc280215a46cc4479f0604185a230bd9b3363d54ed950e6a0b4fa219926b3

See more details on using hashes here.

Provenance

The following attestation bundles were made for homoppi-0.1.1.tar.gz:

Publisher: publish.yml on ChiaChunL/homoppi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file homoppi-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: homoppi-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 40.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for homoppi-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f2287cb419dc4dbdb3ddbcafdabecc2f5752a9cb87fffdbbf0aa8c94f535abb9
MD5 739435d05762cbbe73dec501cda63cf7
BLAKE2b-256 eede45d3d2729c05f61e3cb9a3b732a7ea3ca467800ff7102372a2b4b537ab98

See more details on using hashes here.

Provenance

The following attestation bundles were made for homoppi-0.1.1-py3-none-any.whl:

Publisher: publish.yml on ChiaChunL/homoppi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

2 files

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