NeuroCAPs: Neuroimaging Co-Activation Patterns#
NeuroCAPs (Neuroimaging Co-Activation Patterns) is a Python package for performing Co-Activation Patterns (CAPs) analyses on resting-state or task-based fMRI data. CAPs identifies recurring brain states by applying k-means clustering on BOLD timeseries data [1].
Citing#
If you would like to cite NeuroCAPs, you can use:
Smith, D., (2025). NeuroCAPs: A Python Package for Performing Co-Activation Patterns Analyses on Resting-State and Task-Based fMRI Data. Journal of Open Source Software, 10(112), 8196, https://doi.org/10.21105/joss.08196
Features#
NeuroCAPs is built around two main classes (TimeseriesExtractor and CAP) and includes several
features to perform the complete CAPs workflow from postprocessing to visualizations.
Notable features includes:
Component |
Key Features |
Timeseries Extraction ( |
Important Optimized for BIDS-compliant data preprocessed with fMRIPrep. Refer to NeuroCAPs’ BIDS Structure and Entities Documentation for more information. |
CAPs analysis ( |
|
Standalone Functions |
|
Full details for every function and parameter are available in the API Documentation.
Refer to the demos to the demos or tutorials for an extensive demonstration of the features included in this package.
Dependencies#
NeuroCAPs relies on several packages:
dependencies = [
"numpy>=1.26.3",
"pandas>=2.1.0",
"joblib>=1.3.0",
"matplotlib>=3.6.0",
"seaborn>=0.11.0",
"kneed>=0.8.5",
"nibabel>=5.0.0",
"nilearn>=0.10.4",
"scikit-learn>=1.4.0",
"scipy>=1.10.0",
"brainspace>=0.1.16",
"surfplot>=0.2.0",
"neuromaps>=0.0.5",
"pybids>=0.16.5; platform_system != 'Windows'",
"plotly>=6.5.0",
"nbformat>=5.10.0",
"kaleido>=1.2.0",
"setuptools>=77.0.1, <82.0.0",
"typing_extensions>=4.10.0",
"vtk>=9.2.0",
"tqdm>=4.65.0"
]
Acknowledgements#
Some foundational concepts in NeuroCAPs take inspiration from features or design patterns implemented in other neuroimaging Python packages, specifically: