Skip to main content

Overview

https://zenodo.org/badge/370716682.svg Documentation Status https://img.shields.io/pypi/l/ansicolortags.svg

Network Control Theory (NCT) is a branch of physical and engineering sciences that treats a network as a dynamical system. Generally, the system is controlled through control signals that originate at a control node (or control nodes) and move through the network. In the brain, NCT models each region’s activity as a time-dependent internal state that is predicted from a combination of three factors: (i) its previous state, (ii) whole-brain structural connectivity, and (iii) external inputs. NCT enables asking a broad range of questions of a networked system that are highly relevant to network neuroscientists, such as: which regions are positioned such that they can efficiently distribute activity throughout the brain to drive changes in brain states? Do different brain regions control system dynamics in different ways? Given a set of control nodes, how can the system be driven to a specific target state, or switch between a pair of states, by means of internal or external control input?

nctpy is a Python toolbox that provides researchers with a set of tools to conduct some of the common NCT analyses reported in the literature. Below, we list select publications that serve as a primer for these tools and their use cases:

1. Parkes, L., Kim, J. Z., et al. A network control theory pipeline for studying the dynamics of the structural connectome. In press at Nature Protocols (2024). https://www.biorxiv.org/content/10.1101/2023.08.23.554519v1

2. Karrer, T. M., Kim, J. Z., Stiso, J. et al. A practical guide to methodological considerations in the controllability of structural brain networks. Journal of Neural Engineering (2020). https://doi.org/10.1088/1741-2552/ab6e8b

3. Kim, J. Z., & Bassett, D. S. Linear dynamics & control of brain networks. arXiv (2019). https://arxiv.org/abs/1902.03309

Requirements

Currently, nctpy works with Python 3.9 and requires the following core dependencies:

  • numpy (tested on 1.23.4)

  • scipy (tested on 1.9.3)

  • tqdm (tested on 4.64.1)

The utils module also requires:

  • statsmodels (tested on 0.13.2)

The plotting module also requires:

  • seaborn (tested on 0.12.0)

  • nibabel (tested on 4.0.2)

  • nilearn (tested on 0.9.2)

There are some additional (optional) dependencies you can install (note, these are only used for i/o and plotting in the Python notebooks located in the scripts directory):

  • pandas (tested on 1.5.1)

  • matplotlib (tested on 3.5.3)

  • jupyterlab (tested on 3.4.4)

  • sklearn (tested on 0.0.post1)

If you want to install the environment that was used to run the analyses presented in the manuscript, use the environment.yml file.

Basic installation

Assuming you have Python 3.9 installed, you can install nctpy by opening a terminal and running the following:

pip install nctpy

Questions

If you have any questions, please contact Linden Parkes and Jason Kim: info@parkeslab.com.

Release files for nctpy 1.0.2

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

Source distribution (sdist)

Source distribution for nctpy 1.0.2
File Size Uploaded
nctpy-1.0.2.tar.gz 22.9 kB Details

Built distribution (wheel)

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

Total release size: 46.4 kB

Release files / nctpy-1.0.2.tar.gz

Download URL nctpy-1.0.2.tar.gz
Size 22.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b1231f78ffc1c7466a851254dd95961d5637f078bc78bb6a9311fd030db8a5f7
BLAKE2b-256 checksum
How to use checksums
7e0a1c69b86d3bc7a161f49dba9891c84e22d0eec46a12f71282a7ce14601b44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.13

Release files / nctpy-1.0.2-py3-none-any.whl

Download URL nctpy-1.0.2-py3-none-any.whl
Size 23.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1bf51a979e98748cdc9946a55fa0abb2f93658db2340223ebd9a7fc5bf962eb2
BLAKE2b-256 checksum
How to use checksums
e9156c85986d088759d5241d2cf24744c40dfdfe5d77ff844776c4cc99e90607
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.13

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

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