Functional Connectivity

I noticed that the new version of brainstorm is equipped with a connectivity module. I would really like to use it to characterize the relationship between different sources obtained from my EEG/MEG recordings. As described in the tutorials, I was able to localize sources and define scouts/ROIs. Now I want to see how different ROIs are related. I figured I could use the correlation, coherence or granger causality metrics. However, I was unable to find any documentation on how to use those.

Can someone shed some light on that?

Thanks,
Yagna Pathak

Hello:

the tools are indeed available but the documentation is still in the making (available by late January). A great reference to get started with the available metrics would be:

Source connectivity analysis with MEG and EEG.
Schoffelen JM, Gross J.
Hum Brain Mapp. 2009 Jun;30(6):1857-65. doi: 10.1002/hbm.20745. Review

Let me know if you’d have more specific questions.

Thanks! I’ll start there and let you know if I have further questions.

Basically, what is the pipeline to follow once I’ve identified sources and want to characterize the relationship between them? I am particularly interested in the relationship between DLPFC and ACC. From what I understand, I can’t create a scout for the ACC since it isn’t a cortical region.

-Yagna Pathak

Hello

The connectivity toolbox in Brainstorm is not completely ready yet. We have many metrics that are already available, you can find them in the process list in the “Connectivity” menu: correlation, coherence, granger causality, phase-locking value.
But now we should had some post-processing to extract the significant information from the big connectivity matrices that we obtain from those processes.

If you want to use those methods as is, it is straightforward if you are familiar with Brainstorm.
[1xN] refers to the computation of a connectivity metric between 1 signal (sensor, source or scout) and all the others in the same group. The results are displayed in a similar way as the input type. For instance, in the case of a sensor, you evaluate the connectivity between one given sensor and all the others, and the results is displayed as a 2D sensor map.
[NxN] refers to the computation of the same connectivity metric for each pair of signals in a group (sensor, source or scout). The results are displayed as a circular connectivity graph. This is still being developed and will need a few more months to be completely stable and documented, but you can try exploring it by yourself.

Granger causality is an oriented measure (two different values: A=>B and B=>A), all the others are not oriented (one value only: A<=>B).

You can define a region of interest that would represent the ACC on the cortex surfaces generated by BrainVISA or FreeSurfer. Using FreeSurfer, you would even get it automatically identified in the Destrieux atlas as “G_and_S_cingul-Ant” in the two hemispheres.

Cheers,
Francois

Thank you for your response.

I guess one of the issues I have is I’m not sure how to extract this matrix of sources/scouts. For example, after I ran the wMNE unconstrained compute sources module for a 2sec epoch, I got a source localization file. However, I am not sure what the source indices are or how many sources were computed etc. How do I tell any of connectivity modules that I want to explore the relationship between ACC and all the other sources [1 X N] ? I already imported the freesurfer atlas into brainstorm.

Thanks,
Yagna Pathak

You have two ways for doing that, either by selecting only one source or by selecting a scout.

  1. One source only: you would calculate the connectivity measure between the current associated to one vertex of the cortex surface, and the rest of the brain (~15000 vertices, if you kept the default values).
  • To identify the source of interest: open the source file, right-click on the 3D figure > Get coordinates, point at somewhere on the brain. A yellow cross indicates the source that was selected and you can read the index of this source at the bottom of the Get coordinates window (source index = index in the list of vertices of the cortex surface)
  • Drag and drop the source file in the Process1 box
  • Select a process Connectivity > … [1xN], and write the vertex index in the “source indices” option.
  1. One full scout: You need first to calculate the scout time series.
  • Open the source file and select the scout of interest (it can be a label in a FreeSurfer atlas or a scout that you create by yourself)
  • Set the scout function (read the scouts tutorial if you are not familiar with this concept)
  • Drag and drop the source file in the Process1 list
  • Select the process Extract > Scouts time series: select the scout you want to extract
  • It creates a new “matrix” file in the database, containing one trace, representative of the entire region
  • Drag and drop the new scout file in the left side of the Process2 tab.
  • Drag and drop the source file in the right side of the Process2 tab.
  • Select any process in the Connectivity group. Source row names or indices = 1 (index of the scout in the input file: 1, because there is only one scout); Destination row names: empty (all the sources)

It is not very straightforward and not documented because it is still under development…

Cheers,
Francois

Hey Francois,

I mainly work with Brainvisa surfaces and I was wondering, is there a way to project the freesurfer atlas that is imported for a subject on a brainvisa surface?

Thanks,
Yagna Pathak

Hi Yagna,
No there is no way to project a FreeSurfer atlas on BrainVISA surfaces.
What you have to do is to process to MRI volumes with FreeSurfer instead.
Francois

Ok. Is there a way to project my source analysis on to the Freesurfer surface for a list of ALL my epochs for a condition? I have about 200 epochs per run and I would hate to have to project the sources individually for each one. Thanks!

-YP

