Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HuPPI Network Analysis

DOI

Point-pattern and network generation, network measurements, and figure scripts for the HuPPI network analysis project. The shared utils/ package is included in this repository; it is not a separately downloaded Python package.

Setup

Use Python 3.10 and run these commands from the repository root:

python3.10 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt

Calculate mixing time for a network

utils/network/measures.py contains the measurement routines. The current Figure 4 calculation uses Network_Measures.compute_mixing_time_weighted_worst_case_exact. It measures the standard, non-lazy weighted walk from the worst starting node.

Run this example from the repository root after installation:

import numpy as np
from utils.network.measures import Network_Measures

# Each row contains two node IDs and a positive edge length.
edges = np.array([
    [0, 1, 1.0],
    [1, 2, 1.0],
    [0, 2, 1.0],
])

measures = Network_Measures()
mixing_time = measures.compute_mixing_time_weighted_worst_case_exact(edges, 3)
print(mixing_time)  # 10 steps at the default TV tolerance of 0.001.

List each undirected edge once and label the nodes consecutively from zero. The third column is a length: the routine uses its reciprocal as the edge weight. Unit lengths give an unweighted walk. The graph must be connected; the routine rejects bipartite graphs because their standard walk is periodic. The older compute_mixing_time_sparse_* methods use different starting or stopping rules and are not the current Figure 4 method.

utils/network/generators.py contains the point-pattern and network generators. The measurement class also provides total effective resistance and Ollivier–Ricci curvature.

Figure scripts

List the available workflows or generate and plot one figure:

python run_figure.py --list
python run_figure.py 3 both

Generated datasets and analysis plots are not included. Plotting requires the corresponding generated data, and full ensembles can take substantial time. generate_rsa_data.py produces the RSA comparison data for Figures 2, 4, and 7. Figure 5 has a separate RSA spectrum calculation:

python fig05_network_hyperuniformity/generate_data.py --conditions rsa --output-dir fig05_network_hyperuniformity/data/h_rsa_v1

The existing regenerate_all_figures.sh orchestrates the figure workflows; prepare the separate Figure 5 RSA spectra above before running that script. recompute_orc_figures.py recalculates ORC-dependent outputs from existing graph files. pickle_compat.py supports loading NumPy pickle archives.

Existing checks

python -m unittest utils.network.test_measures -v
python -m unittest discover -s tests -v

Citation

For the archived version 1.0.0, please cite:

Raj, J. V., Sun, X., Maher, C. E., Newhall, K. A., & Porter, M. A. (2026). HuPPI Network Analysis (v1.0.0) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.23274708.

Machine-readable citation metadata is available in CITATION.cff.

License

This software is available under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages