Network inference (corneto.methods)#

Methods (corneto.methods)#

This module provides the implementations of the various methods used in CORNETO. It is organized into several functional areas.

Signaling#

Network methods to infer signaling networks from omics data.

CarnivalILP.build and CarnivalFlow.build accept explicit perturbation and transcription-factor mappings for one condition. Their build_many methods accept named conditions. milp_carnival remains as a compatibility formulation.

CellNOptDAG.build accepts binary input, measurement, and optional inhibitor mappings. build_many infers one shared connected reaction model while evaluating its Boolean state independently in every named condition.

CarnivalFlow([lambda_reg, ...])

Flow-base, multi-sample CARNIVAL method for intracellular signaling.

CarnivalILP([beta_weight, max_dist, ...])

Multi-condition implementation of the CARNIVAL ILP formulation.

signaling.CellNOptDAG([lambda_reg, ...])

Infer a shared acyclic Boolean model from multiple conditions.

BidirectionalPHONEMeS([default_edge_cost, ...])

Infer one globally optimized network around regulated kinase anchors.

PHONEMeS([default_edge_cost, max_flow, ...])

Infer acyclic signaling networks from phosphoproteomic scores.

compute_phonemes_scores(pvalues, *[, ...])

Compute PHONEMeS node scores from p-values and fold changes.

milp_carnival(G, perturbations, measurements)

Build the supported single-condition CARNIVAL ILP formulation.

CellNOpt visualization#

CellNOpt plotting utilities use the standard CORNETO graph renderers for network views and return Matplotlib figure/axes objects for data-fit views.

signaling.plot_cellnopt_model(method[, ...])

Plot a solved CellNOpt model using CORNETO's graph renderers.

signaling.plot_cellnopt_fit(method[, ...])

Compare CellNOpt measurements and predictions across conditions.

CellNOpt and AnnNet#

These helpers keep the signed network, perturbation conditions, and fitted CellNOptDAG results in one AnnNet object.

signaling.add_cellnopt_conditions(graph, *, ...)

Add CellNOpt perturbations and measurements as AnnNet condition layers.

signaling.build_cellnopt_from_annnet(method, ...)

Build a CellNOptDAG problem from a signed network and data in AnnNet.

signaling.add_cellnopt_results(graph, ...[, ...])

Add a solved CellNOptDAG model and its condition results to AnnNet.

Metabolism#

Network methods for flux balance analysis in metabolic networks. Use build with explicit objectives, bounds, or expression values; build_from_data provides the advanced generic-data interface.

MultiSampleFBA([lambda_reg, beta_reg, ...])

Flux Balance Analysis (FBA) method for multiple samples.

MultiSampleIMAT([lambda_reg, beta_reg, eps, ...])

Integrative Metabolic Analysis Tool (iMAT) implementation for multiple samples.

Graph optimization#

Methods for extracting optimal subnetworks.

PrizeCollectingSteinerTree([...])

Prize-Collecting Steiner Tree optimization method built on top of FlowMethod.

SteinerTreeFlow([max_flow, ...])

Basic Steiner Tree optimization method as a flow-based problem.

create_multisample_shortest_path(G, ...[, ...])

Build one shortest-path flow per source-target condition.

shortest_path(G, s, t[, edge_weights, ...])

Build a shortest-path optimization problem between two vertices.

solve_shortest_path(G, s, t[, edge_weights, ...])

Solve a shortest-path problem and return its selected edge indices.

Solution sampling#

Utilities used by the indexed alternative-solution tutorials.

sampler.sample_alternative_solutions(...[, ...])

Generate alternative feasible solutions by perturbing one decision variable.