No there is not.
I would strongly discourage you to do this projection BrainVISA>FreeSurfer anyways. You would lose a lot a spatial resolution.
If the only goal is to get access to the atlas, just run FreeSurfer on your subject’s MRI.
Have a look on their website. It looks complicated to install but it’s not that bad. It just takes time to calculate.
Francois

Thanks Francois.

Since I already had the freesurfer surfaces, I just switched over my analysis to those surfaces. With regards to the coherence measures, I am able to get the coherence to display on the cortical surface with a 1XN analysis of sources or 1XN analysis of one scout vs. sources. However, for a 1XN analysis of scouts (DLPFC vs. other brain ROIs), I am only allowed to display traces. I calculated the scout coherence after extracting the scout time-series as you indicated earlier. Is there a way to show these measures on the cortical surface for all the scouts also?

No, I’m sorry it’s not possible yet. This is planned for development later this year.
Another option you may consider: downsampling the surface to a set of scouts (=an atlas) with the process “Sources > Downsample to atlas”.

When I ran the coherence on the downsampled file (72 scouts), and tried to open it, I get the following error:

Number of sources (72) is different from number of vertices (15038). Please compute the sources again.

ps: Is there a way to find out the scout index from the atlas without actually having to count?

Number of sources (72) is different from number of vertices (1503. Please compute the sources again.

There is a bug, indeed. I have no solution to provide right now. I will work on this in May.

Is there a way to find out the scout index from the atlas without actually having to count?

Not really... You can do it with a script: export the list of all the scouts to Matlab, and then look for a string in this list.

I'm sorry for all those problems. Those tools are not finished and not ready to be documented and published... They will improve a lot in a couple of months.
Francois

Thanks Francois. I’ll check for updates. However, I have another question about connectivity analysis in sensor space. I am trying to calculate [1XN] coherence. I don’t get an error while trying to calculate, however when I try to display the results in a 2D/3D topography, I get the following error:

Cannot display 2D/3D topography for this file.

Am I doing something wrong or is this also a bug? I apologize for all these questions and I realize the tools are still being developed. I appreciate all your help.

-YP

Hi Yagna,

It’s either because you don’t have all the MEG (or EEG) channels, or because you calculated in the same file the [1xN] coherence for different types of sensors.
In the option “sensor types or names”, make sure you have indicated one and only one type of sensors (if you leave this empty, there is a very high chance that you have also EOG or stim channels mixed with the others).
(I agree, the error message is not helpful at all… I will try to fix this)

Cheers,
Francois

Thanks for your help so far. I’m moving forward with my analysis and exploring with the ALL scout function. It seems to me that it provides me with the time series for every vertex included in the scout. I have 2 general questions:

  1. What will a [1xN] analysis (correlation or coherence) of this extracted scout series and all sources on the brain give me?
  2. How can I get an average correlation map just within the scout region?

Hi Yagna,

What you currently do is extracting the scouts values first (process Extract > Scouts time series), right? If you select only one scout which is configured to use the “All” function, you will get the time series of all the sources located in this brain region (N signals). Then, [1xN] would mean that you want to compare one signal with those N extracted signals.

I think what you want is to calculate the NxN correlation/coherence map, then average the blocks you are interested in. Problem, it requires a LOT of memory.
Lighter option, that requires more scripting: you make script that calculates in a loop the [1xN] metric for one source of the scout and the rest of the brain. You get N files at the end of the loop, and then average them together.

If I didn’t understand properly what you’re doing, please explain better your problem.

Cheers,
Francois

Let me outline exactly what I’m doing.

  1. Source localization on my raw-data epoch
  2. Extract scout series (ALL)
  3. Connectivity analysis: I use the Process 2 window, drop the scout file in A and the source file in B, then run the [1xN] correlation analysis. The correlation map gives me a result for the entire brain. I am just confused on how it calculated that result.

Does that better explain my problem?

Ok, thanks for the explanations.

If you are running the [1xN] correlation, with A=scout file (Nscout signals) and B=source file (Nvertex signals), and if you leave the options “source row names” and “destination row names” empty, it would generate a [Nscout x Nvertex] connectivity matrix that you cannot display with the Brainstorm interface.

If you have something set for the options “source row names” or “destination row names”, you could have something with a different size (like [Nscout x 1] or [1 x Nvertex]).

You can use this [Nscout x Nvertex] to calculate manually the average over the scouts sources, and generate a [1 x Nvertex]. Here is one possible method for doing that:

  1. Right-click on the [Nscout x Nvertex] connectivity file > File > Export to Matlab > “Mat”
  2. Execute the following code in you matlab command window:
Mat.TF = reshape(Mat.TF, length(Mat.RefRowNames), length(Mat.RowNames), []);
Mat.TF = mean(Mat.TF, 1);
Mat.TF = reshape(Mat.TF, length(Mat.RowNames), 1, []);
Mat.RefRowNames = Mat.RefRowNames(1);
Mat.Comment = [Mat.Comment ' AVG'];
  1. Right-click on the FOLDER containing those files (condition or run) > File > Import from Matlab > “Mat”
  2. The new file should have a different icon than the original file ([1xN] instead of [NxN])

Francois