Skip to main content

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

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for modernsn 0.1.4
File Size Uploaded
modernsn-0.1.4.tar.gz 63.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for modernsn 0.1.4
File Interpreter ABI Platform
modernsn-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 126.1 kB

Release files / modernsn-0.1.4.tar.gz

Download URL modernsn-0.1.4.tar.gz
Size 63.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ddf97d70076a962f201f31dc62cdb6386362ae18ea2d1bab4abfc78f5bd28b41
BLAKE2b-256 checksum
How to use checksums
8d535eab579dd7dfff4e4a587a4cb87c3dee7892b555cb240664e2a0469cfd95
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.4-py3-none-any.whl

Download URL modernsn-0.1.4-py3-none-any.whl
Size 62.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c969318af6f8855ca6fbe80f3b78710cc8f026f5a77e1f4f849fa2edb77a8690
BLAKE2b-256 checksum
How to use checksums
fb8656a04f08eafe26496c8f8114b5a727aba0883f2fd5312ef2c43f4d309feb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.13

Release history Release notifications | RSS feed

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page