MODERN
MODERN (MOdule DEtection and Refinement in signed Networks) detects and
refines modules in networks containing positive and negative edges. The Python
package is named modernsn, and the command-line program is modern.
MODERN provides signed modularity and signed Constant Potts Model clustering, metanode analysis, negative-edge-guided reintegration, hard cannot-link refinement, multi-seed negative-edge leverage, and practical signed-network diagnostics.
Installation
pip install modernsn==0.1.2
The core dependencies are NumPy, pandas, python-igraph, leidenalg, NetworkX, Matplotlib, seaborn, and EEISP. Optional dependencies can be installed for specific functions:
pip install "modernsn[mat]==0.1.2" # MATLAB .mat input (SciPy)
pip install "modernsn[comparison]==0.1.2" # partition ARI comparison (scikit-learn)
pip install "modernsn[scrna]==0.1.2" # single-cell analysis (Scanpy)
Quick start
MODERN accepts separate positive and negative edge lists. The default TSV format has five columns and no header:
gene_id1 gene_id2 gene_name1 gene_name2 weight
ENSG00001 ENSG00002 GeneA GeneB 15.3
Run signed Leiden modularity as follows:
modern --pos positive.tsv --neg negative.tsv \
--thre-pos 10 --thre-neg 1 \
--method leiden-mod-alpha --alpha 0.7 --resolution 1 \
--seed 12345 --out-prefix results/run1
To inspect a network before selecting an analysis, run:
modern --pos positive.tsv --neg negative.tsv \
--method leiden-mod-alpha --check-signed-network \
--leverage-seeds 1 2 3 10 42 \
--out-prefix results/network_check
Documentation
See the MODERN documentation for:
- command-line input, methods, refinement modes, and outputs;
- the Python API and parallel parameter sweeps;
- interpretation guidance; and
- runnable tutorials.
The example notebooks are available in examples/.
Citation
Nakato R., Nagai LAE, List M. MODERN: community detection and exclusivity-aware module refinement in signed biological networks. In preparation.
Release files for modernsn 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| modernsn-0.1.3.tar.gz | 63.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| modernsn-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 126.6 kB
Release files / modernsn-0.1.3.tar.gz
| Download URL | modernsn-0.1.3.tar.gz |
|---|---|
| Size | 63.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c6b5113d4adf0090051007cab33dae6d787eff806f4ab3a49c848cc4f17c1eea
|
|
BLAKE2b-256 checksum How to use checksums |
e4e41751d155d80203e34e9fc9a5666b9b7d939f2245d8459b40516d0828bd3a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.13
|
Release files / modernsn-0.1.3-py3-none-any.whl
| Download URL | modernsn-0.1.3-py3-none-any.whl |
|---|---|
| Size | 63.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1ca589d8c39a1a1a11f4a987ede240be5cd879abf9f0ec01249ad875410dde15
|
|
BLAKE2b-256 checksum How to use checksums |
a30e9ee764c503b21c5112e0f65fd83135c80c777aa41fed94421264cf02e12c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.13
|