dwPLI and PLI computation

Dear brainstorm developer,
I’m trying to use the metrics dwpli and pli, but they don’t show up in the GUI. I opened the bst_connectivity.m file and noticed a comment saying they’re implemented but not available in the interface. I’m working on a study where I need to compare PLI and wPLI, so it would help a lot to know if this absence in the GUI is intentional. Also, is there a way to run these measures through the command line or with a script, even if they aren’t visible in the interface?

Thanks for your help and the huge job you are doing as always.

Margherita

P.S. I menaged to get such connectivity matrix with the following call:

temp = bst_process('CallProcess', 'process_plv1n', sFiles{1,s}, [ ], ...
  'timewindow',    [ ], ...
  'dest_sensors',  'EEG', ...
  'includebad',    1, ...
  'plvmethod',     'pli', ...  % Weighted phase lag index
  'plvmeasure',    2, ...  % Magnitude
  'tfmeasure',     'hilbert', ...  % Hilbert transform
  'tfedit',        struct(...
    'Comment',         'Complex', ...
    'TimeBands',       [ ], ...
    'Freqs',           {{'delta', '2, 4', 'mean'; 'theta', '5, 7', 'mean'; 'alpha', '8, 12', 'mean'; 'beta', '15, 29',   'mean'; 'gamma1', '30, 59', 'mean'; 'spike', '1, 60', 'mean'}}, ...
    'ClusterFuncTime', 'none', ...
    'Measure',         'none', ...
    'Output',          'all', ...
    'SaveKernel',      0), ...
  'timeres',       'full', ...  % Full (requires epochs)
  'avgwinlength',  1, ...
  'avgwinoverlap', 50, ...
  'outputmode',    'input');  % separately for each file

Just double-check if it is correct.

@Marc.Lalancette, do you happen to remember why these methods were left out of the GUI?
The change was made in this PR:

Yes, you can open the process in the GUI, then create a script from it. Lastly, update the plvmethod to either pli or dwpli. (It seems this is what you did in the shared code, which looks good.)

1 Like

Hi there!

I was reading this post and now I’m confused, has BS the debiased version of wPLI? or just the wPLI?

(as the title of the post is dwPLI (debiased wPLI))

Brainstorm can compute both wPLI and dwPLI, which are refined as Equations 8 and 33 in:

Vinck M, Oostenveld R, van Wingerden M, Battaglia F, Pennartz CM
An improved index of phase-synchronization for electrophysiological data in the presence of volume-conduction, noise and sample-size bias
Neuroimage, Apr 2011

However, (for the moment) only wPLI is available from the GUI

I think it's just the philosophy of Brainstorm to have limited options, offering the most common, or best validated, or other reason why one method is better than others. Here wPLI can be considered a direct improvement on PLI, but the debiased version is not as straightforward: if I recall, you get the same stats when comparing wpli values among themselves vs dwpli among themselves. And since we already offered most other connectivity measures in a non-debiased more common versions, we decided to stick with the vanilla wpli.

2 Likes

I see,

I think it will be great to have the debiased version in GUI , just a thought :folded_hands: :folded_hands: :folded_hands:

Thank you for the support!

Best,

Margherita