PAC and Connectivity Plots Error

Good day,

A. I computed the PAC for 21 scouts of interest in the source space. When I try to double click the output file to see the PAC map, it does not display PAC plot and gives error as in the attached screenshot 2. Also I exported the PAC file to matlab and it shows zero frequencies and no TF values in the workspace. The pipeline options are as in the screenshot 1.

B. In the connectivity (NxN coh) analysis it doesn't show Chord diagram with 2021 option and gives GUI error. However it does show Chord diagram with 2013 option or when I run PLV connectivity (with 2021 option).

Could you suggest what might be wrong? Thanks

PAC Pipeline


PAC Error

1 Like

A. I computed the PAC for 21 scouts of interest in the source space. When I try to double click the output file to see the PAC map, it does not display PAC plot and gives error as in the attached screenshot 2. Also I exported the PAC file to matlab and it shows zero frequencies and no TF values in the workspace. The pipeline options are as in the screenshot 1.

It looks like there is an error in the selection of the data in the PAC process, which should be captured instead of returning an empty file (that of course you can't display).
We would need more input and/or an example dataset to be able to reproduce this error, handle it correctly in the PAC computation, and tell you how to avoid it:

  • Try to reproduce this error (generation of a PAC file with an empty TF matrix) with only one file in input in the Process1 box (or the minimum number of files needed to reproduce this error)
  • Right-click on the faulty input file > File > Show in file explorer (to locate it on your hard drive)
  • Post this file here (upload it somewhere and post the download link in this thread).

B. In the connectivity (NxN coh) analysis it doesn't show Chord diagram with 2021 option and gives GUI error. However it does show Chord diagram with 2013 option or when I run PLV connectivity (with 2021 option).

We also need more information in order to debug this issue. Please:

  • Try to reproduce this error with only one file in input (or the minimal amount of files needed).
  • Locate the file and send it to us
  • Post a screen capture of the options of both the 2021 and 2013 Coherence options in the Pipeline editor window (you can capture only one window by pressing ALT+PrintScreen and then CTRL+V in the message editor of the forum)
  • Post a screen capture of the error messages you get

Thank you for the response. Please find attached below the screenshots and drive links for input and output files for PAC and Connectivity. For connectivity, I would like to mention that the error appears for the plot of output file from permutation paired t-test. In the links I have uploaded both the input and output files for your convenience.

Looking forward your suggestions.

PAC files link: PAC - Google Drive

Connectivity files link: Connectivity - Google Drive

Coh 2021 error


Coh 2013

A. I computed the PAC for 21 scouts of interest in the source space. When I try to double click the output file to see the PAC map, it does not display PAC plot and gives error as in the attached screenshot 2. Also I exported the PAC file to matlab and it shows zero frequencies and no TF values in the workspace. The pipeline options are as in the screenshot 1.

I can see from the PAC file that you set the input NumFreqs (option " Total number of frequency bins") to 1, which leads to empty frequency bands, and therefore to an empty output file. Set it to zero (the default) and it will work much better.
See the options descriptions in the PAC tutorial: https://neuroimage.usc.edu/brainstorm/Tutorials/TutPac

I'd recommend you reset the options of all the processes to their defaults (in the pipeline editor, drop-down menu > Reset options). For the options you don't clearly understand, it is probably safer to keep all the default values we propose.

B. In the connectivity (NxN coh) analysis it doesn't show Chord diagram with 2021 option and gives GUI error. However it does show Chord diagram with 2013 option or when I run PLV connectivity (with 2021 option).

This bug occurred when there was no significant connections at all.
I fixed this bug here: Bugfix: Empty connectivity graph (no significant connections) · brainstorm-tools/brainstorm3@a0de173 · GitHub
Please update Brainstorm to get this fix. But the graph will remain empty, it won't increase the level of significativity of your results.

Thank you for the update. It works!

Dear @Francois,

I did the PLV NxN connectivity analysis between two conditions for different freq bands. As far as I understand the scale for NxN ranges b/w 0 and 1 as in the chord plot. I see some significant nodes (for only one condition-space in red color) which changes by changing the value of FDR level which means the results are correct. However, if I compare the connected nodes displayed in the chord plot and adjacency matrix plot there is a huge difference as shown in the screenshots. The change is obvious coz of the scale. Could you please clarify the scale in adjacency matrix? How can similar results be represented from chord plot and adj. matrix? How can I access the values of adj. matrix into matlab?

Look forward your response. Thanks

PLV Chord plot:

Adjacency matrix **

!

PLV and Permutation Analysis Pipeline:

I did the PLV NxN connectivity analysis between two conditions for different freq bands.

The file selection in your last screen capture is unexpected, but I guess this is only for illustration purposes.
You are computing the average PLV across trials for one subject, and then you are expecting to run a permutation t-test across subjects, is this correct?

As far as I understand the scale for NxN ranges b/w 0 and 1 as in the chord plot.

Only for the original PLV values.
When displaying the results of the t-test, it shows the t statistic, not the original PLV. Therefore there is no reason, expect if you enforce it in the colormap options, for the values to be limited between -1 and +1.

For the graph plot, note that you have an extra slider in the Display tab to remove links from the graph. Ideally, when displaying statistics results, this should be set to the minimal value, so that you can see all the connections that statistically significant.

Could you please clarify the scale in adjacency matrix?

These are the t-statistics, obtained with p-values < the threshold defined in the Stat tab.

How can similar results be represented from chord plot and adj. matrix?

Set the slider in the Display tab to the minimal value, reset the options of the colormap in the two figures.
You should see the same values with a similar colormap.

How can I access the values of adj. matrix into matlab?

https://neuroimage.usc.edu/brainstorm/Tutorials/Statistics#On_the_hard_drive

Dear @Francois,

Thank you for the response.

Yes the files selection is just for illustration and I computed average PLV across trials for one subject, and then ran permutation t-test between space and time conditions across 19 subjects.

I changed the scale to max. global for graph and adj. plots and the intensity threshold & distance to min. values for graph plot. Below are the results which look representative to each other. Could you check if this is correct?


1 Like

If you are referring to the correspondence between the graph and the matrix: click on the dots you see in the connectivity matrix, and the names of the ROIs will be displayed at the bottom of the figure.

If you are asking about the configuration of your colormap: this depends mostly on what your objectives are, there is no truth here, this is only data visualization options. For example, if you want to see which condition (FilesA or FilesB) has higher connectivity, you should not check the option "Absolute values" because the sign gives you this information.

Thank you once again for your tips. I will come back in case of any quests.

Dear @Francois,

What are the possibilities to run paired *t-*statistics for PAC analysis across two conditions or within a condition to test the significance in Brainstorm? I tried to run stats for two conditions but it doesn't work as it says currently stats not implemented for PAC files in Brainstorm.

I'm not sure what are the possibilities for the statistical analysis of PAC results.
@Samiee? @Sylvain?

Dear @Francois and @Sylvain,

I conducted permutation paired t-test on average PLV connectivity maps between two conditions space and time of a working memory task, across 19 subjects for different frequency bands (Destrieux atlas). Attached below is the FDR corrected graph plot for theta band (5-7 Hz) at significance level =0.01, distance threshold 40 mm and intensity thresh -4 to +4. Although I see a sign difference b/w two conditions at all freq. bands but picture of results is not clear coz of so many connections. I changed the sign level to 0.001 and other parameters but in that case there are no connections.
I am wondering what conservative approach I can use in this case to narrow down my results? How I can select few connections/ regions with meaningful patterns and results to be presented?

Your suggestions would be appreciated.

Looking forward!

If you have a proper statistical threshold estimated, I recommend you do not add any other type of filtering on top of it. Set all the sliders in the Display tab to zero, and change the threshold only from the Stat tab.

I am wondering what conservative approach I can use in this case to narrow down my results? How I can select few connections/ regions with meaningful patterns and results to be presented?

We don't have any suggestion (yet) on how to threshold differently the connectivity matrices.
Displaying the connectivity matrix as an image may make it look less messy.
You make need to reorganize the columns/rows manually to cluster adjacent regions behaving in the same way together.

Hi Francois,

I have a question regarding the statistical tab. Which option should we tick for the control over dims. 1. Signals, 2. Time, 3. Frequency. The selection is based on what?

Also, you stated there "if you want to see which condition (FilesA or FilesB) has higher connectivity, you should not check the option "Absolute values". How can we know which one of the two conditions/groups has the higher connectivity? Or the connectivity of the regions refer to what condition/group?

I have a question regarding the statistical tab. Which option should we tick for the control over dims. 1. Signals, 2. Time, 3. Frequency. The selection is based on what?

It depends what you consider as multiple comparisons. If you are not familiar with these concepts, you should read more about statistical testing before trying randomly the different options until you get something you like.
https://neuroimage.usc.edu/brainstorm/Tutorials/Statistics#Correction_for_multiple_comparisons

Also, you stated there "if you want to see which condition (FilesA or FilesB) has higher connectivity, you should not check the option "Absolute values". How can we know which one of the two conditions/groups has the higher connectivity? Or the connectivity of the regions refer to what condition/group?

This only depends on your hypotheses. You should not start any connectivity analysis (or any experiment) without having clear hypotheses that you want to test.
https://neuroimage.usc.edu/brainstorm/Tutorials/Connectivity#Introduction