Code to analyse structural covariance brain networks using python.
Clone or download


Join the chat at Build Status License: MIT Binder

Welcome to the BrainNetworksInPython GitHub repository!

What are we doing?

BrainNetworksInPython is a toolkit to analyse structural covariance brain networks using python.

BrainNetworksInPython takes regional cortical thickness data obtained from structural MRI and generates a matrix of correlations between regions over a cohort of subjects. The correlation matrix is used alongside the networkx package to generate a variety of networks and network measures.

The BrainNetworksInPython codebase was first developed by Dr Kirstie Whitaker for the Neuroscience in Psychiatry Network publication "Adolescence is associated with genomically patterned consolidation of the hubs of the human brain connectome" published in PNAS in 2016 (Whitaker*, Vertes* et al, 2016). This project is to take the existing codebase (accessible at and turn it into a documented, tested python package that is easy to use and re-use.

Check out our tutorial to get started.

Want to get involved?

BrainNetworksInPython is openly developed and welcomes contributers.

If you're thinking about contributing (💚 you are loved), our roadmap and our contributing guidelines are a good place to start. You don't need advanced skills or knowledge to help out. Newbies to Python, neuroscience, git and GitHub are all welcome.

If you have questions or want to get in touch you can join our gitter lobby, tweet @Whitaker_Lab or email Isla at islastaden at gmail dot com.

Other Stuff

To view our (successful) Mozilla Mini-Grant application, head here.

In October 2017 BrainNetworksInPython ran a MozFest session

We are still choosing a name for our python package, vote here