Tagged: connectivity; PLV; EEG
October 3, 2017 at 7:40 pm #1005
I have question regarding the results returned by Braph of my EEG graph analysis. Looking at the nodal measures (after clicking at comparision), in this window there are columns like –> difference, p(1 tailed), fdr(1 -tailed)… and so on.
I am wondering that do we still have to apply fdr if this column has zero values. Sometime it has value like 1e-3 (fdr-1 tail). Does it show the value of false discovery?
Also if I have repeated measure design, do I have to define some other parameters or by selecting longitudinal study will work?
AmnaOctober 10, 2017 at 10:39 am #1007
We are very happy you chose to use Braph for your analysis and I hope everything is going well with it.
The table on the Nodal measures panel contains the information on the calculated parameters outputted from the permutation test. The fdr part of this table works in the following way:
To calculate the false discovery rate (corrected by using the Benjamini-Hochberg procedure, http://braph.org/manual/brain-graphs/) the p-values are ranked in ascending order and compared with their false corrected values. Once the largest p-value that is smaller than the corresponding false-rate-corrected value is identified, all the p-values smaller than this value are considered significant. These multiple comparisons are performed at a particular density for a given measure across all of the regions in the brain atlas.
Therefore, if you have a zero in the fdr column this means that none of the regions show a significant differences at that particular density value once their corresponding p-values are fdr corrected. Conversely, a non-zero p-value in the fdr column is the largest p-value discussed earlier (this value can be for any region but it is calculated at the particular density). In other words, if the p-value that is shown in the p-value column is smaller than the corresponding fdr value shown in the fdr column, that region is significant at this density. Please note that as you change the regions from the popup menu, the fdr value does not change since for a given measure it depends only on the density.
For your second question, yes, the longitudinal study will work.
If you need further help, please do not hesitate to contact me.
MiteOctober 11, 2017 at 6:33 pm #1008
Thanks for your detailed answer. I would like to ask about connectivity matrix calculation.
I have already calculated connectivity matrices using phase locking values (PLV). For that reason I would like to bypass the connectivity matrices calculation option and start graph theoretical analysis on matrices that I already got using PLV algorithm. However, I can see that one has to select different measures (spearman, pearson etc) in braph. The question is how can I eliminate this option in Braph? Cause changing this option is effecting my already calculated connectivity matrices. Is it possible or do I have to measure connectivities again using time series of EEG data?
AmnaOctober 16, 2017 at 1:21 pm #1017
Currently you cannot enter the adjacency matrix directly from the graphical user interface. However, you could still perform the analysis with a pre-calculated adjacency matrix from the command line while using all functionalities of Braph (like calculation of graph measures).
If, on the other hand, you would still like to use the graphical interface you would need to modify the code a bit in order to allow for the adjacency matrix to be inputted.
Assuming that you have an adjacency matrix already calculated for each subject you would need to modify two things:
1. Modify the input to the GUIfMRICohort / fMRICohort so that instead of time series for each brain region, you will be able to import matrices.
2. Modify the fMRIGraphAnalysis object (in the method adjmatrix either add one case in the switch function or modify an existing case that you would not use) so that instead of reading the object data and calculating the matrix, it reads the adjacency matrix from each subject and accepts it without doing any calculation.
If you instead have a ready Matlab code that will calculate the adjacency matrix with the PLV method provided the time series of the subject, you could just modify the fMRIGraphAnalysis object. In this case, you would add another case in the switch function (the method adjmatrix) that would execute PLV instead of the standard correlation methods.
After these modifications, all other features of BRAPH will work as in the original case.
I really hope this was helpful. If you need any more information, or further help about these modifications, please do not hesitate to ask me.
MiteNovember 22, 2017 at 2:08 pm #21212
I have just knwon about BRAPH software and I am very happy to have find it on the web !! However, as Amma, I am a little bit concerned about EEG connectivity matrix . Indeed, in the EEG field, connectivity matrix are not calculated from correlation (pearson or others types) while it is the case in fMRI data …. so as Amma I have already calculated connectivity matrices using phase locking values (PLV).
You have given information about how to proceede with but unfortunately I am not familiar with Matlab so I do not know how to do when you say:
1. Modify the input to the GUIfMRICohort ……
2. Modify the fMRIGraphAnalysis ….
What do you mean by modify ?? What should I do ??
VeroniqueNovember 23, 2017 at 1:22 pm #21214
I am happy you are using Braph and hope you find it useful and helpful for your research.
I understand your concern. I will implement the feature to import and analyze pre-calculated adjacency matrix and will describe a detailed step by step instructions in the next few days.
If you need any additional help please do not hesitate to contact me.
MiteNovember 24, 2017 at 8:52 am #21215
Thank you so much. This is very kind.
I look forward to seeing progress …
VeroniqueNovember 29, 2017 at 12:16 pm #21218
I modified the Braph toolbox in order to be able to accept previously calculated matrices. It works in the following way:
1) You should have the adjacency matrix for each subject saved separately in a Matlab file (.mat) and group the matrices according to your study. Then, without any modification to the EEG Cohort files you would be able to import the adjacency matrices for each group as explained in the manual (http://braph.org/manual/fmri/fmri-cohort/ ; since EEG analysis is analogous to the fMRI analysis, the manual’s explanations are valid for both cases).
Please note that your adjacency matrix needs to be consistent with the atlas you uploaded for this to work; for example if you upload brain atlas of 200 regions, you need to have an adjacency matrix of size 200×200.
2) In the EEGGraphAnalysis.m file, locate the function adjmatrix. In this function, after the line case EEGGraphAnalysis.CORR_KENDALL you should see [A,P] = corr(data,’Type’,’Kendall’) (this should be located at line 355 in EEGGraphAnalysis.m). You would need to modify this line to read:
A = data;
P = zeros(size(data));
In other words, the function [A,P] = adjmatrix(ga,data) in the file EEGGraphAnalysis.m should look like this (notice the line commented out after case EEGGraphAnalysis.CORR_KENDALL):
function [A,P] = adjmatrix(ga,data)
% ADJMATRIX calculates the adjaciency matrix
% [A,P] = ADJMATRIX(GA,DATA) calculates the adjaciency matrix A and the
% matrix of p-values for correlations P, given the graph analysis GA
% and its subject data DATA.
% See also EEGGraphAnalysis, corr, partialcorr, corrcoef.
[A,P] = corr(data,’Type’,’Spearman’);
%[A,P] = corr(data,’Type’,’Kendall’);
A = data;
P = zeros(size(data));
[A,P] = partialcorr(data,’Type’,’Pearson’);
[A,P] = partialcorr(data,’Type’,’Spearman’);
otherwise % EEGGraphAnalysis.PEARSON
[A,P] = corrcoef(data);
A(A<0) = 0;
A = abs(A);
otherwise % EEGGraphAnalysis.NEG_NONE
What this accomplishes is to modify the Kendall correlation option in the graphical interface to use the adjacency matrix you provide instead of calculating correlation coefficient. Therefore, please choose this option of the rest of your analysis. If you choose any of the other four options, they would still work as coded originally; they would treat your adjacency matrix as time series and calculate correlation coefficient between different columns.
3) This modification is not specific to EEG analysis or to Kendall option. If you would actually need to use Kendall correlation coefficient you could modify any of the other option as explained above and this method would still work. Moreover, if you would like to use the fMRI analysis part, you can modify the fMRIGraphAnalysis.m file analogously.
I hope that this explanation helps you and you will be able to modify Braph to suit your analysis. If you need any additional help with this issue or any other question please do not hesitate to ask and I will do my best to help.