Effects of TMS on the Decoding and Electrophysiology of Priority in Working Memory.
The 9 matches
- [1] § Materials and Methods › Decoding ↔ MVPA/MVPAcode/MVPALight_HTC_DSRfullsplit.m, lines 95–166 · score 0.82 · MVPA Light, beta power, theta power, alpha power, FieldTrip, L2
- [2] § Materials and Methods › Decoding ↔ MVPA/MVPAcode/MVPALight_HTC_SRfullsplit.m, lines 96–168 · score 0.82 · MVPA Light, beta power, theta power, alpha power, FieldTrip, L2
- [3] § Materials and Methods › EEG dynamics › EEG analyses of phase ↔ Phase Analyses/TMSPLV_slidingcombined.m, lines 1–31 · score 0.76 · frequency adaptive, sliding window, circular statistics, PLV changes, phase shifts, spTMS
- [4] § Materials and Methods › EEG dynamics › EEG analyses of phase ↔ Phase Analyses/CuePLV_slidingcombined.m, lines 44–47 · score 0.75 · 20–30 Hz, 8–13 Hz, 13–20 Hz, 4–8 Hz, high beta, low beta
- [5] § Materials and Methods › EEG dynamics › EEG analyses of phase ↔ Phase Analyses/TMSPLV_slidingcombined.m, lines 33–36 · score 0.74 · 20–30 Hz, 8–13 Hz, 13–20 Hz, 4–8 Hz, high beta, low beta
- [6] § Materials and Methods › EEG dynamics › EEG analyses of phase ↔ Phase Analyses/TMSPLV_slidingcombined.m, lines 41–153 · score 0.70 · cycle length, window lengths, candidate, high beta, sliding, optimal
- [7] § Materials and Methods › EEG dynamics › EEG analyses of phase ↔ Phase Analyses/CuePLV_slidingcombined.m, lines 1–14 · score 0.67 · frequency adaptive, sliding window, PLV changes, phase shifts, cue, SR
- [8] § EEG dynamics › Phase dynamics › Prioritization cues ↔ Phase Analyses/CuePLV_slidingcombined.m, lines 450–474 · score 0.56 · circular boundary, phase angle shifts, PLV, low beta, FDR, cue
- [9] § Materials and Methods › EEG dynamics › EEG analyses of phase ↔ Phase Analyses/CuePLV_slidingcombined.m, lines 157–182 · score 0.52 · post cue, absolute, chosen, candidate, cycles, PLV
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
MATLAB · 531 lines · 21 KB · no license · 4 matches
- % =================================================================
- % Cue-Related Sliding-Window, Frequency-Adaptive Phase Analysis
- % DSR vs SR comparisons for PLV change, mean phase shift,
- % and inter-subject PLV (pre/post windows matched in length)
- % =================================================================
- % Fulvio & Postle
- clear; close all; clc;
- % rng('shuffle'); % sets the seed based on current time
- % s = rng; % capture current state
- % fprintf('Random seed for this run: %d (RNG type: %s)\n', s.Seed, s.Type);
- %% -----------------------------
- %% Set random seed for reproducibility
- %% -----------------------------
- seed_used = 147377794;
- rng(seed_used, 'twister');
- fprintf('RNG seed set to %d\n', seed_used);
- % addpath to Circular Statistics Toolbox here
- fprintf('=== LOADING TRIAL DATA ===\n');
- %% Load preprocessed baselined DSR and SR trial data
- load 'TMSEEG_DSR_NoLures_August2025_100hz_CueERP_indivtrials.mat';
- DSR_trials = ERPall;
- load 'TMSEEG_SR_NoLures_August2025_100hz_CueERP_indivtrials.mat';
- SR_trials = ERPall;
- n_subjects = 12;
- fs = 100; % Hz
- full_time_vector = -2000:(1000/fs):2000; % full time axis
- n_timepoints_full = length(full_time_vector);
- subset_cols = 901:1301; % these are the indices of the cue-related timepoints in the EEG data
- % extracts -2000 to +2000 ms relative to cue onset
- % (cue onset is at column 1101 in the original data matrix)
- time_vector = full_time_vector;
- n_timepoints = length(time_vector);
- %% Frequency bands
- freq_bands = {[4 8], [8 13], [13 20], [20 30]};
- band_names = {'Theta','Alpha','Low Beta','High Beta'};
- n_bands = length(freq_bands);
- %% Candidate cycles per band
- candidate_cycles = {
- 2:4, % Theta
- 2:4, % Alpha
- 3:6, % Low Beta
- 3:6 % High Beta
- };
- pre_end_ms = -1; % pre window must end 1 ms before cue (we go to nearest sample)
- post_max = 500; % ms
- n_perm_between = 5000; % number of permutations to test
- n_boot = 1000; % bootstrap samples for SEM
- %% Prepare storage
- cue_results = struct();
- %% Extract trial data
- combined_phase_data = cell(n_subjects,1);
- dsr_phase_data = cell(n_subjects,1);
- sr_phase_data = cell(n_subjects,1);
- for subj = 1:n_subjects
- dsr_trials_subj = DSR_trials{subj}(:, subset_cols); % cue window subset
- sr_trials_subj = SR_trials{subj}(:, subset_cols);
- dsr_phase_data{subj} = dsr_trials_subj;
- sr_phase_data{subj} = sr_trials_subj;
- combined_phase_data{subj} = [dsr_trials_subj; sr_trials_subj];
- end
- %% Precompute some time/sample helpers
- dt = time_vector(2) - time_vector(1); % ms per sample (should be 1000/fs)
- cue_idx_in_subset = find(time_vector == 0, 1, 'first');
- if isempty(cue_idx_in_subset)
- error('Cue (time 0) not found in the cropped time vector.');
- end
- pre_end_idx = cue_idx_in_subset - 1; % last sample before cue (pre window MUST end here)
- if pre_end_idx < 1
- error('pre_end index would be < 1; check time_vector and subset_cols.');
- end
- %% -----------------------------
- %% Sliding-window adaptive analysis
- %% -----------------------------
- for band_idx = 1:n_bands
- band_name = band_names{band_idx};
- freq_band = freq_bands{band_idx};
- max_freq = max(freq_band);
- fprintf('\n--- %s ---\n', band_name);
- % Bandpass filter
- filter_order = min(4, floor(n_timepoints/6));
- [b,a] = butter(filter_order, freq_band/(fs/2), 'bandpass');
- % Hilbert phases for combined trials (trials x time)
- combined_phase_hilb = cell(n_subjects,1);
- for subj = 1:n_subjects
- filt_data = filtfilt(b,a,combined_phase_data{subj}')'; % keep trials x time
- combined_phase_hilb{subj} = angle(hilbert(filt_data')'); % trials x time
- end
- % Candidate post-window start times (ms)
- post_start_candidates_ms = 0:post_max; % will convert to sample indices below
- tstats = zeros(length(post_start_candidates_ms), length(candidate_cycles{band_idx}));
- subj_diffs_all = zeros(n_subjects, length(post_start_candidates_ms), length(candidate_cycles{band_idx}));
- %% Loop over candidate cycles
- for c = 1:length(candidate_cycles{band_idx})
- cycles = candidate_cycles{band_idx}(c);
- window_length_ms = cycles / mean(freq_band) * 1000; %max_freq * 1000;
- % convert to number of samples (round to nearest sample)
- window_samples = max(1, round(window_length_ms / dt));
- % Pre window: end exactly 1 sample before cue and have length = window_samples
- pre_idx = (pre_end_idx - window_samples + 1) : pre_end_idx;
- % if this would go before start, shorten to available samples
- if pre_idx(1) < 1
- pre_idx = 1:pre_end_idx;
- window_samples = length(pre_idx);
- end
- for w = 1:length(post_start_candidates_ms)
- post_start_ms = post_start_candidates_ms(w);
- % find the first sample in the cropped time vector >= post_start_ms
- post_start_idx = find(time_vector >= post_start_ms, 1, 'first');
- if isempty(post_start_idx)
- tstats(w,c) = NaN; continue
- end
- post_end_idx = post_start_idx + window_samples - 1;
- % ensure post_end within allowed post_max and within data bounds
- if post_end_idx > n_timepoints || time_vector(post_end_idx) > post_max
- tstats(w,c) = NaN; continue
- end
- post_idx = post_start_idx : post_end_idx;
- % compute subject-level pre/post PLVs (using combined trials)
- for subj = 1:n_subjects
- phases = combined_phase_hilb{subj}; % trials x time
- % average across trials then across timepoints → use all samples
- pre_plv = abs(mean(mean(exp(1i*phases(:,pre_idx)),1),2));
- post_plv = abs(mean(mean(exp(1i*phases(:,post_idx)),1),2));
- subj_diffs_all(subj,w,c) = post_plv - pre_plv;
- end
- % t-stat across subjects
- [~,~,~,st] = ttest(subj_diffs_all(:,w,c));
- tstats(w,c) = st.tstat;
- end
- end
- %% Select best window (by absolute t-stat)
- [~, idx] = max(abs(tstats(:)));
- [best_w, best_c] = ind2sub(size(tstats), idx);
- best_post_start_ms = post_start_candidates_ms(best_w);
- best_window_ms = candidate_cycles{band_idx}(best_c) / mean(freq_band) *1000; %max_freq * 1000;
- % recompute window_samples for the chosen window (to avoid rounding drift)
- window_samples = max(1, round(best_window_ms / dt));
- % final post indices (in cropped time vector)
- post_start_idx_final = find(time_vector >= best_post_start_ms, 1, 'first');
- post_end_idx_final = post_start_idx_final + window_samples - 1;
- if post_end_idx_final > n_timepoints || time_vector(post_end_idx_final) > post_max
- error('Selected post window exceeds bounds — check candidate ranges.');
- end
- post_idx_final = post_start_idx_final : post_end_idx_final;
- % final pre indices: end at pre_end_idx and match length (window_samples)
- pre_end_idx = cue_idx_in_subset - 1; % ensure correct
- pre_start_idx = pre_end_idx - window_samples + 1;
- if pre_start_idx < 1
- pre_start_idx = 1; % shorten if necessary
- end
- pre_idx_final = pre_start_idx : pre_end_idx;
- fprintf('Selected window: %.1f - %.1f ms post-cue (length %.1f ms, %d samples) %f %f\n', ...
- time_vector(post_idx_final(1)), time_vector(post_idx_final(end)), best_window_ms, window_samples, length(pre_idx_final), length(post_idx_final));
- %% -----------------------------
- %% Compute PLV change and phase shifts per subject (DSR and SR separately) within the selected window
- %% -----------------------------
- dsr_diffs = zeros(n_subjects,1);
- sr_diffs = zeros(n_subjects,1);
- dsr_phase_shift = zeros(n_subjects,1);
- sr_phase_shift = zeros(n_subjects,1);
- for subj = 1:n_subjects
- % DSR
- filt_dsr = filtfilt(b,a,dsr_phase_data{subj}')';
- phase_dsr = angle(hilbert(filt_dsr')'); % trials x time
- % mean across trials then across timepoints in window
- dsr_pre_plv = abs(mean(mean(exp(1i*phase_dsr(:,pre_idx_final)),1),2));
- dsr_post_plv = abs(mean(mean(exp(1i*phase_dsr(:,post_idx_final)),1),2));
- dsr_diffs(subj) = dsr_post_plv - dsr_pre_plv;
- % phase (mean over trials then over timepoints)
- pre_phase = angle(mean(mean(exp(1i*phase_dsr(:,pre_idx_final)),1),2));
- post_phase = angle(mean(mean(exp(1i*phase_dsr(:,post_idx_final)),1),2));
- dsr_phase_shift(subj) = circ_dist(post_phase, pre_phase);
- % SR
- filt_sr = filtfilt(b,a,sr_phase_data{subj}')';
- phase_sr = angle(hilbert(filt_sr')');
- sr_pre_plv = abs(mean(mean(exp(1i*phase_sr(:,pre_idx_final)),1),2));
- sr_post_plv = abs(mean(mean(exp(1i*phase_sr(:,post_idx_final)),1),2));
- sr_diffs(subj) = sr_post_plv - sr_pre_plv;
- pre_phase = angle(mean(mean(exp(1i*phase_sr(:,pre_idx_final)),1),2));
- post_phase = angle(mean(mean(exp(1i*phase_sr(:,post_idx_final)),1),2));
- sr_phase_shift(subj) = circ_dist(post_phase, pre_phase);
- end
- %% -----------------------------
- %% Permutation tests DSR vs SR (paired across subjects)
- %% -----------------------------
- observed_diff_plv = mean(dsr_diffs) - mean(sr_diffs);
- observed_diff_phase = circ_mean(dsr_phase_shift) - circ_mean(sr_phase_shift);
- perm_diffs_plv = zeros(n_perm_between,1);
- perm_diffs_phase = zeros(n_perm_between,1);
- for p = 1:n_perm_between
- flip_signs = randi([0 1], n_subjects, 1) * 2 - 1;
- perm_diffs_plv(p) = mean(flip_signs .* (dsr_diffs - sr_diffs));
- perm_diffs_phase(p) = mean(flip_signs .* (dsr_phase_shift - sr_phase_shift));
- end
- p_perm_plv = 2*min(mean(perm_diffs_plv >= observed_diff_plv), mean(perm_diffs_plv <= observed_diff_plv));
- p_perm_phase = 2*min(mean(perm_diffs_phase >= observed_diff_phase), mean(perm_diffs_phase <= observed_diff_phase));
- %% -----------------------------
- %% Inter-subject PLV for DSR and SR (consistency of subject-level shifts)
- %% -----------------------------
- plv_dsr = abs(mean(exp(1i*dsr_phase_shift)));
- plv_sr = abs(mean(exp(1i*sr_phase_shift)));
- % Bootstrap SEM for each condition
- boot_plv_dsr = zeros(n_boot,1);
- boot_plv_sr = zeros(n_boot,1);
- for bb = 1:n_boot
- idxs = randsample(n_subjects, n_subjects, true);
- boot_plv_dsr(bb) = abs(mean(exp(1i*dsr_phase_shift(idxs))));
- boot_plv_sr(bb) = abs(mean(exp(1i*sr_phase_shift(idxs))));
- end
- sem_dsr = std(boot_plv_dsr);
- sem_sr = std(boot_plv_sr);
- % Paired permutation test on inter-subject PLV (swap subject labels)
- observed_diff_inter_plv = plv_dsr - plv_sr;
- perm_inter_plv = zeros(n_perm_between,1);
- for p = 1:n_perm_between
- flip = randi([0 1], n_subjects, 1) * 2 - 1;
- dsr_perm = dsr_phase_shift;
- sr_perm = sr_phase_shift;
- idx_flip = flip == -1;
- dsr_perm(idx_flip) = sr_phase_shift(idx_flip);
- sr_perm(idx_flip) = dsr_phase_shift(idx_flip);
- perm_inter_plv(p) = abs(mean(exp(1i*dsr_perm))) - abs(mean(exp(1i*sr_perm)));
- end
- p_perm_inter_plv = 2 * min(mean(perm_inter_plv >= observed_diff_inter_plv), mean(perm_inter_plv <= observed_diff_inter_plv));
- %% -----------------------------
- %% Store results
- %% -----------------------------
- cue_results(band_idx).band_name = band_name;
- cue_results(band_idx).freq_band = freq_band;
- cue_results(band_idx).pre_idx = pre_idx_final;
- cue_results(band_idx).post_idx = post_idx_final;
- % PLV change
- cue_results(band_idx).dsr_diffs = dsr_diffs;
- cue_results(band_idx).sr_diffs = sr_diffs;
- cue_results(band_idx).observed_diff_plv = observed_diff_plv;
- cue_results(band_idx).p_perm_plv = p_perm_plv;
- % Mean phase shift
- cue_results(band_idx).dsr_phase_shift = dsr_phase_shift;
- cue_results(band_idx).sr_phase_shift = sr_phase_shift;
- cue_results(band_idx).observed_diff_phase = observed_diff_phase;
- cue_results(band_idx).p_perm_phase = p_perm_phase;
- % Inter-subject PLV
- cue_results(band_idx).plv_dsr = plv_dsr;
- cue_results(band_idx).plv_sr = plv_sr;
- cue_results(band_idx).sem_dsr = sem_dsr;
- cue_results(band_idx).sem_sr = sem_sr;
- cue_results(band_idx).observed_diff_inter_plv = observed_diff_inter_plv;
- cue_results(band_idx).p_perm_inter_plv = p_perm_inter_plv;
- end
- %% FDR correction step
- % Collect raw p-values
- p_raw = [];
- for b = 1:n_bands
- p_raw = [p_raw; ...
- cue_results(b).p_perm_plv; ...
- cue_results(b).p_perm_phase; ...
- cue_results(b).p_perm_inter_plv];
- end
- % Apply FDR
- p_fdr = fdr_bh(p_raw);
- % Assign back to structure
- idx = 1;
- for b = 1:n_bands
- cue_results(b).p_perm_plv_fdr = p_fdr(idx); idx = idx+1;
- cue_results(b).p_perm_phase_fdr = p_fdr(idx); idx = idx+1;
- cue_results(b).p_perm_inter_plv_fdr = p_fdr(idx); idx = idx+1;
- end
- %% -----------------------------
- %% Report statistics
- %% -----------------------------
- fprintf('\n=== Statistics: DSR vs SR (FDR-corrected) ===\n');
- for b = 1:n_bands
- fprintf('\n%s:\n', cue_results(b).band_name);
- fprintf(' PLV change: p=%.4f (FDR=%.4f), Mean diff=%.4f\n', ...
- cue_results(b).p_perm_plv, cue_results(b).p_perm_plv_fdr, cue_results(b).observed_diff_plv);
- fprintf(' Mean phase shift: p=%.4f (FDR=%.4f), Mean diff=%.2f deg\n', ...
- cue_results(b).p_perm_phase, cue_results(b).p_perm_phase_fdr, mean(cue_results(b).dsr_phase_shift - cue_results(b).sr_phase_shift)*180/pi);
- fprintf(' Inter-subject PLV: p=%.4f (FDR=%.4f) DSR=%.3f ± %.3f, SR=%.3f ± %.3f\n', ...
- cue_results(b).p_perm_inter_plv, cue_results(b).p_perm_inter_plv_fdr, cue_results(b).plv_dsr, cue_results(b).sem_dsr, ...
- cue_results(b).plv_sr, cue_results(b).sem_sr);
- end
- %% -----------------------------
- %% Plot bar graphs: 2 bars per frequency band
- %% -----------------------------
- % PLV change
- plv_means = [];
- plv_sems = [];
- for b = 1:n_bands
- plv_means = [plv_means, mean(cue_results(b).dsr_diffs), mean(cue_results(b).sr_diffs)];
- plv_sems = [plv_sems, std(cue_results(b).dsr_diffs)/sqrt(n_subjects), std(cue_results(b).sr_diffs)/sqrt(n_subjects)];
- end
- figure; hold on;
- b_plot = bar(reshape(plv_means,2,[])','grouped');
- b_plot(1).FaceColor = [75 0 130]/255; % DSR
- b_plot(2).FaceColor = [53 94 59]/255; % SR
- % Error bars
- for i = 1:2*n_bands
- x = b_plot(mod(i-1,2)+1).XEndPoints(ceil(i/2));
- errorbar(x, plv_means(i), plv_sems(i),'k','LineStyle','none','LineWidth',2);
- end
- xticks(1:n_bands)
- set(gca,'XTickLabel',band_names,'TickDir','out','LineWidth',1.5)
- ylabel('PLV Change (Post - Pre)')
- title('DSR vs SR: PLV Change')
- set(gcf,'Color','white')
- % Mean phase shift
- phase_means = [];
- phase_sems = [];
- for b = 1:n_bands
- phase_means = [phase_means, circ_mean(cue_results(b).dsr_phase_shift), circ_mean(cue_results(b).sr_phase_shift)];
- phase_sems = [phase_sems, circ_std(cue_results(b).dsr_phase_shift)/sqrt(n_subjects), circ_std(cue_results(b).sr_phase_shift)/sqrt(n_subjects)];
- end
- phase_means_deg = phase_means*180/pi;
- phase_sems_deg = phase_sems*180/pi;
- figure; hold on;
- b_plot = bar(reshape(phase_means_deg,2,[])','grouped');
- b_plot(1).FaceColor = [75 0 130]/255; % DSR
- b_plot(2).FaceColor = [53 94 59]/255; % SR
- for i = 1:2*n_bands
- x = b_plot(mod(i-1,2)+1).XEndPoints(ceil(i/2));
- errorbar(x, phase_means_deg(i), phase_sems_deg(i),'k','LineStyle','none','LineWidth',2);
- end
- xticks(1:n_bands)
- set(gca,'XTickLabel',band_names,'TickDir','out','LineWidth',1.5)
- ylabel('Mean Phase Shift (deg)')
- title('DSR vs SR: Mean Phase Shift')
- set(gcf,'Color','white')
- % Inter-subject PLV
- plv_vals = [];
- plv_sems = [];
- for b = 1:n_bands
- plv_vals = [plv_vals, cue_results(b).plv_dsr, cue_results(b).plv_sr];
- plv_sems = [plv_sems, cue_results(b).sem_dsr, cue_results(b).sem_sr];
- end
- figure; hold on;
- b_plot = bar(reshape(plv_vals,2,[])','grouped');
- b_plot(1).FaceColor = [75 0 130]/255; % DSR
- b_plot(2).FaceColor = [53 94 59]/255; % SR
- for i = 1:2*n_bands
- x = b_plot(mod(i-1,2)+1).XEndPoints(ceil(i/2));
- errorbar(x, plv_vals(i), plv_sems(i),'k','LineStyle','none','LineWidth',2);
- end
- xticks(1:n_bands)
- set(gca,'XTickLabel',band_names,'TickDir','out','LineWidth',1.5)
- ylabel('Inter-Subject PLV')
- title('DSR vs SR: Inter-Subject Phase Alignment')
- ylim([0 1])
- set(gcf,'Color','white')
- %% Single-subject direction counts for cue-related phase effects
- %% Run this after the cue phase analysis script (cue_results must be in workspace)
- %% For each frequency band showing a significant effect, reports N participants
- %% showing the DSR vs SR difference in the same direction as the group-level effect
- fprintf('\n=== SINGLE-SUBJECT DIRECTION COUNTS: CUE-RELATED EFFECTS ===\n');
- fprintf('(Run after cue phase analysis script)\n\n');
- fprintf('For each contrast, N = participants whose individual difference\n');
- fprintf('score shares the sign of the group-level mean difference.\n\n');
- fprintf('Note: sign-based counts are only interpretable when the group-level\n');
- fprintf('mean difference is well away from the circular boundary (+-180 deg).\n\n');
- band_names = {'Theta','Alpha','Low Beta','High Beta'};
- n_bands = length(band_names);
- n_subjects = 12;
- %% -----------------------------------------------------------------------
- %% 1. Within-participant PLV change: Low Beta (significant effect)
- %% DSR vs SR
- %% -----------------------------------------------------------------------
- fprintf('=== Within-participant PLV change: All bands ===\n');
- fprintf('(Reporting all bands for completeness; key significant effect in Low Beta)\n\n');
- for band_idx = 1:n_bands
- diff_vals = cue_results(band_idx).dsr_diffs - cue_results(band_idx).sr_diffs;
- group_mean = mean(diff_vals);
- n_same_dir = sum(sign(diff_vals) == sign(group_mean));
- sig_str = '';
- if cue_results(band_idx).p_perm_plv_fdr < 0.05
- sig_str = ' *';
- end
- fprintf(' %s: group mean diff = %.4f, %d/%d participants in same direction%s\n', ...
- band_names{band_idx}, group_mean, n_same_dir, n_subjects, sig_str);
- end
- fprintf('\n');
- %% -----------------------------------------------------------------------
- %% 2. Mean phase angle shift: Theta, Alpha, Low Beta (significant effects)
- %% DSR vs SR — using circ_dist for circular measure
- %% -----------------------------------------------------------------------
- fprintf('=== Mean phase angle shift: All bands ===\n');
- fprintf('(Reporting all bands for completeness; significant effects in Theta, Alpha, Low Beta)\n\n');
- for band_idx = 1:n_bands
- diff_vals = circ_dist(cue_results(band_idx).dsr_phase_shift, cue_results(band_idx).sr_phase_shift);
- group_mean = circ_mean(diff_vals);
- group_mean_deg = rad2deg(group_mean);
- n_same_dir = sum(sign(diff_vals) == sign(group_mean));
- sig_str = '';
- if cue_results(band_idx).p_perm_phase_fdr < 0.05
- sig_str = ' *';
- end
- % Flag if near circular boundary
- boundary_warning = '';
- if abs(group_mean_deg) > 150
- boundary_warning = ' [WARNING: near +/-180 deg boundary - count may not be interpretable]';
- end
- fprintf(' %s: group mean diff = %.2f deg, %d/%d participants in same direction%s%s\n', ...
- band_names{band_idx}, group_mean_deg, n_same_dir, n_subjects, sig_str, boundary_warning);
- end
- fprintf('\n');
- %% -----------------------------------------------------------------------
- %% 3. Inter-subject PLV: report for completeness
- %% -----------------------------------------------------------------------
- fprintf('=== Inter-subject PLV: All bands ===\n');
- fprintf('(No significant effects expected; reported for completeness)\n\n');
- for band_idx = 1:n_bands
- % Inter-subject PLV is a scalar (not per-subject difference),
- % so we report the individual subject phase shifts going in the
- % same direction as the group mean for each condition separately
- dsr_group_mean = circ_mean(cue_results(band_idx).dsr_phase_shift);
- sr_group_mean = circ_mean(cue_results(band_idx).sr_phase_shift);
- n_dsr_same = sum(sign(cue_results(band_idx).dsr_phase_shift) == sign(dsr_group_mean));
- n_sr_same = sum(sign(cue_results(band_idx).sr_phase_shift) == sign(sr_group_mean));
- sig_str = '';
- if cue_results(band_idx).p_perm_inter_plv_fdr < 0.05
- sig_str = ' *';
- end
- fprintf(' %s: DSR inter-subject PLV = %.3f (%d/%d in group direction), SR = %.3f (%d/%d in group direction)%s\n', ...
- band_names{band_idx}, ...
- cue_results(band_idx).plv_dsr, n_dsr_same, n_subjects, ...
- cue_results(band_idx).plv_sr, n_sr_same, n_subjects, sig_str);
- end
- fprintf('\n');
- fprintf('* = FDR-corrected p < 0.05\n');
- fprintf('circ_dist used for all phase shift contrasts to handle circular wrapping\n');
- fprintf('Group mean differences near +-180 deg are flagged as potentially uninterpretable\n');
- %% Helper function
- function p_fdr = fdr_bh(pvals)
- % Benjamini-Hochberg FDR correction
- p = pvals(:);
- [p_sorted, idx] = sort(p);
- m = length(p);
- q = zeros(m,1);
- % Compute BH threshold-adjusted values
- for i = 1:m
- q(i) = p_sorted(i) * m / i;
- end
- % Ensure monotonicity
- q = cummin(flipud(q));
- q = flipud(q);
- q(q>1) = 1;
- % Return p-values in original order
- p_fdr = zeros(m,1);
- p_fdr(idx) = q;
- end
CuePLV_slidingcombined.m, no license · at the source
Overview
- Departments of Psychology, University of Wisconsin–Madison, Madison, Wisconsin 53706-1611
- Psychiatry, University of Wisconsin–Madison, Madison, Wisconsin 53706-1611
Abstract
The flexible control of working memory (WM) requires prioritizing immediately task-relevant information while maintaining information with potential future relevance in a deprioritized state. Using double-serial retrocuing (DSR) with simultaneous EEG recording, we investigated how single pulses of transcranial magnetic stimulation (spTMS) to right intraparietal sulcus impacts neural representations of unprioritized memory items (UMI), relative to irrelevant memory items (IMI) that are no longer needed for the trial. Twelve human participants (8 female) performed DSR plus a single-retrocue task, while spTMS was delivered during delay periods. Multivariate pattern analysis revealed that spTMS restored decodability of the UMI concurrent with stimulation and that of the IMI several timesteps later, after the evoked effects of spTMS were no longer present in the EEG signal. This effect was carried by the alpha (8–13 Hz) and low-beta (13–20 Hz) frequency bands. Analyses of the raw EEG signal showed two effects selective to the epoch containing the UMI: the retrocue and spTMS each produced phase shifts in the low-beta band. These findings demonstrate that deprioritization involves active neural mechanisms distinct from the processing of the IMI and that these are supported by low-beta oscillatory dynamics in parietal cortex. We hypothesize that the mechanism underlying spTMS-triggered involuntary retrieval of the UMI is the disruption of the encoding of priority status, which may depend on oscillatory dynamics in the low-beta band.
Reproduced under the paper's license (CC BY), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above, with 9 matches between paragraphs and lines of code.
OSF wnt6q
Availability: 1 check, the latest on 30 September 2026: the link answers (HTTP 200)
- 30 September 2026: the link answers (HTTP 200)
12 files
- MVPA/
MVPAPlotting/ , MATLAB, 388 linesMVPALight_plotting_1D_no lures.m - MVPA/
MVPAPlotting/ , MATLAB, 388 linesMVPALight_plotting_1D_no lures_freqs.m - MVPA/
MVPAPlotting/ , MATLAB, 610 linesMVPALight_plotting_2D_no lures.m - MVPA/
MVPAPlotting/ , MATLAB, 609 linesMVPALight_plotting_2D_no lures_freqs.m - MVPA/
MVPAcode/ , MATLAB, 166 lines, 1 matchMVPALight_HTC_DSRfullspl it.m - MVPA/
MVPAcode/ , MATLAB, 151 linesMVPALight_HTC_DSRfullspl itD2.m - MVPA/
MVPAcode/ , MATLAB, 154 linesMVPALight_HTC_DSRfullspl itD2_freqs.m - MVPA/
MVPAcode/ , MATLAB, 167 linesMVPALight_HTC_DSRfullspl it_freqs.m - MVPA/
MVPAcode/ , MATLAB, 168 lines, 1 matchMVPALight_HTC_SRfullspli t.m - MVPA/
MVPAcode/ , MATLAB, 168 linesMVPALight_HTC_SRfullspli t_freqs.m - Phase Analyses/
CuePLV_slidingcombined.m , MATLAB, 531 lines, 4 matches - Phase Analyses/
TMSPLV_slidingcombined.m , MATLAB, 1,056 lines, 3 matches
Code accessibility
The code/
Reproduced under the paper's license (CC BY), from the paper cited above.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 12 scripts, each with its path and the digest of its content;
- 9 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
No dataset and no data link were found in the paper.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 30 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 2 authors, 6 keywords, 10 MeSH terms, 1 funder, 46 references.
Cite
This paper
Fulvio, J. M., & Postle, B. R. (2026). Effects of TMS on the Decoding and Electrophysiology of Priority in Working Memory. eNeuro, 13(4), ENEURO.0346-25.2026. https://
BibTeX
@article{fulvio2026effec
author = {Fulvio, Jacqueline M and Postle, Bradley R},
title = {{Effects of TMS on the Decoding and Electrophysiology of Priority in Working Memory}},
journal = {eNeuro},
year = {2026},
month = apr,
volume = {13},
number = {4},
pages = {ENEURO.0346--25.2026},
publisher = {Society for Neuroscience},
issn = {2373-2822},
doi = {10.1523/
url = {https://
pmid = {41956898},
pmcid = {PMC13120838}
}
RIS
TY - JOUR
AU - Fulvio, Jacqueline M
AU - Postle, Bradley R
TI - Effects of TMS on the Decoding and Electrophysiology of Priority in Working Memory
T2 - eNeuro
J2 - eNeuro
PY - 2026
DA - 2026/
VL - 13
IS - 4
SP - ENEURO.0346
EP - 25.2026
SN - 2373-2822
PB - Society for Neuroscience
DO - 10.1523/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1523/
"type": "article-journal",
"title": "Effects of TMS on the Decoding and Electrophysiology of Priority in Working Memory",
"container-title": "eNeuro",
"author": [
{
"family": "Fulvio",
"given": "Jacqueline M"
},
{
"family": "Postle",
"given": "Bradley R"
}
],
"container-title-short":
"volume": "13",
"issue": "4",
"page": "ENEURO.0346-25.2026",
"DOI": "10.1523/
"PMID": "41956898",
"PMCID": "PMC13120838",
"ISSN": "2373-2822",
"publisher": "Society for Neuroscience",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
27
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1162/imag.a.1199 [code]
- Sustained alpha oscillations serve attentional prioritization in working memory, not maintenance.Journal: Imaging neuroscience (Cambridge, Mass.)In common: CircStat, FieldTrip, Signal Processing Toolbox, 1 other tool, EEG, cognitive, 8 references
- [2] doi:10.1038/s41467-026-73553-8 [code]
- Universal rhythmic architecture uncovers two modes of neural dynamics.Journal: Nature communicationsIn common: FieldTrip, Signal Processing Toolbox, Statistics and Machine Learning Toolbox, EEG, 4 references
- [3] doi:10.1371/journal.pbio.3003938 [code]
- Theta oscillations tag episodic memories for sleep-dependent consolidation.Journal: PLoS biologyIn common: CircStat, FieldTrip, Signal Processing Toolbox, 1 other tool, EEG, cognitive, 2 references
- [4] doi:10.1111/psyp.70271 [code]
- Disentangling Respiratory Phase-Dependent and Phase-Independent Components of Anticipatory Cardiac Deceleration.Journal: PsychophysiologyIn common: CircStat, FieldTrip, Signal Processing Toolbox, 1 other tool, other, EEG, cognitive, 2 references
- [5] doi:10.1186/s12915-026-02630-7 [code]
- Phasic modulation of attentional rhythmic sampling according to task demands.Journal: BMC biologyIn common: CircStat, FieldTrip, Statistics and Machine Learning Toolbox, EEG, cognitive, 3 references
- [6] doi:10.1038/s42003-026-10071-9 [code]
- Alpha phase coding supports feature binding during working memory maintenance.Journal: Communications biologyIn common: cognitive, 5 references
- [7] doi:10.1371/journal.pbio.3003740 [code]
- Sleep strengthens successor representations of learned sequences in humans.Journal: PLoS biologyIn common: CircStat, FieldTrip, Statistics and Machine Learning Toolbox, EEG, cognitive, 2 references
- [8] doi:10.1016/j.isci.2026.116601 [code]
- Random auditory stimulation during sleep disturbs traveling slow waves and declarative memory.Journal: iScienceIn common: CircStat, FieldTrip, Signal Processing Toolbox, 1 other tool, cognitive, 2 references
- [9] doi:10.1523/eneuro.0076-26.2026 [code]
- Exogenously Driven Neural Reactivation of Spatially Matching Visual Working-Memory Contents.Journal: eNeuroIn common: FieldTrip, Statistics and Machine Learning Toolbox, EEG, cognitive, 3 references
- [10] doi:10.1523/jneurosci.0154-26.2026 [code]
- Faster but less precise: expectation enhances response speed while reducing sensory fidelity.Journal: The Journal of neuroscience : the official journal of the Society for NeuroscienceIn common: CircStat, Signal Processing Toolbox, Statistics and Machine Learning Toolbox, EEG, cognitive, 2 references
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 12 scripts, and 9 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:7d805a752f9f0412…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[.
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
