qbiocode.apps.quvine.reproducibility.graph_generator module#
Synthetic Graph Generator for QuVINE
Pre-generates and saves synthetic graphs to ensure all methods use identical instances.
Summary#
Classes:
Centralized PPI preprocessing pipeline. |
|
Generates and saves synthetic graphs for reproducible benchmarking. |
Reference#
- class SyntheticGraphGenerator(output_dir, seed_manager, registry)[source]#
Bases:
objectGenerates and saves synthetic graphs for reproducible benchmarking.
All synthetic graphs are pre-generated once and saved to disk. Methods then load these pre-generated graphs instead of generating their own.
- SYNTHETIC_FAMILIES = ['configuration_model', 'core_periphery', 'degree_corrected_sbm', 'erdos_renyi', 'grid_torus', 'heterophilic_sbm', 'modular_medium', 'modular_strong', 'powerlaw_cluster', 'random_geometric', 'random_regular', 'scale_free', 'stochastic_block_model', 'watts_strogatz_high_p', 'watts_strogatz_low_p']#
- __init__(output_dir, seed_manager, registry)[source]#
Initialize graph generator.
- Parameters:
output_dir (Path) – Root directory for saving generated graphs
seed_manager (SeedManager) – Seed manager for reproducible generation
registry (DatasetRegistry) – Dataset registry to register generated graphs
- generate_all(n_nodes_list=[500, 2000, 5000], n_replicates=30)[source]#
Generate all synthetic graphs for all families, sizes, and replicates.
- Parameters:
n_nodes_list (List[int]) – List of node counts to generate
n_replicates (int) – Number of replicates per family-size combination
- Return type:
None
- generate_single(family, n_nodes, repetition_id)[source]#
Generate a single synthetic graph instance.
- Parameters:
family (str) – Graph family name
n_nodes (int) – Number of nodes
repetition_id (int) – Repetition index
- Return type:
Tuple[Graph,Path]- Returns:
G (nx.Graph) – Generated graph
graph_path (Path) – Path where graph was saved
- class PPIGraphGenerator(output_dir, seed_manager, registry, processed_data_dir, registry_output_path=None)[source]#
Bases:
objectCentralized PPI preprocessing pipeline.
Generates fixed disease-specific benchmark graphs per: - PPI source - disease - requested size - repetition
Outputs: - graph artifact - metadata artifact - disease node artifact - registry records