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

build_common_abundance_one(cfg)

build_raw_crispr_one(cfg)

Aggregate the SpacePHARER predictions into a (bac × vOTU) CRISPR matrix.

build_shrinkage_one(cfg)

SS shrinkage correlation on Z = [B_clr V_clr].

build_smooth_crispr_one(cfg)

Smooth the raw CRISPR matrix via taxonomy kernels; persist all artefacts.

build_xstar_one(cfg)

Residual X* propagation + Schäfer-Strimmer correlations on Z*.

run_network(cfg)

Run the network stage according to the run_* flags on the config.

capellini.stages.network.build_common_abundance_one(cfg: CapelliniConfig) dict[str, Path][source]
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.

capellini.stages.network.build_xstar_one(cfg: CapelliniConfig) dict[str, Path][source]

Residual X* propagation + Schäfer-Strimmer correlations on Z*.

capellini.stages.network.run_network(cfg: CapelliniConfig) dict[str, dict][source]

Run the network stage according to the run_* flags on the config.