Skip to content

Commit 288e7f9

Browse files
authored
Merge pull request #19 from pablormier/dev
corneto.org landing page
2 parents 9d13ca8 + 2cb6987 commit 288e7f9

10 files changed

Lines changed: 1109 additions & 458 deletions

File tree

.github/workflows/deploy-docs.yml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -80,21 +80,15 @@ jobs:
8080
mkdir -p temp_root
8181
cp docs/switcher.json temp_root/switcher.json
8282
touch temp_root/.nojekyll
83-
cat > temp_root/index.html << EOF
84-
<!DOCTYPE html>
85-
<html>
86-
<head>
87-
<meta charset="utf-8">
88-
<title>Redirecting to main documentation</title>
89-
<meta http-equiv="refresh" content="0; URL=./main/">
90-
<link rel="canonical" href="./main/">
91-
</head>
92-
<body>
93-
<p>Redirecting to <a href="./main/">main documentation</a>...</p>
94-
</body>
95-
</html>
96-
EOF
97-
83+
84+
if [ -f docs/custom-index.html ]; then
85+
echo "Found custom-index.html, using it…"
86+
cp docs/custom-index.html temp_root/index.html
87+
else
88+
echo "No custom-index.html, copying default-index.html…"
89+
cp docs/default-index.html temp_root/index.html
90+
fi
91+
9892
- name: Deploy content to root
9993
uses: peaceiris/actions-gh-pages@v4
10094
with:

README.md

