- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| N 50 -k 2.4 -maxk 6 -t1 2 | ||
| N 50 -k 2.4 -maxk 6 -t1 3 | ||
| N 50 -k 3.4 -maxk 6 -t1 2 | ||
| N 50 -k 3.4 -maxk 6 -t1 3 | ||
| N 100 -k 2.4 -maxk 6 -t1 2 | ||
| N 100 -k 2.4 -maxk 6 -t1 3 | ||
| N 100 -k 3.4 -maxk 6 -t1 2 | ||
| N 100 -k 3.4 -maxk 6 -t1 3 | ||
| N 150 -k 2.4 -maxk 6 -t1 2 | ||
| N 150 -k 2.4 -maxk 6 -t1 3 | ||
| N 150 -k 3.4 -maxk 6 -t1 2 | ||
| N 150 -k 3.4 -maxk 6 -t1 3 | ||
| .DS_Store | ||
| BC_control.py | ||
| BooleanDOI_processing.py | ||
| classification_operations.py | ||
| control_TOWARD_CC_one_fvs.py | ||
| control_TOWARD_CC_top_10_percent.py | ||
| dynamics_operations.py | ||
| FVS.py | ||
| FVS_localsearch_10_python.py | ||
| one_fvs_from_each_module_control.py | ||
| README.md | ||
| top_10_percent_control.py | ||
Local Network Control
This repository contains Python implementations for analyzing and controlling Boolean networks. The code focuses on identifying influential nodes and computing control sets using approaches such as feedback vertex set (FVS) analysis, betweenness centrality and weighted cycle score. The scripts can be used to process randomly generated networks as well as a collection of curated biological models.
Features
- Feedback Vertex Set algorithms –
FVS.pyandFVS_localsearch_10_python.pyimplement a simulated annealing search to approximate minimum FVS sets in directed graphs. - Boolean network utilities –
BooleanDOI_processing.pyprovides functions for generating Boolean rules, expanded networks and other pre–processing steps. - Community and motif analysis –
classification_operations.pycontains helpers for clustering minimal trapping spaces and selecting influential nodes inside communities. - Control strategies
BC_control.pyandtop_10_percent_control.pyevaluate control nodes chosen by betweenness centrality.control_TOWARD_CC_one_fvs.pyandcontrol_TOWARD_CC_top_10_percent.pyanalyze biological models using FVS members or top‑ranked nodes in each community.one_fvs_from_each_module_control.pyapplies a single FVS node per community approach across generated networks.
- Random model generation –
dynamics_operations.pyincludes routines to construct networks and create nested canalyzing Boolean rules.
Requirements
The scripts require Python 3 and the following packages (tested with typical recent versions):
networkxnumpypystablemotifspyboolnetscipyscikit-learnigraphandleidenalgmatplotlib,seabornanditeration_utilities
Install the dependencies with pip:
pip install networkx numpy pystablemotifs pyboolnet scipy scikit-learn igraph leidenalg matplotlib seaborn iteration_utilities
Usage
Many scripts expect pre‑generated networks and Boolean models stored in directories such as corrected_models/ or parameterized folders (N <n> -k <k> -maxk <m> -t1 <t>/). Typical workflow:
- Generate or load a network in GraphML format.
- Use
FVS.FVS(G)to compute a feedback vertex set. - Cluster minimal trapping spaces with functions from
classification_operations.py. - Select control nodes and evaluate coverage of phenotypes using one of the control scripts.
Example – computing an approximate FVS for a graph:
import networkx as nx
import FVS
G = nx.gnm_random_graph(10, 20, directed=True)
control_nodes = FVS.FVS(G)
print(control_nodes)
Refer to the individual scripts for the full pipeline of experiments.
Repository Contents
BC_control.py– Processes generated networks, selecting top nodes by betweenness centrality and measuring coverage.BooleanDOI_processing.py– Helper functions to construct Boolean rules and expanded networks.FVS.py/FVS_localsearch_10_python.py– Implementation of the simulated annealing algorithm for FVS calculation.classification_operations.py– Clustering and community analysis utilities used throughout the workflows.control_TOWARD_CC_one_fvs.py– Applies a single FVS member per community strategy on curated biological models.control_TOWARD_CC_top_10_percent.py– Uses top ranked nodes per community to drive the model toward desired cell cycles.dynamics_operations.py– Functions for generating random Boolean networks and rule sets.one_fvs_from_each_module_control.py– Runs FVS‑based control for each module on generated networks.top_10_percent_control.py– Compares Leiden vs. label propagation community detection with control from the top 10% of nodes.
The repository does not currently include example data or a dedicated requirements.txt. Depending on the experiment you wish to reproduce, additional files such as Boolean rule sets or network graphs must be placed in the expected folder structure.
License
No explicit license file is provided. Please consult the repository owner before redistributing or using the code for other projects.