GSoC Project Idea 14: Producing publication-ready brain network analysis results and visualisations from the command line

Mentor: Kirstie Whitaker

Context and motivation: The brain made up of many regions that communicate millions of messages every second. Traditional neuroimaging analyses have considered each region separately and therefore failed to capture many aspects of brain structure and function. Graph theory allows us to analyse human brain images as a network [1].

scona is a python package to run structural covariance network analyses on cortical thickness measures [2]. The pipeline 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 [3] to generate a variety of networks and network measures. The code is modular and extendable. It is openly developed with a strong emphasis on providing clear documentation, maintaining high test coverage, and encouraging new contributors to take part in building the tool [4].

Project description and aims: The goal of this GSoC project is to 1) develop a command line tool that will allow users to run their pipeline from beginning to end without having to import the modules into a python environment, and 2) improve the results visualisation and output reports at the end of the analysis. The final visualisations should be ready for publication in a scientific journal, although there is a lot of scope for building fun and interactive outputs too. A related “stretch” goal is to build up example analyses using openly available datasets.

The GSoC student will develop their skills working with Python, employing modern software testing suites to improve reproducibility and robustness of code, and experimenting with different ways of visualising brain networks. They will have explicit mentorship in ways of open and collaborative working using git and GitHub.

Skills needed/desired: This project is aimed towards students seeking to develop their coding skills and to gain familiarity with collaborative development. Interested students should be comfortable with Python and GitHub. They should be motivated to the application of network analysis methods to brain imaging data, and to communicate these findings for an academic audience and beyond.

Over the course of the project the student will have to develop skills writing python for distribution, such as linting, testing, continuous integration [5], sphinx style documentation [6], and packaging [7]. While experience with matplotlib [8] and the nilearn plotting tools [9] will be useful, it is most important that the students use their creativity to best communicate scientific findings.

A commitment to open and collaborative working is essential. All contributors to scona are expected to comply with the scona code of conduct at all times [10].

Key words: Python; visualisation; network analysis; neuroimaging; reproducible research

Relevant external links:

  1. Bullmore & Sporns, 2009,

Copying and pasting a question that we got in our gitter chat room ( that might be useful for potential applicants.

The doc mentions that the graphs should be ‘ready for publication’ in a journal. Can you please elaborate on that? What are the features of such a graph?

@Islast: I think when Kirstie and I wrote that we had two things in mind. The first is just that a “ready for publication” figure should look good and communicate clearly. The second is that basically the point of scona producing figures that are “ready for publication” is to reproducibly automate figure creation. i.e if a figure in your publication is the direct output of accessible code (aka scona) it will be much easier for somebody to reproduce.

That second point might be a little more confusing if you aren’t familiar with ideas of reproducibility in science, but I promise if you come and work with Kirstie you will become familiar with ideas of reproducibility in science.

sorry that sounds a little ominous. It’s a good thing I promise! :sparkles:

1 Like

Hi, I find this project and it’s target area pretty exciting and wish to contribute to this as part of GSoC 2019. As such, I have a few questions related to the same:

  1. Usage of scona and networkx: I went through the resources posted on this forum. I would like to have a list of projects that have implemented their methods using the above libraries, to get more idea and experience.
  2. Contributions to the project: How do I proceed with contributing/resarching for the project if my end-goal is to contribute to this project as part of GSoC?

I have experience with at least half of the project requirements, and I feel that I would be a great fit if once I am comfortable with the remaining requirements viz scona, networkx, travis, and would like to have your guidance regarding the same.

Hi @KirstieJane . I’m interested to work on this topic as part of the GSoC 2019. I’ve worked on nilearn, matplotlib and networkx. Currently, I’m working on structural connectivity analysis of normal and diseased brains using complex networks and machine learning. In order to start with this topic, I was thinking of exploring scona. Could you please let me know whether this would be a good way to get started on this topic? If this is not a good idea then could you please suggest some tasks for the same?

Hi @Ashraf_Haroon_Rashid! I’m so sorry that I missed this message. Thank you for getting in touch! It sounds like your background is a great fit for the project.

If you’re still interested, please do explore scona and feel free to ask any questions there or here :smiley_cat:

I’m at a conference Thurs & Fri of this week, but I’ll be back online over the weekend so I can reply then :sunflower:

Hi @nsurampu

I’m so sorry I missed your message :sob:

Thank you for your interest in the project!

To answer your questions: scona is brand new and hasn’t been used in any publications - yet! Networkx is a very well used network tool and so there will be many publications in brain imaging that use it - probably any network analysis that is programmed in python rather than (for example) R or matlab will use networkx. The methods though are best described in the Bullmore & Sporns paper linked above.

If you’d like the contribute to the project then please come along to the github repository and see if you can install and run the software. As its really new, there are lots of places for improvement!!

Sorry again for my so slow reply. I’ve been travelling and rather lost track of different messages.

Hi, @KirstieJane,

Thanks a lot for the reply. Loved hearing from you, as this project is REALLY interesting. I’ll check out scona and get back you on how to proceed further.

1 Like

Hi, @KirstieJane,

I gave scona a spin, and have a few clarifications regarding the same:

  1. The project description details that we need to improve the visualizations. Does this mean that scona has built-in functions for doing so? This is because I couldn’t find them.
  2. For visualizations, I am thinking of going for something like what nilearn does with its implementation of connectome. Is this the right direction to take?
  3. I also came across an issue on the scona page:
    Is our primary objective similar to this?
  4. Finally, for visualizations, I think we can even go for the connectome and glass brain approaches taken by nilearn, and later project them onto a 3-d plane. This will help users get a better idea of the model. For this, we can use matplotlib.

Would love your inputs regarding my above queries and points.

Hi @KirstieJane.

I’ve installed Scona and also gone through its documentation. Here’s what I would like to know to proceed further:

  1. Is the task of the project to make Scona a one-stop tool for producing publishable results in general and it’s not specific to producing connectivity based results? Right now Scona has support for covariance connectivity matrices but it can also be evolved to support other types of data?

  2. The point 1) in the project description says “Develop a command line tool that will allow users to run their pipeline from beginning to end without having to import the modules into a python environment” - Does the word ‘pipeline’ here refer to the MR image processing pipelines? Does this mean that we can integrate Scona with the standard image processing pipelines making it an end-to-end solution for the researchers?

