capellini.stages.network
Network stage: common abundance, shrinkage, raw/smoothed CRISPR, residual X*.
Slim core. The math follows the paper (CLR + W̃ taxonomy smoothing + residual message passing). Schäfer-Strimmer shrinkage correlations are computed both on the joint Z = [B_clr V_clr] and on the propagated Z* = [B_star V_star].
Outputs go directly under cfg.output_root — no per-study sub-folder.
Functions
|
Aggregate the SpacePHARER predictions into a (bac × vOTU) CRISPR matrix. |
|
SS shrinkage correlation on Z = [B_clr V_clr]. |
Smooth the raw CRISPR matrix via taxonomy kernels; persist all artefacts. |
|
|
Residual X* propagation + Schäfer-Strimmer correlations on Z*. |
|
Run the network stage according to the run_* flags on the config. |
- capellini.stages.network.build_raw_crispr_one(cfg: CapelliniConfig) Path[source]
Aggregate the SpacePHARER predictions into a (bac × vOTU) CRISPR matrix.
- capellini.stages.network.build_shrinkage_one(cfg: CapelliniConfig) dict[str, Path][source]
SS shrinkage correlation on Z = [B_clr V_clr].
- capellini.stages.network.build_smooth_crispr_one(cfg: CapelliniConfig) dict[str, Path][source]
Smooth the raw CRISPR matrix via taxonomy kernels; persist all artefacts.