neuroimaging-decoding

Runs ROI MVPA, ROI-wise GLM, and voxel-wise SearchLight decoding on neuroimaging data.

89|5|Updated Mar 25, 2026
One-click install
npx skills add https://github.com/CUHK-AIM-Group/NeuroDiscovery --skill neuroimaging-decoding-cuhk-aim-group
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: neuroimaging-decoding
Source: https://github.com/CUHK-AIM-Group/NeuroDiscovery/tree/main/skills/neuroimaging-decoding
Command: npx skills add https://github.com/CUHK-AIM-Group/NeuroDiscovery --skill neuroimaging-decoding-cuhk-aim-group

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, pandas, scipy, scikit-learn, statsmodels, nilearn, nibabel, and includes scripts (resource) components.

What problem does it solve? Researchers analyzing fMRI data often need to run multivariate pattern analysis, ROI-level statistical tests, or voxel-wise decoding maps, but wiring together scikit-learn, statsmodels, and Nilearn pipelines with correct cross-validation and multiple-comparison correction is error-prone. This Skill provides a unified CLI that runs all three decoding modes with consistent inputs, outputs, and reproducible run manifests. ## Core Features & Use Cases - ROI MVPA: Trains cross-validated classifiers or regressors on ROI/parcel feature CSVs, with scaling and feature selection kept inside cross-validation folds. - ROI-wise GLM: Fits mass-univariate general linear models across ROIs using an explicit design matrix, reporting effect, standard error, P value, and Benjamini-Hochberg FDR-corrected Q value per ROI. - Voxel-wise SearchLight: Runs Nilearn SearchLight decoding over aligned NIfTI images within a group mask, producing a voxel-wise score map (searchlight_scores.nii.gz). - Use Case: Given a CSV of ROI features and subject diagnoses, run the mvpa mode to get cross-validated SVM classification metrics, then run roi-glm to identify which ROIs show significant group effects after FDR correction. ## Quick Start Ask the assistant to run ROI MVPA decoding on your roi_features.csv with subject_id as the subject column and diagnosis as the target using 5-fold cross-validation.

Frequently Asked Questions about neuroimaging-decoding

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run MVPA decoding on ROI fMRI features?

Run train_reference.py in mvpa mode with a features CSV, target column, subject column, task type, model, and fold count. Scaling and feature selection stay inside cross-validation, and outputs include prediction, fold, metric, and checkpoint artifacts.

How to run a searchlight analysis with Nilearn?

Create a text file listing one aligned NIfTI image per line matching the label CSV row order, then run the searchlight mode with a group mask and fold count. The output is a voxel-wise searchlight_scores.nii.gz map plus metrics.json.

Does the ROI GLM correct for multiple comparisons?

Yes, the ROI-wise GLM applies Benjamini-Hochberg FDR correction across all ROIs. The output roi_glm_results.csv includes effect, standard error, P value, and FDR-corrected Q value for every ROI.

What input format does voxel-wise searchlight decoding require?

All NIfTI images and the mask must share the same space, affine, and voxel grid. The images list row order must match the labels CSV, otherwise decoding results will be invalid.

When should I use nilearn-tool instead of this decoding workflow?

Use nilearn-tool for full first-level and second-level task-fMRI GLM design and model fitting. This skill handles the downstream ROI MVPA, ROI GLM, or SearchLight analysis after those design matrices or feature tables exist.