Hi @nsurampu :smile_cat:

To answer your questions:

  1. There’s a huge script called in the scripts folder. That has lots of functions that I wrote before scona became a python package. These are the visualistions we’re thinking of starting from.
  2. Yep - the nilearn connectome figure is really beautiful. Importantly we need to make sure that the figures look great when published rather than (just?) in the web browser. Does that make sense? There are quite a lot of lovely interactive network visualisations, our goal is to make sure we’re making descriptive figures that convey information clearly in a static PDF.
  3. Yes! That’s one of the example figures :smiley:
  4. Sure! Sounds good :rocket:

Hi @Ashraf_Haroon_Rashid!

  1. That’s a great question. I think I’d rather keep scona focused on structural network analyses as a starter. There are other packages where more general visualisations could be incorporated. My main reasoning is that I think being easy to use is the most important criteria. And that means being quite constrained in what options we give the user. If they’re a power user they can make the appropriate plots using already available tools… scona is designed to be used by non-expert coders. What other types of data were you thinking about visualising though? Happy to discuss!
  2. scona at the moment starts from regional data (as a csv file). I don’t want to extend the pipeline into the parts of an MRI processing pipeline before that, but I would very much like to see scona go from there all the way forwards. One thing we can integrate more deeply with would be the BIDS derivatives data format if you were interested in that?

Thanks a lot for inputs @KirstieJane! I’ll start drafting a proposal, so that I can get a much more clear view of our objectives and approach. I feel this will help me get closer to the summer objectives and their potential solutions. Will share the document with you later to get more guidance.

1 Like

@nsurampu Fab! Happy to review :hibiscus:

Hi @KirstieJane,

Sorry for the late reply! Had some evals the past week in college which delayed the proposal drafting.
I came up with a draft proposal which I plan on expanding further in the coming days. Would love to hear your inputs regarding the same.

Thank you @nsurampu! I’ve left a few comments in the google doc :smiley_cat:

Thank you so much @KirstieJane!
This makes the project objectives and plan more clear to me. I’ll make changes to the draft and notify you once it’s done.

Hi @KirstieJane,

I made some edits and added a few things in the draft proposal and submitted the final proposal due to the approaching deadline. I will make any other required changes according to the needs and resubmit the final proposal.

1 Like

Hi @nsurampu - sorry I was on holiday over the last few days - I’m excited to read your final application this weekend though! Thank you for applying!

Hi @KirstieJane,

I just went through the announced list of projects for GSoC. Just wanted to ask as to how I could improve in respects to both the pre-proposal and proposal aspects, and whether it would be possible to work on the project despite not getting selected for GSoC.

Hi @nsurampu! Sorry for the slow reply. It would be great to have you contribute to scona! Your proposal was very good, but we ended up choosing a GSOC applicant who had engaged with the codebase before submitting his application. We hang out and chat in the scona:cookie: gitter room and if there are key visualisations that you’d like to work on from your proposal then that would be wonderful! Just open an issue (so we don’t duplicate the work) and let us know that you’re working on them :smiley_cat: