Metadata-Version: 2.4
Name: risk-network
Version: 0.1.2
Summary: A Python package for scalable network analysis and high-quality visualization.
Author-email: Ira Horecka <ira89@icloud.com>
License: GPL-3.0-or-later
Project-URL: Homepage, https://github.com/riskportal/risk
Project-URL: Issues, https://github.com/riskportal/risk/issues
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Scientific/Engineering :: Visualization
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: ipywidgets
Requires-Dist: leidenalg
Requires-Dist: markov_clustering
Requires-Dist: matplotlib
Requires-Dist: networkx
Requires-Dist: nltk
Requires-Dist: numpy
Requires-Dist: openpyxl
Requires-Dist: pandas
Requires-Dist: python-igraph
Requires-Dist: python-louvain
Requires-Dist: scikit-learn
Requires-Dist: scipy
Requires-Dist: statsmodels
Requires-Dist: threadpoolctl
Requires-Dist: tqdm
Dynamic: license-file

# RISK

![Python](https://img.shields.io/badge/python-3.8%2B-yellow)
[![pypiv](https://img.shields.io/pypi/v/risk-network.svg)](https://pypi.python.org/pypi/risk-network)
![License](https://img.shields.io/badge/license-GPLv3-purple)
![Tests](https://github.com/riskportal/risk/actions/workflows/ci.yml/badge.svg)

**Regional Inference of Significant Kinships** (**RISK**) is a next-generation tool for biological network annotation and visualization. It integrates community detection algorithms, rigorous overrepresentation analysis, and a modular framework for diverse network types. RISK identifies biologically coherent relationships within networks and generates publication-ready visualizations, making it a useful tool for biological and interdisciplinary network analysis.

For a full description of RISK and its applications, see:
<br>
Horecka, I., and Röst, H. (2026)
<br>
_RISK: a next-generation tool for biological network annotation and visualization_
<br>
_Bioinformatics_. https://doi.org/10.1093/bioinformatics/btaf669

## Documentation and Tutorial

- **Full Documentation**: [riskportal.github.io/risk-docs](https://riskportal.github.io/risk-docs)
- **Try in Browser (Binder)**: [![Launch in Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/riskportal/risk-docs/HEAD?filepath=notebooks/quickstart.ipynb)
- **Documentation Repository**: [github.com/riskportal/risk-docs](https://github.com/riskportal/risk-docs)

## Installation

RISK is compatible with Python 3.8 or later and runs on all major operating systems. To install the latest version of RISK, run:

```bash
pip install risk-network --upgrade
```

## Key Features of RISK

- **Broad Data Compatibility**: Accepts multiple network formats (Cytoscape, Cytoscape JSON, GPickle, NetworkX) and user-provided annotations formatted as term–to–gene membership tables (JSON, CSV, TSV, Excel, Python dictionaries).
- **Flexible Clustering**: Offers Louvain, Leiden, Markov Clustering, Greedy Modularity, Label Propagation, Spinglass, and Walktrap, with user-defined resolution parameters to detect both coarse and fine-grained modules.
- **Statistical Testing**: Provides permutation, hypergeometric, chi-squared, and binomial tests, balancing statistical rigor with speed.
- **High-Resolution Visualization**: Generates publication-ready figures with customizable node/edge properties, contour overlays, and export to SVG, PNG, or PDF.

## Example Usage

We applied RISK to a _Saccharomyces cerevisiae_ protein–protein interaction (PPI) network (Michaelis _et al_., 2023; 3,839 proteins, 30,955 interactions). RISK identified compact, functional modules overrepresented in Gene Ontology Biological Process (GO BP) terms (Ashburner _et al_., 2000), revealing biological organization including ribosomal assembly, mitochondrial organization, and RNA polymerase activity.

![Figure 1](assets/figure_1.jpg)
**RISK workflow overview and analysis of the yeast PPI network**. Clusters are color-coded by enriched GO Biological Process terms (p < 0.01).

## Citation

### Primary citation

Horecka, I., and Röst, H. (2026)
<br>
_RISK: a next-generation tool for biological network annotation and visualization_
<br>
_Bioinformatics_. https://doi.org/10.1093/bioinformatics/btaf669

### Software archive

RISK software for the published manuscript.
<br>
Zenodo. https://doi.org/10.5281/zenodo.17257418

## Contributing

We welcome contributions from the community:

- [Issues Tracker](https://github.com/riskportal/risk/issues)
- [Source Code](https://github.com/riskportal/risk/tree/main/src/risk)

## Support

If you encounter issues or have suggestions for new features, please use the [Issues Tracker](https://github.com/riskportal/risk/issues) on GitHub.

## License

RISK is open source under the [GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html).
