Skip to main content

Tools to quantify the relationship between connectivity and task activity through network simulations and machine learning prediction. Helps determine how connections contribute to specific brain functions.

Project description

ActflowToolbox

The Brain Activity Flow ("Actflow") Toolbox

Version 0.2.3 (beta version)

Visit https://colelab.github.io/ActflowToolbox/ for more information

Cite as:

  1. Cole MW, Ito T, Bassett DS, Schultz DH (2016). "Activity flow over resting-state networks shapes cognitive task activations". Nature Neuroscience. 19:1718–1726.http://dx.doi.org/10.1038/nn.4406
  2. https://github.com/ColeLab/ActflowToolbox/ and
  3. The article that describes the specific toolbox functions being used in most detail

How to install

git clone --recurse-submodules https://github.com/ColeLab/ActflowToolbox.git

Email list/forum

We strongly encourage you to join the ColeNeuroLab Users Group (https://groups.google.com/forum/#!forum/coleneurolab_users), so you can be informed about major updates in this repository and others hosted by the Cole Neurocognition Lab.

Software development guidelines

  • Primary language: Python 3
  • Secondary language (for select functions, minimally maintained/updated): MATLAB
  • Versioning guidelines: Semantic Versioning 2.0.0 (https://semver.org/); used loosely prior to v1.0.0, strictly after
  • Using GitHub for version control
  • Style specifications:
    • PEP8 style as general guidelines (loosely applied for now): https://www.python.org/dev/peps/pep-0008/
    • Soft tabs (4 spaces) for indentations [ideally set "soft tabs" setting in editor, so pressing tab key produces 4 spaces]
    • Use intuitive variable and function names
    • Add detailed comments to explain what code does (especially when not obvious)

Contents

  • Directory: actflowcomp - Calculating activity flow mapping
    • actflowcalc.py - Main function for calculating activity flow mapping predictions
    • actflowtest.py - A convenience function for calculating activity-flow-based predictions and testing prediction accuracies (across multiple subjects)
    • noiseceilingcalc.py - A convenience function for calculating the theoretical limit on activity-flow-based prediction accuracies (based on noise in the data being used)
  • Directory: connectivity_estimation - Connectivity estimation methods
    • calcactivity_parcelwise_noncircular_surface.py: High-level function for calculating parcelwise actflow with parcels that are touching (e.g., the Glasser 2016 parcellation), focusing on task activations. This can create circularity in the actflow predictions due to spatial autocorrelation. This function excludes vertices within X mm (10 mm by default) of each to-be-predicted parcel.
    • calcconn_parcelwise_noncircular_surface.py: High-level function for calculating parcelwise actflow with parcels that are touching (e.g., the Glasser 2016 parcellation), focusing on connectivity estimation. This can create circularity in the actflow predictions due to spatial autocorrelation. This function excludes vertices within X mm (10 mm by default) of each to-be-predicted parcel.
    • corrcoefconn.py: Calculation of Pearson correlation functional connectivity
    • multregconn.py: Calculation of multiple-regression functional connectivity
    • partial_corrconn.py: Calculation of partial-correlation functional connectivity
    • pc_multregconn.py: Calculation of regularized multiple-regression functional connectivity using principle components regression (PCR). Useful when there are fewer time points than nodes, for instance.
  • Directory: dependencies - Other packages Actflow Toolbox depends on
  • Directory: examples - Example analyses that use the Actflow Toolbox (Jupyter notebook)
  • Directory: images - Example images generated by the Actflow Toolbox
  • Directory: matlab_code - Limited functions for activity flow mapping in MATLAB
    • PCmultregressionconnectivity.m - Compute multiple regression-based functional connectivity; PC allows for more regions/voxels than time points.
    • actflowmapping.m - MATLAB version of actflowcalc.py; Main function for computing activity flow mapping predictions
    • multregressionconnectivity.m - Compute multiple regrression-based functional connectivity
  • Directory: model_compare - Comparing prediction accuracies across models
    • model_compare_predicted_to_actual.py - Calculation of predictive model performance
    • model_compare.py - Reporting of model prediction performance, and comparison of prediction performance across models
  • Directory: network_definitions - Data supporting parcel/region sets and network definitions
    • dilateParcels.py - Dilate individual parcels (cortex and subcortex) and produce masks to exclude vertices within 10 mm; requires Connectome workbench
  • Directory: simulations - Simulations used for validating methods
  • Directory: tools - Miscellaneous tools
    • addNetColors.py - Generates a heatmap figure with The Cole-Anticevic Brain-wide Network Partition (CAB-NP) colors along axes
    • addNetColors_Seaborn.py - Generates a Seaborn heatmap figure with The Cole-Anticevic Brain-wide Network Partition (CAB-NP) colors along axes
    • map_to_surface.py - Maps 2D matrix data onto a dscalar surface file (64k vertices); uses Glasser et al. 2016 ROI parcellation
    • max_r.py - Permutation testing to control for FWE (as in Nichols & Holmes, 2002 max-t); individual difference correlations (r)
    • max_t.py - Permutation testing to control for FWE (as in Nichols & Holmes, 2002); t-test variants (t)
    • regression.py - Compute multiple linear regression (with L2 regularization option)

Analytics

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Actflow-0.2.3.tar.gz (26.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

Actflow-0.2.3.0-py3-none-any.whl (1.8 MB view details)

Uploaded Python 3

Actflow-0.2.3-py3-none-any.whl (41.9 kB view details)

Uploaded Python 3

File details

Details for the file Actflow-0.2.3.tar.gz.

File metadata

  • Download URL: Actflow-0.2.3.tar.gz
  • Upload date:
  • Size: 26.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for Actflow-0.2.3.tar.gz
Algorithm Hash digest
SHA256 400b73791a45106ccf2d794ed40a1c24b312c8d429dc3b9c57a806574eb9fe75
MD5 9236466201c96b072604f1623286af88
BLAKE2b-256 8cfafdbba868cd588a7e0a66052c125c11850a992a895b81c38a8ce608618331

See more details on using hashes here.

File details

Details for the file Actflow-0.2.3.0-py3-none-any.whl.

File metadata

  • Download URL: Actflow-0.2.3.0-py3-none-any.whl
  • Upload date:
  • Size: 1.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for Actflow-0.2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9c6df3bf09511139504ab150dc54e6b86909124106cfcfa6f703fec07995e85d
MD5 7e5e11ddd5a71f7d0a23bbd51309cbee
BLAKE2b-256 4a3ef6b283f66c87184208f1faf41afa471acadb7d2a6214b12f05100d47c574

See more details on using hashes here.

File details

Details for the file Actflow-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: Actflow-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 41.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for Actflow-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 31d0bc43fe2ba009a578b3866d413b1e01b3f84fa5eeb0ddfcb94fb631daf9e6
MD5 47a5481da51c9d04e9b9dbc7e2082b5e
BLAKE2b-256 03cc0a47f047d6211cc0154503b0f193e5842185df81420901e055202d2ac4c1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page