Abstract
Neuronal subnetworks, defined by co-activation patterns, are fundamental units of brain computation. We provide a step-by-step workflow to detect subnetworks from in vivo calcium imaging data using multiple clustering algorithms in MATLAB. We apply statistical modeling in R to evaluate group-level differences, followed by model selection and bootstrapping for robust estimation. Finally, we use an R Markdown template to generate a structured statistical report. For complete details on the use and execution of this protocol, please refer to Huang et al.(1).