Skip to main content

TriGer

tests PyPI bioRxiv License: MIT

Platform Repository Installation
R MATRIX-Research-Lab/TriGer remotes::install_github("MATRIX-Research-Lab/TriGer")
Python MATRIX-Research-Lab/TriGer-PyPI (this repository) pip install triger
MATLAB jy2941/TriGer Clone the repository and add matlab/methods and matlab/visualization to the MATLAB path

The R and Python packages give identical results on the same input; both are tested against shared reference outputs. The MATLAB repository also contains the code for the simulations and the real-data analyses of the paper.

Python package triger for TriGer, from the paper Structured cross-omics interaction discovery with a triple-graph model.

TriGer finds modules of features that are densely associated across two omics layers (X and Y) and coherent within each layer. It peels dense blocks from the cross-omics association matrix, then refines large blocks using the within-omics correlation matrices.

Installation

pip install triger

The development version:

pip install git+https://github.com/MATRIX-Research-Lab/TriGer-PyPI.git

Quick start

import triger

# X: samples x m features, Y: samples x n features (NumPy arrays or pandas
# DataFrames; DataFrames are matched by sample index and keep feature names)
res = triger.triger(X, Y, lambda1=1.1, lambda2=1.8, lambda3=1.8,
                    X_size=(10, 15), Y_size=(10, 250))

for mod in res.modules:
    print(len(mod.X), "X features,", len(mod.Y), "Y features")
print(res.modules[0].X_names)

# Cross- and within-omics correlations of the module features
m = res.m
triger.plot3in1_v1(res.R[:m, :m], res.R[m:, m:], res.R[:m, m:], res.modules,
                   line=True)

The lower-level functions work on precomputed matrices:

a = triger.association_matrices(X, Y)          # signed R and -log10 p P
blocks = triger.greedy_3step(a.P, a.R, a.m, a.n, lambda1=1.1, lambda2=1.8,
                             lambda3=1.8, X_size=(10, 15), Y_size=(10, 250))
x_idx, y_idx, density = blocks[0]              # or blocks[0].X, .Y, .density

Functions

Function Description
triger Full pipeline on two omics layers
association_matrices Signed correlation and -log10 p-value matrices over both layers
greedy_3step Full pipeline on precomputed association matrices
greedy_peeling_XY_one / greedy_peeling_XY_all Dense blocks in a cross-omics (X-Y) matrix
greedy_peeling_X_one / greedy_peeling_X_all Dense communities in a within-omics (symmetric) matrix
sort_result / sort_result_XandY Order features within each block
plot3in1_v1 X-Y heatmap with the X-X and Y-Y matrices as triangles
plot_all_result Heatmap of the detected blocks

Blocks are returned as Block(X, Y, density) records, communities as Community(X, density), and the modules of triger as Module(X, Y, density, X_names, Y_names). All indices are 0-based.

lambda1 is the cross-omics size penalty and lambda2 / lambda3 are the within-omics penalties for X and Y (λ₀, λ₁, λ₂ in the paper); higher values give smaller, denser blocks. max_blocks is the maximum number of blocks found in the cross-omics step (default 5). The CRC and IBD analyses of the paper, run with the MATLAB code, correspond to max_blocks=4.

Citation

Yu J, Lin H, Chen S (2026). Structured cross-omics interaction discovery with a triple-graph model. bioRxiv. doi:10.64898/2026.09.10.749540

License

MIT

Metadata

Release files for triger 1.0.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 triger 1.0.0
File Size Uploaded Provenance Actions
triger-1.0.0.tar.gz 156.0 kB With provenance Details for triger-1.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 170.7 kB

Release files / triger-1.0.0.tar.gz

Download URL triger-1.0.0.tar.gz
Size 156.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c6d55c9a4cf9106698ead47764c03eef24c3f493b44515c02c4ef653414f8d2c
BLAKE2b-256 checksum
How to use checksums
7579f3eaa0fa30e23f0ba66567966159494bb8b4002f06c52fa20e91583126a3
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 22, 2026.

Transparency log

Release files / triger-1.0.0-py3-none-any.whl

Download URL triger-1.0.0-py3-none-any.whl
Size 14.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e4e949efe9e6af9779e11e22c2e0e5653162f258d5a5e7c3cf440f5e5c30a7bc
BLAKE2b-256 checksum
How to use checksums
fc13b2faeeb498cb959b7b045c067c5038cdee6fcba7a925c771117322f97bbb
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 22, 2026.

Transparency log

Security for triger 1.0.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 triger-1.0.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 22, 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

1.0.0 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