You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# CORNETO: A Unified Framework for Omics-Driven Network Inference <imgsrc="https://github.com/pablormier/resources/raw/main/images/logos/corneto-logo-512px.png"align="right"height="200"alt="logo">
CORNETO (Constraint-based Optimization for the Reconstruction of NETworks from Omics) is a unified network inference framework implemented in Python designed to bring together many common network inference problems in biology. Through constraint programming, CORNETO transforms these problems into unified mathematical representations using flow networks, offering modular building blocks for diverse applications. It accommodates a wide range of network inference problems, from basic analyses like shortest paths or Steiner trees for Protein-Protein Interactions (PPIs), to more advance problems such as contextualising signalling networks from directed signed prior knowledge networks or inferring metabolic networks from Genome-Scale Metabolic Network models, effectively harnessing the capabilities of Flux Balance Analysis.
6
17
7
-
> **NOTE**: This is an early preview of the library, which includes a very limited subset of methods for signalling, and an early version of the API to build optimization problems. We're currently working towards having a final version including additional and novel methods, as well as full support for Flux Balance Analysis (FBA)
18
+
</div>
19
+
20
+
21
+
---
22
+
23
+
CORNETO (Constrained Optimization for the Recovery of Networks from Omics) is a unified framework for multi-sample joint network inference, implemented in Python. It tackles common network inference problems in biology and extends them to support multiple samples or conditions simultaneously, enhancing network identification. The framework reformulates these problems using constrained optimization and mathematical programming, allowing them to be optimally solved with mathematical solvers. Additionally, it provides flexible modeling capabilities, enabling the exploration of hypotheses, modification, or development of new network inference problems through the use of modular constrained building blocks.
The library will be uploaded to pypi once the API is stable. Meanwhile, it can be installed by downloading the wheel file from the repository. It's recommended to use also conda to create a new environment, although it's not mandatory.
31
+
### Stable version
32
+
33
+
A stable version of the lib, which is used by [LIANA+](https://liana-py.readthedocs.io/) and [NetworkCommons](https://networkcommons.readthedocs.io/), is already available at Pypi and can be installed with `pip install corneto`.
12
34
13
-
### Recommended setup
35
+
Plase note that this version lacks many of the developments discussed in the manuscript. To use the latest features, please install the development version.
14
36
15
-
CORNETO does not include any backend nor solver by default to avoid issues with architectures for which some of the required binaries are not available. The recommended setup for CORNETO requires CVXPY and Gurobi:
37
+
You can install it along with CVXPY, Scipy (for open source solver support) and Gurobipy for using GUROBI solver:
16
38
17
39
```bash
18
-
pip install corneto cvxpy scipy gurobipy
40
+
pip install corneto cvxpy-base scipy gurobipy
41
+
```
42
+
43
+
### Development version
44
+
45
+
To install the development version with support for the Gurobi solver and plotting capabilities using graphviz, please use conda or mamba to create an environment:
git clone -b dev https://github.com/saezlab/corneto.git
56
+
cd corneto
57
+
pip install -e .
58
+
```
59
+
60
+
### Installing Gurobi solver
61
+
62
+
CORNETO supports many different mathematical solvers for optimization. However, for real world problems, we typically use GUROBI. **GUROBI is a commercial solver which offers free academic licenses**. If you have an academic email, this step is very easy to do in just few minutes. Follow these steps:
20
63
21
-
Please note that **GUROBI is a commercial solver which offers free academic licenses**. If you have an academic email, this step is very easy to do in just few minutes: https://www.gurobi.com/features/academic-named-user-license/. You need to register GUROBI in your machine with the `grbgetkey` tool from GUROBI.
64
+
1. Request the ["Academic Named-User License"](https://www.gurobi.com/features/academic-named-user-license/).
65
+
2. Register the license in your machine with the `grbgetkey` tool from GUROBI. For this, download the corresponding [license tool for your system](https://support.gurobi.com/hc/en-us/articles/360059842732-How-do-I-set-up-a-license-without-installing-the-full-Gurobi-package)
66
+
3. Run the `grbgetkey` tool and introduce your license key.
67
+
68
+
If you find any issue, please check [this article](https://support.gurobi.com/hc/en-us/articles/13207658935185-How-do-I-retrieve-an-Academic-Named-User-license)
69
+
70
+
Please note that other high performance solvers like CPLEX, COPT, Mosek, etc are also supported. Please check the [solver's table](https://www.cvxpy.org/tutorial/solvers/index.html) to see which solvers are supported by the CVXPY backend.
71
+
72
+
### Installing open-source solvers
22
73
23
74
Alternatively, it is possible to use CORNETO with any free solver, such as HIGHS, included in Scipy. For this you don't need to install Gurobi. Please note that if `gurobipy` is installed but not registered with a valid license, CORNETO will choose it but the solver will fail due to license issues. If SCIPY is installed, when optimizing a problem, select SCIPY as the solver
24
75
@@ -27,13 +78,33 @@ Alternatively, it is possible to use CORNETO with any free solver, such as HIGHS
27
78
P.solve(solver="SCIPY")
28
79
```
29
80
30
-
> :warning: Please note that without any backend, you can't do much with CORNETO. There are two supported backends right now: [PICOS](https://picos-api.gitlab.io/picos/tutorial.html) and [CVXPY](https://www.cvxpy.org/). Both backends allow symbolic manipulation of expressions in matrix notation.
81
+
## Experiments
31
82
83
+
Notebooks with the experiments presented in the manuscript are available here: https://github.com/saezlab/corneto-manuscript-experiments
32
84
85
+
## How to cite
86
+
87
+
```
88
+
@article {Rodriguez-Mier2024,
89
+
author = {Rodriguez-Mier, Pablo and Garrido-Rodriguez, Martin and Gabor, Attila and Saez-Rodriguez, Julio},
90
+
title = {Unified knowledge-driven network inference from omics data},
CORNETO is developed at the [Institute for Computational Biomedicine](https://saezlab.org) (Heidelberg University). The development of this project is supported by European Union's Horizon 2020 Programme under
CORNETO is developed at the [Institute for Computational Biomedicine](https://saezlab.org) (Heidelberg University). We acknowledge funding from the European Unions Horizon 2020 Programme under the grant agreement No 951773 (PerMedCoE https://permedcoe.eu/) and under grant agreement No 965193 (DECIDER https://www.deciderproject.eu/)
We welcome contributions of tutorials that showcase how to use CORNETO for biological network inference, optimisation, and analysis. If you’ve built something useful or interesting with CORNETO, share it to help others learn!
4
+
5
+
All tutorials are stored in:
6
+
```
7
+
corneto/docs/tutorials/
8
+
```
9
+
10
+
---
11
+
12
+
## 📁 Directory Structure
13
+
14
+
Each tutorial must be placed in its own folder inside one of the following:
15
+
16
+
```
17
+
corneto/docs/tutorials/
18
+
accepted/
19
+
my_tutorial/
20
+
notebook.ipynb
21
+
requirements.txt # or dependencies.yaml
22
+
contrib/
23
+
another_example/
24
+
example.ipynb
25
+
dependencies.yaml
26
+
template/
27
+
template.ipynb
28
+
dependencies.yaml
29
+
```
30
+
31
+
-`accepted/`: Reviewed and validated tutorials.
32
+
-`contrib/`: Community submissions pending review.
33
+
-`template/`: A suggested structure to help you start.
34
+
35
+
---
36
+
37
+
## 📦 Dependency File Format
38
+
39
+
Each tutorial folder **must include** a file listing additional dependencies:
40
+
- Use either `requirements.txt`**or**`dependencies.yaml`
41
+
-**All packages must specify a minimum version (`>=`)**
42
+
- Avoid pinning (`==`) unless absolutely required
43
+
44
+
### ✅ Example `requirements.txt`
45
+
```text
46
+
scanpy>=1.9
47
+
matplotlib>=3.5
48
+
```
49
+
50
+
### ✅ Example `dependencies.yaml`
51
+
```yaml
52
+
dependencies:
53
+
- scanpy>=1.9
54
+
- matplotlib>=3.5
55
+
```
56
+
57
+
> ℹ️ If your tutorial has no extra dependencies, include an empty file or write:
58
+
> `# No additional dependencies required`
59
+
60
+
---
61
+
62
+
## 🚀 How to Submit a Tutorial
63
+
64
+
### 1. Fork and Clone the Repository
65
+
```bash
66
+
git clone https://github.com/saezlab/corneto
67
+
cd corneto
68
+
```
69
+
70
+
### 2. Switch to the `dev` Branch
71
+
```bash
72
+
git checkout dev
73
+
```
74
+
75
+
### 3. Create a New Branch
76
+
```bash
77
+
git checkout -b contrib/my-tutorial-name
78
+
```
79
+
80
+
### 4. Add Your Tutorial Folder
81
+
Place your folder here:
82
+
```
83
+
corneto/docs/tutorials/contrib/my_tutorial_name/
84
+
```
85
+
Include:
86
+
- `my_tutorial_name.ipynb`
87
+
- `requirements.txt`or `dependencies.yaml` with **minimum versions**
88
+
89
+
### 5. Commit and Push
90
+
91
+
Use **[Conventional Commits](https://www.conventionalcommits.org/)**:
0 commit comments