pyXenium.gmi#
pyXenium.gmi is the canonical contour-native GMI surface. It builds
contour-level pseudo-bulk design matrices from Xenium data, combines RNA and
numeric contour features, runs the vendored local Gmi R package, and writes
report-ready artifacts for main effects, interactions, controls, and
within-label heterogeneity.
The API is public, and the Atera S1-vs-S5 workflow has a completed PDC Dardel
validation in v0.4.1. Statistical and biological interpretation still keeps a
beta caveat: use the bundled controls, cross-validation, and sensitivity runs
before making biological claims on new datasets.
Configuration for canonical contour-native GMI workflows. |
|
A contour-level design matrix and binary endpoint for GMI. |
|
Parsed GMI fit outputs and report metadata. |
|
Configuration for GMI-anchored spatial gene module discovery. |
|
Artifacts from supervised GMI spatial module discovery. |
|
Build a contour-level GMI design matrix from a XeniumSlide object. |
|
Build a lightweight GMI effect graph from selected effects and feature-space support. |
|
Discover supervised spatial gene modules from existing contour-GMI artifacts. |
|
Score GMI modules per contour and orient high scores toward the enriched endpoint. |
|
Render a concise Markdown report for GMI spatial modules. |
|
Runtime notes#
Gmiis installed only from the vendored source snapshot underpyXenium._vendor.Gmi; normal runtime paths never install from GitHub.Required R packages are
cPCG,MASS,Rcpp, andRcppEigen.Backwards-compatible
SpatialGmi*aliases remain importable, but they point to the contour implementation and do not construct spatial tiles.
Spatial gene modules#
discover_gmi_modules(...) adds a supervised module layer on top of an existing
GMI output directory. Selected or bootstrap-stable GMI effects seed each module,
then correlated features, contour-neighborhood spatial-lag correlations, and
GMI interaction partners expand the module. The output bundle includes
spatial_modules.tsv, module_features.tsv, module_scores.tsv.gz,
module_enrichment.tsv, module_interactions.tsv,
module_spatial_autocorr.tsv, a Markdown report, and optional contour score
maps.
The WTA breast PDC module validation generated an S5/DCIS NIBAN1/SORL1
module in the primary QC20, RNA-only, and no-coordinate runs, plus spatial-only
composition modules and QC sensitivity maps documented in the GMI spatial
module tutorial.