Skip to content

Commit 5d59c15

Browse files
deeenesclaude
andcommitted
Add COSMOS PKN vignette; link metabo service in landing page
New vignette docs/vignettes/cosmos.md covering: 6 PKN categories, get_pkn() with organism/category/resource filtering, multi-organism, AnnNet conversion, convenience functions, REST API endpoints. Updated index.md: added COSMOS PKN to Learn more + metabo.omnipathdb.org to Services table. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ddba285 commit 5d59c15

4 files changed

Lines changed: 136 additions & 0 deletions

File tree

docs/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ op.values('exports/interactions', 'entity_types') # allowed values
7272
taxonomy, orthology, reference lists
7373
- **[OmniPath Database vignette](vignettes/database.md)** -- interactions,
7474
annotations, complexes
75+
- **[COSMOS PKN vignette](vignettes/cosmos.md)** -- multi-layer
76+
prior-knowledge network for multi-omics causal reasoning
7577
- **[API Reference](reference/index.md)** -- full function documentation
7678
- **[Installation](installation.md)** -- setup instructions
7779

@@ -81,3 +83,4 @@ op.values('exports/interactions', 'entity_types') # allowed values
8183
|---------|-----|-----------------|
8284
| OmniPath Database | [dev.omnipathdb.org](https://dev.omnipathdb.org) | Interactions, annotations, complexes, ontology |
8385
| OmniPath Utils | [utils.omnipathdb.org](https://utils.omnipathdb.org) | ID translation, taxonomy, orthology, reference lists |
86+
| OmniPath Metabo | [metabo.omnipathdb.org](https://metabo.omnipathdb.org) | COSMOS PKN, metabolite-protein interactions |

docs/vignettes/cosmos.md

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# COSMOS Prior-Knowledge Network
2+
3+
This vignette shows how to use omnipath-client to access the COSMOS
4+
prior-knowledge network (PKN) -- a multi-layer network designed for
5+
multi-omics causal reasoning with
6+
[cosmosR](https://github.com/saezlab/cosmosR).
7+
8+
The COSMOS PKN integrates metabolite-protein interactions, protein-protein
9+
signaling, and gene regulation from curated databases into a single
10+
directed signed network. It is served by the
11+
[metabo.omnipathdb.org](https://metabo.omnipathdb.org) web service and
12+
built by the [omnipath-metabo](https://github.com/saezlab/omnipath-metabo)
13+
package.
14+
15+
## Setup
16+
17+
```python
18+
pip install omnipath-client
19+
```
20+
21+
```python
22+
import omnipath_client as oc
23+
```
24+
25+
## Network categories
26+
27+
The PKN is organized into six categories covering different layers of
28+
molecular interaction:
29+
30+
| Category | Description |
31+
|----------|-------------|
32+
| `transporters` | Metabolite transport across membranes (TCDB, SLC, GEMs, MRCLinksDB) |
33+
| `receptors` | Metabolite-receptor binding at the cell surface (STITCH, MRCLinksDB) |
34+
| `allosteric` | Allosteric regulation of enzymes by metabolites (BRENDA, STITCH) |
35+
| `enzyme_metabolite` | Enzyme-metabolite stoichiometric reactions from GEMs |
36+
| `ppi` | Protein-protein signaling from OmniPath |
37+
| `grn` | Gene regulatory network from CollecTRI / DoRothEA |
38+
39+
## Fetch the full PKN
40+
41+
```python
42+
# Full human PKN (all 6 categories)
43+
df = oc.cosmos.get_pkn('human')
44+
```
45+
46+
The result is a DataFrame with columns `source`, `target`, and `sign`
47+
(mode of regulation: 1 = stimulation, -1 = inhibition).
48+
49+
## Filter by category
50+
51+
```python
52+
# Only transporters and receptors
53+
df = oc.cosmos.get_pkn('human', categories=['transporters', 'receptors'])
54+
55+
# PPI layer only
56+
df = oc.cosmos.get_pkn('human', categories='ppi')
57+
```
58+
59+
## Filter by resource
60+
61+
```python
62+
# Only STITCH receptor edges
63+
df = oc.cosmos.get_pkn(
64+
'human',
65+
categories='receptors',
66+
resources='STITCH',
67+
)
68+
```
69+
70+
## Multi-organism support
71+
72+
The PKN is available for human, mouse, and rat. The `organism` parameter
73+
accepts NCBI taxonomy IDs, common names, Latin names, or short codes.
74+
75+
```python
76+
# Mouse PKN
77+
df_mouse = oc.cosmos.get_pkn('mouse')
78+
79+
# Rat PKN
80+
df_rat = oc.cosmos.get_pkn('rat')
81+
82+
# Using NCBI taxonomy ID
83+
df = oc.cosmos.get_pkn(10090)
84+
```
85+
86+
## AnnNet graph conversion
87+
88+
Convert the PKN to an [AnnNet](https://github.com/saezlab/annnet)
89+
graph object for network analysis:
90+
91+
```python
92+
# Directly as an AnnNet graph
93+
g = oc.cosmos.get_pkn('mouse', format='annnet')
94+
95+
# Or convert an existing DataFrame
96+
df = oc.cosmos.get_pkn('human')
97+
g = oc.cosmos.to_annnet(df)
98+
```
99+
100+
## Convenience functions
101+
102+
Explore what is available on the server:
103+
104+
```python
105+
# Available categories
106+
oc.cosmos.categories()
107+
# ['transporters', 'receptors', 'allosteric', 'enzyme_metabolite', 'ppi', 'grn']
108+
109+
# Supported organisms
110+
oc.cosmos.organisms()
111+
# [9606, 10090, 10116]
112+
113+
# Resources per category
114+
oc.cosmos.resources()
115+
# {'transporters': ['TCDB', 'SLC', 'GEM:Human-GEM', ...], ...}
116+
```
117+
118+
## Web service
119+
120+
The COSMOS PKN is served at
121+
[metabo.omnipathdb.org](https://metabo.omnipathdb.org). You can also
122+
query the REST API directly:
123+
124+
```
125+
GET https://metabo.omnipathdb.org/cosmos/pkn?organism=9606&categories=all
126+
GET https://metabo.omnipathdb.org/cosmos/pkn?organism=10090&categories=transporters,ppi
127+
GET https://metabo.omnipathdb.org/cosmos/categories
128+
GET https://metabo.omnipathdb.org/cosmos/organisms
129+
GET https://metabo.omnipathdb.org/cosmos/resources
130+
```

docs/vignettes/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ In-depth tutorials and worked examples.
66
and reference lists via the utils web service
77
- [**OmniPath Database**](database.md) — Querying the OmniPath molecular
88
biology database for interactions, annotations, and complexes
9+
- [**COSMOS PKN**](cosmos.md) — Multi-layer prior-knowledge network for
10+
multi-omics causal reasoning with cosmosR

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ nav:
3939
- Overview: vignettes/index.md
4040
- OmniPath Utils: vignettes/utils.md
4141
- OmniPath Database: vignettes/database.md
42+
- COSMOS PKN: vignettes/cosmos.md
4243
- API Reference: reference/index.md
4344
- About: about.md
4445

0 commit comments

Comments
 (0)