capellini.stages.network

Network stage: build common-abundance, shrinkage, CRISPR, smoothed, and X* outputs.

Functions

build_common_abundance_one(study, cfg)

Build the aligned, prevalence-filtered common abundance tables.

build_raw_crispr_one(study, cfg)

Aggregate phage-host predictions into a raw CRISPR network.

build_shrinkage_one(study, cfg)

Compute shrinkage correlations on the bacteria-virus joint matrix.

build_smooth_crispr_one(study, cfg)

Smooth the raw CRISPR matrix using bacteria/virus taxonomy kernels.

build_xstar_one(study, cfg)

Build the CLR-transformed message-passing X* outputs.

run_network(cfg)

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

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

Build the aligned, prevalence-filtered common abundance tables.

Parameters:
  • study – Study identifier.

  • cfg – Populated CapelliniConfig.

Returns:

Mapping of artefact name to written file path.

capellini.stages.network.build_raw_crispr_one(study: str, cfg: CapelliniConfig) Path[source]

Aggregate phage-host predictions into a raw CRISPR network.

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

Compute shrinkage correlations on the bacteria-virus joint matrix.

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

Smooth the raw CRISPR matrix using bacteria/virus taxonomy kernels.

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

Build the CLR-transformed message-passing X* outputs.

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

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

Parameters:

cfg – Populated CapelliniConfig instance.

Returns:

Dict mapping each enabled sub-stage name to its outputs.