Lines changed: 83 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,75 @@
1-
# CORNETO: A Unified Framework for Omics-Driven Network Inference <img src="https://github.com/pablormier/resources/raw/main/images/logos/corneto-logo-512px.png" align="right" height="200" alt="logo">
1+
<div align="center">
2+
<img alt="corneto logo" src="docs/_static/logo/corneto-logo-512px.png" height="200"/>
3+
<br>
4+
<h3>CORNETO: Unified knowledge-driven network inference from omics data.</h3>
5+
6+
7+
<h4>
8+
9+
[Preprint](https://doi.org/10.1101/2024.10.26.620390) | [Documentation](https://saezlab.github.io/corneto/dev) | [Notebooks](https://saezlab.github.io/corneto/dev/tutorials/index.html)
10+
11+
</h4>
12+
213
<!-- badges: start -->
14+
[![GitHub stars](https://img.shields.io/github/stars/saezlab/corneto)](https://github.com/saezlab/corneto/stargazers)
315
[![main](https://github.com/saezlab/corneto/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/saezlab/corneto/actions)
416
<!-- badges: end -->
5-
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.
617

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.
24+
25+
<p align="center">
26+
<img alt="CORNETO abstract" src="docs/_static/corneto-fig-abstract-v3.jpg" width="720" style="max-width: 100%; height: auto;">
27+
</p>
828

929
## Installation
1030

11-
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`.
1234

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.
1436

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:
1638

1739
```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:
46+
47+
```
48+
conda activate your-environment
49+
conda install -c conda-forge python-graphviz scipy
50+
pip install cvxpy-base gurobipy
51+
```
52+
53+
Then, install the dev version of CORNETO:
1954
```
55+
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:
2063

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
2273

2374
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
2475

@@ -27,13 +78,33 @@ Alternatively, it is possible to use CORNETO with any free solver, such as HIGHS
2778
P.solve(solver="SCIPY")
2879
```
2980

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
3182

83+
Notebooks with the experiments presented in the manuscript are available here: https://github.com/saezlab/corneto-manuscript-experiments
3284

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},
91+
elocation-id = {2024.10.26.620390},
92+
year = {2024},
93+
doi = {10.1101/2024.10.26.620390},
94+
publisher = {Cold Spring Harbor Laboratory},
95+
URL = {https://www.biorxiv.org/content/early/2024/10/29/2024.10.26.620390},
96+
eprint = {https://www.biorxiv.org/content/early/2024/10/29/2024.10.26.620390.full.pdf},
97+
journal = {bioRxiv}
98+
}
99+
```
33100

34101
## Acknowledgements
35102

36-
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
37-
PerMedCoE project ([permedcoe.eu](https://permedcoe.eu/)) agreement no. 951773.
103+
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/)
38104

39-
<img src="https://raw.githubusercontent.com/saezlab/.github/main/profile/logos/saezlab.png" alt="Saez lab logo" height="64px" style="height:64px; width:auto"> <img src="https://lcsb-biocore.github.io/COBREXA.jl/stable/assets/permedcoe.svg" alt="PerMedCoE logo" height="64px" style="height:64px; width:auto"> <img src="https://yt3.googleusercontent.com/ytc/AIf8zZSHTQJs12aUZjHsVBpfFiRyrK6rbPwb-7VIxZQk=s176-c-k-c0x00ffffff-no-rj" alt="UKHD logo" height="64px" style="height:64px; width:auto">
105+
<div align="left">
106+
<img src="https://raw.githubusercontent.com/saezlab/.github/main/profile/logos/saezlab.png" alt="Saez lab logo" height="64px" style="margin: 0 20px;">
107+
<img src="https://yt3.googleusercontent.com/ytc/AIf8zZSHTQJs12aUZjHsVBpfFiRyrK6rbPwb-7VIxZQk=s176-c-k-c0x00ffffff-no-rj" alt="UKHD logo" height="64px" style="margin: 0 20px;">
108+
<img src="https://lcsb-biocore.github.io/COBREXA.jl/stable/assets/permedcoe.svg" alt="PerMedCoE logo" height="64px" style="margin: 0 20px;">
109+
<img src="https://raw.githubusercontent.com/saezlab/corneto/refs/heads/main/docs/_static/decider-eu-logo.png" alt="UKHD logo" height="64px" style="margin: 0 20px;">
110+
</div>

docs/conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,9 @@
168168
"version_match": corneto.__version__,
169169
},
170170
"navbar_start": ["navbar-logo", "version-switcher"],
171+
"analytics": {
172+
"google_analytics_id": "G-Z263GN2PKK",
173+
}
171174
}
172175

173176
# Additional HTML context for templates.

docs/custom-index.html

Lines changed: 431 additions & 0 deletions
Large diffs are not rendered by default.

docs/default-index.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Redirecting to main documentation</title>
6+
<meta http-equiv="refresh" content="0; URL=./main/">
7+
<link rel="canonical" href="./main/">
8+
</head>
9+
<body>
10+
<p>Redirecting to <a href="./main/">main documentation</a></p>
11+
</body>
12+
</html>

docs/tutorials/README.md

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
# 🧠 Contribute a Tutorial to CORNETO
2+
3+
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/)**:
92+
93+
```bash
94+
git add corneto/docs/tutorials/contrib/my_tutorial_name/
95+
git commit -m "docs(tutorial): add my_tutorial_name example notebook"
96+
git push origin contrib/my-tutorial-name
97+
```
98+
99+
### 6. Open a Pull Request
100+
101+
Open a **PR against `dev`** with title:
102+
```
103+
docs(tutorial): add my_tutorial_name example
104+
```
105+
106+
In the PR description, include:
107+
- 📘 What the tutorial covers
108+
- 🔧 Which CORNETO functionality it uses
109+
- 🧪 External dependencies (with versions)
110+
- 📊 Key outputs or takeaways
111+
112+
---
113+
114+
## 🧪 Tips for a Good Tutorial
115+
116+
- Use markdown cells to explain key steps and reasoning.
117+
- Keep it concise and focused on a clear use-case.
118+
- Use small or public datasets when possible.
119+
- Ensure the notebook runs top to bottom without errors.
120+
- Avoid heavy or obscure dependencies unless necessary.
121+
- Use open source solvers such as `highs` or `scip` if possible.
122+
- Include a README in your tutorial folder with:
123+
- A brief description of the tutorial
124+
- Instructions to run the notebook
125+
- Any additional notes or tips
126+
127+
---
128+
129+
## ✨ Recognition
130+
131+
Accepted tutorials will:
132+
- Be moved to `accepted/`
133+
- Be listed in CORNETO documentation
134+
- Credit the author in the README or release notes
135+
136+
---
137+
138+
## 🧰 Questions?
139+
140+
Open a GitHub issue or start a discussion. We’re happy to help!
141+
142+
---
143+
144+
Happy contributing! 🧬

docs/tutorials/accepted/.gitkeep

Whitespace-only changes.

docs/tutorials/contrib/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)