Neural mechanisms of time-forward predictions for naturalistic auditory tone sequences.
The 26 matches · 2 of them tie a paragraph to a whole file, not to given lines: weak matches, whose lines are not tinted
- [1] § Methods › Directed connectivity analysis with Granger causality ↔ AnalysisCode/Analysis_and_Plotting/Connectivity/NASTD_ECoG_Connectivity_Main_lk.m, lines 996–1094 · score 0.88 · IFC ventral, dlPFC, auditory hierarchy, auditory cortex, BA, Brodmann
- [2] § Results › Changes in directed connectivity during sequence processing and sensory prediction ↔ AnalysisCode/Analysis_and_Plotting/Connectivity/NASTD_ECoG_Connectivity_Main_lk.m, lines 996–1094 · score 0.83 · dlPFC, Brodmann area, auditory hierarchy, auditory cortex, IPL, IFC
- [3] § Methods › iEEG data preprocessing ↔ AnalysisCode/Analysis_and_Plotting/Prediction/Helper Functions/NASTD_ECoG_Predict_CompPredp33_Subs_ManualArtifactCorrection.m, lines 43–149 · score 0.82 · Hilbert transform, amplitude envelop, baseline corrected, FieldTrip, smoothed, artifacts
- [4] § Methods › iEEG data preprocessing ↔ AnalysisCode/Preprocessing/IED_detector_rev3.7.2014/spike_detector_hilbert_v16_byISARG.m, lines 1–84 · score 0.79 · interictal epileptiform discharges, frequency bands, Hilbert, Butterworth, algorithm, IED
- [5] § Methods › Directed connectivity analysis with Granger causality ↔ AnalysisCode/Analysis_and_Plotting/Connectivity/HelperFunctions/NASTD_ECoG_Connectivity_CalculateGC_oldoption.m, lines 394–533 · score 0.76 · median model, Granger Causality, full model, selected model, pairwise, electrode pair
- [6] § Methods › iEEG data preprocessing ↔ AnalysisCode/Preprocessing/IED_detector_rev3.7.2014/spike_detector_hilbert_v16_byISARG.m, lines 1–84 · score 0.72 · interictal epileptiform discharges, detection, segments, algorithm, events, IEDs
- [7] § Methods › iEEG data preprocessing ↔ AnalysisCode/Preprocessing/NASTD_ECoG_Preproc_Main.m, lines 254–317 · score 0.65 · Heartbeat related artifacts, algorithm, ECG, pulse, phase, thresholding
- [8] § Methods › Neural correlates of sensory history integration (SHI) ↔ AnalysisCode/Analysis_and_Plotting/HistoryTracking/HelperFunctions/NASTD_ECoG_HisTrack_CombineExpKvals.m, lines 118–169 · score 0.63 · cross validation, Model selection, fold, squared, regression, winning
- [9] § Methods › Neural correlates of sensory history integration (SHI) ↔ AnalysisCode/Analysis_and_Plotting/HistoryTracking/HelperFunctions/NASTD_ECoG_HisTrack_CompExpKvals.m, lines 525–591 · score 0.63 · cross validation, Model selection, fold, squared, regression, winning
- [10] § Results › Changes in directed connectivity during sequence processing and sensory prediction ↔ AnalysisCode/Analysis_and_Plotting/Connectivity/HelperFunctions/NASTD_ECoG_Connectivity_CalculateGC_oldoption.m, lines 394–533 · score 0.61 · frequency domain GC, Granger causality, selected electrodes, pairwise, electrode pair, spectral
- [11] § Results › Paradigm and experimental design ↔ ParadigmCode/sfa_expt4_makeTrainingStim.m, lines 70–109 · score 0.61 · 220–880 Hz, penultimate tone, unique sequences, 220 Hz, semitones, tone pitch
- [12] § Results › Paradigm and experimental design ↔ ParadigmCode/sfa_expt4_makeStim.m, lines 11–115 · score 0.61 · 220–880 Hz, penultimate tone, unique sequences, 220 Hz, semitones, tone pitch
- [13] § Methods › Directed connectivity analysis with Granger causality ↔ AnalysisCode/Analysis_and_Plotting/Connectivity/HelperFunctions/NASTD_ECoG_Connectivity_PlotSignElecCon_AllSubTDLobes.m, lines 1640–1726 · score 0.60 · frontal parietal, parietal temporal, frontal temporal, lobes, prediction error, electrode pairs
- [14] § Methods › iEEG data preprocessing ↔ AnalysisCode/Preprocessing/NASTD_ECoG_Preproc_Main.m, lines 254–317 · score 0.60 · phase shift, pass filter, Butterworth, zero, block, preprocessing
- [15] § Methods › iEEG data preprocessing ↔ AnalysisCode/Preprocessing/NASTD_ECoG_Preproc_SubPreprocSettings.m, lines 412–483 · score 0.60 · band stop, pass filter, lying, noise, block, preprocessing
- [16] § Results › Neural correlates of tone sequence tracking ↔ AnalysisCode/Analysis_and_Plotting/StimulusCorrelation/NASTD_ECoG_StimCorr_Main_lk.m, lines 100–164 · score 0.58 · amplitude envelopes, range activity, high gamma, field, ERF, MEG
- [17] § Results › Neural correlates of tone sequence tracking ↔ AnalysisCode/Analysis_and_Plotting/Prediction/NASTD_ECoG_Predict_Main_lk.m, lines 119–216 · score 0.58 · amplitude envelopes, range activity, high gamma, field, ERF, MEG
- [18] § Methods › Paradigm and experimental setup ↔ ParadigmCode/sfa_expt4_getParamsTraining.m, the whole file · a weak match · score 0.57 · fixation point, instructed, keyboard, laptop, training, window
- [19] § Methods › Neural correlates of tone sequence tracking ↔ AnalysisCode/Analysis_and_Plotting/Prediction/NASTD_ECoG_Predict_Main_lk.m, lines 119–216 · score 0.55 · amplitude envelops, frequency band, high gamma, tone sequence, beta, alpha
- [20] § Methods › Neural correlates of prediction and prediction error ↔ AnalysisCode/Analysis_and_Plotting/Prediction/Helper Functions/NASTD_ECoG_Predict_CompPred_Sample_Subs_FTPL.m, lines 133–189 · score 0.55 · Temporal clusters, linear regressions, prediction error, permutation, shuffling, tone duration
- [21] § Methods › Directed connectivity analysis with Granger causality ↔ AnalysisCode/Analysis_and_Plotting/Connectivity/HelperFunctions/NASTD_ECoG_Connectivity_CalculateGC_pertone.m, lines 510–565 · score 0.53 · Granger Causality, full model, pairwise, connectivity, tone
- [22] § Methods › Paradigm and experimental setup ↔ ParadigmCode/sfa_expt4_getParams.m, the whole file · a weak match · score 0.52 · fixation point, keyboard, laptop, feedback, window, Paradigm
- [23] § Results › Changes in directed connectivity during sequence processing and sensory prediction ↔ AnalysisCode/Analysis_and_Plotting/Connectivity/HelperFunctions/NASTD_ECoG_Connectivity_PlotGC_statp1top31_acrossTDs+seqs.m, lines 1–71 · score 0.52 · linear fit, PE Pred, slopes, electrode pairing, broadband, lobe
- [24] § Results › Changes in directed connectivity during sequence processing and sensory prediction ↔ AnalysisCode/Analysis_and_Plotting/Connectivity/HelperFunctions/NASTD_ECoG_Connectivity_PlotGC_statp1top31_acrossTDs+seqs_alltones.m, lines 1–66 · score 0.52 · linear fit, PE Pred, slopes, electrode pairing, broadband, lobe
- [25] § Results › Changes in directed connectivity during sequence processing and sensory prediction ↔ AnalysisCode/Analysis_and_Plotting/Connectivity/NASTD_ECoG_Connectivity_Main_lk.m, lines 102–163 · score 0.52 · Granger causality, S2, ECoG, high gamma, lobe, parietal
- [26] § Methods › Experimental stimuli ↔ ParadigmCode/sfa_expt4_makeStim.m, lines 11–115 · score 0.51 · 220–880 Hz, 220 Hz, semitone, distance, log, pitches
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 · 1,208 lines · 52 KB · no license · 3 matches
- %% Project: NASTD_ECoG
- %Compute Granger Causality (GC) directed connectivity measures to
- %determine:
- %1) the interplay between frontal and temporal prediction effect electrodes (time-wise GC in the HP2-LP30Hz band)
- %2) the interplay between frontal and temporal complex prediciton error (PE) effect eletrodes (frequency-wise GC in the high gamma band)
- %3) the interplay between frontal prediction and temporal PE effect electrodes
- %4) the interplay between global SHI and prediciton effect electrodes
- %% 0.1) Specify vars, paths, and setup fieldtrip
- addpath('/isilon/LFMI/VMdrive/Thomas/NaturalisticAuditorySequences_ToneDuration(NAS_TD)/ECoG/')
- %Add project base path
- NASTD_ECoG_setVars
- paths_NASTD_ECoG = NASTD_ECoG_paths;
- % addpath(genpath(paths_NASTD_ECoG.BaseDir));
- addpath(genpath(paths_NASTD_ECoG.ScriptsDir));
- %Add project base and script dir
- %Determine subjects
- sub_list = vars.sub_list;
- %Load in file with individual preproc infos
- subs_PreProcSettings = NASTD_ECoG_Preproc_SubPreprocSettings;
- ToneDur_text = {'0.2' '0.4'};
- plot_poststepFigs = 0;
- save_poststepFigs = 1;
- %% 1) Select and plot electrodes for which GC will be analyzed
- param.pval_plotting = 0.01; %Pval thresh for plotting
- param.pval_FDR = 0.05;
- param.FDRcorrect = 0;
- param.plot_SubplotperTW = 1; %Common plot across TW
- param.ElecSelect = 'All'; %StimCorr, All
- param.SamplesTW = 25; %25 = 50ms TW
- param.Label_TW = num2str(round(param.SamplesTW/512,2));
- param.ToneIndex = 33;
- InputDataType = {'HP05toLP30Hz'};
- InputEffectType = {'PredEffect', 'ComplexPredErrEffect'};
- ToneDur_text = {'0.2' '0.4'};
- subs = sub_list(vars.validSubjs);
- %1.1 Highlight same-subject electrodes with selected p-value for either prediciton OR complex prediction error effect
- % for i_effect = 1:length(InputEffectType)
- % for i_inputData = 1:length(InputDataType)
- % NASTD_ECoG_Connectivity_PlotSignElec_AllSubTD...
- % (subs, ...
- % InputEffectType{i_effect}, InputDataType{i_inputData}, ToneDur_text, ...
- % param,...
- % save_poststepFigs, paths_NASTD_ECoG)
- % end
- % end
- % %1.2 Highlight same-subject electrodes with selected p-value
- % %with prediciton (for HP2toLP30Hz) AND complex prediction error (for HighGamma_LogAmp) effect
- % NASTD_ECoG_Connectivity_PlotSignElecPred2PE_AllSubTD...
- % (subs, ...
- % ToneDur_text, ...
- % param,...
- % save_poststepFigs, paths_NASTD_ECoG)
- % %1.3 Create output file specifiying selected electrodes
- subs = sub_list(vars.validSubjs);
- plot_poststepFigs = 0;
- param.pval_plotting = 0.05; %Pval thresh
- param.FDRcorrect = 0;
- param.pval_FDR = 0.05;
- param.ElecSelect = 'All'; %StimCorr, All
- InputDataType = {'HP05toLP30Hz'};%, 'HighGamma_LogAmp'};
- %Effect-based p-val thresholded electrode selection
- % SelElecs = NASTD_ECoG_Connectivity_ReadOutGCElecs_AllSubTD...
- % (subs, ...
- % InputDataType, ToneDur_text, ...
- % param, plot_poststepFigs, ...
- % paths_NASTD_ECoG);
- % %%Select all existing electrodes (independent of effect or threshold)
- % SelElecs = NASTD_ECoG_Connectivity_ReadOutAllElecs_AllSubTD...
- % (subs, ...
- % plot_poststepFigs, ...
- % paths_NASTD_ECoG);
- %1.5 Create Plot showing electrode connections that are the basis for GC calculation
- %Across subjects and TD, color-coded for region, sign-coded for prediction-effect-type.
- %Plot separately for each electrode-selection based on different prediction-effect-types.
- % NASTD_ECoG_Connectivity_PlotSignElecConnectionsforGC_AllSubTD...
- % (subs, ...
- % InputDataType, ToneDur_text, ...
- % param, plot_poststepFigs, ...
- % paths_NASTD_ECoG);
- %
- % NASTD_ECoG_Connectivity_PlotSignElecCon_AllSubTDLobes... %For Pred-Pred & PE-PE, all lobes together with optional connection lines
- % (subs, ...
- % InputDataType, ToneDur_text, ...
- % param, plot_poststepFigs, ...
- % paths_NASTD_ECoG);
- %% 2) Compute Granger Causality (GC) for specific electrode combinations
- %Hypotheses:
- %Spatial:
- %Frontal P -> Temporal P > Chance
- %Temporal PE -> Frontal PE > Chance (CAVE: few frontal PE)
- %Frontal P -> Temporal PE > Frontal P <- Temporal PE
- %Temporal:
- %P -> PE electrodes stronger in earlier TW compared to late TW
- %P -> PE electrodes stronger in earlier TW compared to P <- PE electrodes
- %Spectral:
- %P -> PE: low frequencies (alpha/beta)
- %P <- PE: high gamma
- %P -> P: low frequencies (alpha/beta)
- %PE -> PE: high gamma
- addpath('/isilon/LFMI/VMdrive/Thomas/toolboxes/mvgc_v1.3/');
- % load('/isilon/LFMI/VMdrive/Thomas//NaturalisticAuditorySequences_ToneDuration(NAS_TD)/ECoG/Analysis/Connectivity/ElecSelect/Allsub_n9/SelElecs_p0.01uncorr.mat') %p < 0.01 thresh,uncorr elec selection
- load('/isilon/LFMI/VMdrive/Thomas//NaturalisticAuditorySequences_ToneDuration(NAS_TD)/ECoG/Analysis/Connectivity/ElecSelect/Allsub_n9/SelElecs_p0.05uncorr.mat') %p < 0.05 thresh,uncorr elec selection
- % load('/isilon/LFMI/VMdrive/Thomas//NaturalisticAuditorySequences_ToneDuration(NAS_TD)/ECoG/Analysis/Connectivity/ElecSelect/Allsub_n9/SelElecs_p0.025FDRcorr.mat') %p < 0.025 thresh, FDRcorr elec selection
- % load('/isilon/LFMI/VMdrive/Thomas//NaturalisticAuditorySequences_ToneDuration(NAS_TD)/ECoG/Analysis/Connectivity/ElecSelect/Allsub_n9/SelElecs_AllElecs.mat') % no thresh, all elec selection
- % load('/isilon/LFMI/VMdrive/Thomas//NaturalisticAuditorySequences_ToneDuration(NAS_TD)/ECoG/Analysis/Connectivity/ElecSelect/Allsub_n9/SelElecs_p0.05uncorr_HighGamma.mat') %p < 0.05 thresh,uncorr elec selection
- % load('/isilon/LFMI/VMdrive/Thomas//NaturalisticAuditorySequences_ToneDuration(NAS_TD)/ECoG/Analysis/Connectivity/ElecSelect/Allsub_n9/SelElecs_p0.01uncorr_HighGamma.mat') %p < 0.05 thresh,uncorr elec selection
- % Computing how many significant electrodes per lobe (frontal, parietal, and temporal) and prediction vs. PE effect for Table S2
- % Define keywords for each lobe
- % frontalKeywords = ["AntPFC", "PrecentralG", "IFG"];
- % parietalKeywords = ["SupParLob", "PostcentralG", "SupramarginalG"];
- % temporalKeywords = ["VentralT", "STG", "MTG"];
- %
- % % Extract AnatCat Label column
- % predLabels = SelElecs.PredEffect.("AnatCat Label");
- % predLabelsStr = string(predLabels);
- % predLabelsStr(contains(predLabelsStr, "OccipitalL")) = []; % Remove entries containing "OccipitalL"
- % [uniqueLabels1, ~, idx1] = unique(predLabelsStr);
- % counts1 = accumarray(idx1, 1);
- % PredlabelCountsTable = table(uniqueLabels1, counts1, 'VariableNames', {'Label', 'Count'});
- %
- % peLabels = SelElecs.PEEffect.("AnatCat Label");
- % peLabelsStr = string(peLabels);
- % peLabelsStr(contains(peLabelsStr, "OccipitalL")) = []; % Remove entries containing "OccipitalL"
- % [uniqueLabels2, ~, idx2] = unique(peLabelsStr);
- % counts2 = accumarray(idx2, 1);
- % PElabelCountsTable = table(uniqueLabels2, counts2, 'VariableNames', {'Label', 'Count'});
- %
- % countLobes = @(data, keywords) sum(any(contains(data, keywords), 2));
- %
- % % Count electrodes per lobe for each effect using the strict word-boundary matching
- % frontalPredCount = countLobes(predLabelsStr, frontalKeywords);
- % parietalPredCount = countLobes(predLabelsStr, parietalKeywords);
- % temporalPredCount = countLobes(predLabelsStr, temporalKeywords);
- %
- % frontalPECount = countLobes(peLabelsStr, frontalKeywords);
- % parietalPECount = countLobes(peLabelsStr, parietalKeywords);
- % temporalPECount = countLobes(peLabelsStr, temporalKeywords);
- %
- % % Create the output table
- % LobeSummaryTable = table(["Frontal"; "Parietal"; "Temporal"], ...
- % [frontalPredCount; parietalPredCount; temporalPredCount], ...
- % [frontalPECount; parietalPECount; temporalPECount], ...
- % 'VariableNames', {'Lobe', 'PredCount', 'PECount'});
- % writetable(LobeSummaryTable, ['/isilon/LFMI/VMdrive/Lua/NASTD/Figures/ElectrodeCountsPerLobe.csv']);
- %% Compute GC
- param.GC = [];
- param.GC.fs = 512;
- param.GC.downsample = 0; %Cave: Downsampling lead to problems with tone sample selection
- if param.GC.downsample == 0
- param.GC.newfs = param.GC.fs;
- else
- param.GC.newfs = param.GC.fs/param.GC.downsample;
- end
- param.GC.nvars = 2;
- param.GC.regmode = 'OLS'; % VAR model estimation regression mode ('OLS', 'LWR' or empty for default
- param.GC.maxmorder = 50; % maximum model order for model order estimation, rule of thumb = number of samples per input data snippet, but not > 100
- % param.GC.morder = 'AIC'; % model order to use ('actual', 'AIC', 'BIC' or supplied numerical value)
- param.GC.tstat = 'F'; % statistical test for MVGC: 'F' for Granger's F-test (default) or 'chi2' for Geweke's chi2 test
- param.GC.alpha = 0.05; % significance level for significance test
- param.GC.mhtc = 'FDRD'; % multiple hypothesis test correction (see routine 'significance')
- param.GC.ElecPairEffect = {'Pred_Pred','PE_PE','Pred_PE','PE_Pred'};
- %param.GC.ElecPairEffect = {'Pred_Pred', 'PE_PE'};
- %param.GC.ElecPairEffect = {'Pred_PE', 'PE_Pred'};
- param.GC.ElecPairRegion = 'AllRegions';
- param.GC.InputDataType = {'Broadband'}; %{'Broadband', 'HP05toLP30Hz', 'HighGamma_LogAmp'};
- % param.GC.tone_aggregation = {32, 33, 34};
- % param.GC.tone_aggregation = {31, 33, 34};
- %param.GC.tone_aggregation = {1, 6, 11, 16, 21, 26, 31};
- %param.GC.tone_aggregation = {2, 7, 12, 17, 22, 27, 32};
- % param.GC.tone_aggregation = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32};
- % param.GC.tone_aggregation = {30, 31, 32};
- %param.GC.tone_aggregation = {30, 31, 32, 33, 34};
- param.GC.tone_aggregation = {34};
- param.GC.tone_aggregation_label = cellfun(@(c)[c],param.GC.tone_aggregation);
- param.GC.tone_aggregation_label = num2str((param.GC.tone_aggregation_label),'_%d');
- param.GC.tone_aggregation_label = erase(param.GC.tone_aggregation_label, ' ');
- param.GC.epochdur_ms = 'full'; %'full', 200, 100
- if strcmp(param.GC.epochdur_ms, 'full')
- param.GC.epochdur_ms_label = 'fullTW';
- else
- param.GC.epochdur_ms_label = [num2str(param.GC.epochdur_ms) 'msTW'];
- end
- % Across-trial GC estimates
- % parfor i_sub = vars.validSubjs
- %
- % tic
- % GCdata{i_sub} = ... %Compute GC for aggregated tones
- % NASTD_ECoG_Connectivity_CalculateGC_aggrtone ...
- % (sub_list, i_sub, ...
- % ToneDur_text, SelElecs, ...
- % param, paths_NASTD_ECoG);
- % GCdata{i_sub} = ... %Compute GC for each single tone
- % NASTD_ECoG_Connectivity_CalculateGC_pertone ...
- % (sub_list, i_sub, ...
- % ToneDur_text, SelElecs, ...
- % param, paths_NASTD_ECoG);
- % disp(['-- GC computation for sub: ' sub_list{i_sub} ' finished after ' num2str(round(toc/60),2) ' min --'])
- %
- % end
- %save output
- % path_outputdata = ([paths_NASTD_ECoG.ECoGdata_Connectivity 'GC/']);
- % if (~exist(path_outputdata, 'dir')); mkdir(path_outputdata); end
- % label_outputdata = ['GCdata_n' num2str(length(vars.validSubjs)) '_' ...
- % param.GC.ElecPairRegion '_' ...
- % param.GC.InputDataType{1} param.GC.tone_aggregation_label '_' ...
- % param.GC.epochdur_ms_label '_ensemnorm'];
- % %save([path_outputdata label_outputdata], 'GCdata','-v7.3')
- % load([path_outputdata label_outputdata], 'GCdata')
- % Across-trial GC estimates for selected trial IDs
- FTPL_ratings = load([paths_NASTD_ECoG.Analysis_Behavior 'FTPLratings/Allsub_n8/Data/', 'Trialwise_FTPL_allsubs.mat']);
- FTPL_ratings = FTPL_ratings.Trialwise_FTPL;
- rows_all = strcmp(FTPL_ratings.ToneDur, 'all'); %Take ratings across both TD conditions
- FTPL_all = FTPL_ratings(rows_all, :);
- sub_list_FTPL = sub_list(2:9);
- % Averaging over trialwise data for low-FTPL trials and for high-FTPL
- % trials
- low_FTPL_all = {};
- high_FTPL_all = {};
- for i_sub = 1:length(sub_list_FTPL)
- current_subID = sub_list_FTPL(i_sub);
- % Find all rows in FTPL_all for this subject
- subj_rows = strcmp(FTPL_all.SubID, current_subID);
- % Get the FTPL ratings for this subject
- ratings_subj = FTPL_all.FTPLrating(subj_rows);
- median_subj = median(ratings_subj, 'omitnan');
- % Create logical indices for low and high FTPL relative to
- % subject-specific median of ratings
- low_idx = ratings_subj < median_subj;
- low_idx = FTPL_all.TrialNum(low_idx); % TrialIDs for low FTPL
- low_FTPL_all{i_sub} = low_idx;
- high_idx = ratings_subj > median_subj;
- high_idx = FTPL_all.TrialNum(high_idx);
- high_FTPL_all{i_sub} = high_idx;
- end
- path_outputdata = ([paths_NASTD_ECoG.ECoGdata_Connectivity 'GC/']);
- % parfor i_sub = vars.validSubjs(2:9)
- % tic
- % GCdata_lowFTPL{i_sub} = ... %Compute GC for aggregated tones
- % NASTD_ECoG_Connectivity_CalculateGC_aggrtone_SelTrials ...
- % (sub_list, i_sub, ...
- % ToneDur_text, SelElecs, ...
- % low_FTPL_all{i_sub-1}, ...
- % param, paths_NASTD_ECoG);
- % disp(['-- GC computation for sub: ' sub_list{i_sub} ' for LOW FTPL finished after ' num2str(round(toc/60),2) ' min --'])
- % GCdata_highFTPL{i_sub} = ... %Compute GC for aggregated tones
- % NASTD_ECoG_Connectivity_CalculateGC_aggrtone_SelTrials ...
- % (sub_list, i_sub, ...
- % ToneDur_text, SelElecs, ...
- % high_FTPL_all{i_sub-1}, ...
- % param, paths_NASTD_ECoG);
- % disp(['-- GC computation for sub: ' sub_list{i_sub} ' for LOW FTPL finished after ' num2str(round(toc/60),2) ' min --'])
- % end
- label_outputdata1 = ['GCdata_n' num2str(length(vars.validSubjs)) '_' ...
- param.GC.ElecPairRegion '_' ...
- param.GC.InputDataType{1} param.GC.tone_aggregation_label '_' ...
- param.GC.epochdur_ms_label '_lowFTPL'];
- %save([path_outputdata label_outputdata1], 'GCdata_lowFTPL','-v7.3')
- GCdata_lowFTPL=load([path_outputdata label_outputdata1]);
- label_outputdata2 = ['GCdata_n' num2str(length(vars.validSubjs)) '_' ...
- param.GC.ElecPairRegion '_' ...
- param.GC.InputDataType{1} param.GC.tone_aggregation_label '_' ...
- param.GC.epochdur_ms_label '_highFTPL'];
- %save([path_outputdata label_outputdata2], 'GCdata_highFTPL','-v7.3')
- GCdata_highFTPL = load([path_outputdata label_outputdata2]);
- % Trialwise GC estimates
- % parfor i_sub = vars.validSubjs
- %
- % tic
- % GCdata{i_sub} = ... %Compute GC for each single tone and for each trial; used for control analysis checking how GC values differ for different trial-wise FTPL ratings; only run for tone 34
- % NASTD_ECoG_Connectivity_CalculateGC_aggrtone_trialwise ...
- % (sub_list, i_sub, ...
- % ToneDur_text, SelElecs, ...
- % param, paths_NASTD_ECoG);
- % disp(['-- GC computation for sub: ' sub_list{i_sub} ' finished after ' num2str(round(toc/60),2) ' min --'])
- %
- % end
- %save output
- % path_outputdata = ([paths_NASTD_ECoG.ECoGdata_Connectivity 'GC/']);
- % if (~exist(path_outputdata, 'dir')); mkdir(path_outputdata); end
- % label_outputdata = ['GCdata_n' num2str(length(vars.validSubjs)) '_' ...
- % param.GC.ElecPairRegion '_' ...
- % param.GC.InputDataType{1} param.GC.tone_aggregation_label '_' ...
- % param.GC.epochdur_ms_label '_trialwise_ensemnorm'];
- % %save([path_outputdata label_outputdata], 'GCdata','-v7.3')
- % load([path_outputdata label_outputdata], 'GCdata')
- %% Compare GC values for low vs. high FTPL ratings for parietal -> frontal during p34 using trialwise data
- %First make a GCdata for low FTPL ratings, average across trials,NASTD_ECoG_Connectivity_stat save GC.
- %Do the same for high FTP ratings, average across trials, save GC.
- %Pass both averaged GC through anatomical averaging script (NASTD_ECoG_Connectivity_PlotGC_statp32p33p34.m in Thomas' folder)
- % This will output 10 (source anat regions) x 10 (target anat regions) x 2
- % (TDs) arrays for the low-FTPL-GC and the high-FTPL-GC. Then we can select
- % parietal to frontal by indexing source anat region = 7 and target anat
- % region = 1 for each of them, and do the stats.
- % GCdata_FTPL = GCdata(2:9);
- % numSubjects = length(GCdata_FTPL);
- % FTPL_ratings = load([paths_NASTD_ECoG.Analysis_Behavior 'FTPLratings/Allsub_n8/Data/', 'Trialwise_FTPL_allsubs.mat']);
- % FTPL_ratings = FTPL_ratings.Trialwise_FTPL;
- % rows_all = strcmp(FTPL_ratings.ToneDur, 'all'); %Take ratings across both TD conditions
- % FTPL_all = FTPL_ratings(rows_all, :);
- % all_trialIDs = cell(numSubjects, 1);
- % for i_sub = 1:numSubjects
- % % Combine trial IDs across tone durations (1x2 cell)
- % all_trialIDs{i_sub} = [GCdata{i_sub}.info.trialIDs{1}; GCdata{i_sub}.info.trialIDs{2}];
- % end
- % sub_list_FTPL = sub_list(2:9);
- %
- % % Averaging over trialwise data for low-FTPL trials and for high-FTPL
- % % trials
- % for i_sub = 1:numSubjects
- % current_subID = sub_list_FTPL(i_sub);
- %
- % % Find all rows in FTPL_all for this subject
- % subj_rows = strcmp(FTPL_all.SubID, current_subID);
- %
- % % Get the FTPL ratings for this subject
- % ratings_subj = FTPL_all.FTPLrating(subj_rows);
- % median_subj = median(ratings_subj, 'omitnan');
- % trialIDs_subj = all_trialIDs{i_sub};
- %
- % % Create logical indices for low and high FTPL relative to
- % % subject-specific median of ratings
- % low_idx = ratings_subj < median_subj;
- % low_idx = FTPL_all.TrialNum(low_idx); % TrialIDs for low FTPL
- %
- % high_idx = ratings_subj > median_subj;
- % high_idx = FTPL_all.TrialNum(high_idx);
- %
- % % Find the Trial IDs for the GC data
- % trialIDs_GC_TD1 = GCdata_FTPL{i_sub}.info.trialIDs{1}; %Trial IDs of GC data for TD1
- % trialIDs_GC_TD2 = GCdata_FTPL{i_sub}.info.trialIDs{2}; %Trial IDs for GC data for TD2
- %
- % % Identify corresponding trials in GC data for low and high FTPL
- % % ratings
- % [~,match_idx_low_TD1] = ismember(low_idx, trialIDs_GC_TD1); % Finds corresponding trials in the GC data for TD1
- % idx_low_in_GC_TD1 = match_idx_low_TD1(match_idx_low_TD1 > 0);
- % [~, match_idx_low_TD2] = ismember(low_idx, trialIDs_GC_TD2); % Finds corresponding trials in the GC data for TD2
- % idx_low_in_GC_TD2 = match_idx_low_TD2(match_idx_low_TD2 > 0);
- %
- % [~, match_idx_high_TD1] = ismember(high_idx, trialIDs_GC_TD1); % Finds corresponding trials in the GC data for TD1
- % idx_high_in_GC_TD1 = match_idx_high_TD1(match_idx_high_TD1 > 0);
- % [~, match_idx_high_TD2] = ismember(high_idx, trialIDs_GC_TD2); % Finds corresponding trials in the GC data for TD2
- % idx_high_in_GC_TD2 = match_idx_high_TD2(match_idx_high_TD2 > 0);
- %
- % for i_effect = 1:length(GCdata_FTPL{i_sub}.temporalGC)
- % for i_TD = 1:length(GCdata_FTPL{i_sub}.temporalGC{i_effect})
- % if i_TD == 1
- % idx_low_in_GC = idx_low_in_GC_TD1;
- % idx_high_in_GC = idx_high_in_GC_TD1;
- % else
- % idx_low_in_GC = idx_low_in_GC_TD2;
- % idx_high_in_GC = idx_high_in_GC_TD2;
- % end
- %
- % % === TEMPORAL GC ===
- % temp_struct = GCdata_FTPL{i_sub}.temporalGC{i_effect}{i_TD};
- % GCdata_average_lowFTPL{i_sub}.temporalGC{i_effect}{i_TD}.source2target = ...
- % mean(temp_struct.source2target(:,:,:,idx_low_in_GC), 4, 'omitnan');
- % GCdata_average_lowFTPL{i_sub}.temporalGC{i_effect}{i_TD}.target2source = ...
- % mean(temp_struct.target2source(:,:,:,idx_low_in_GC), 4, 'omitnan');
- %
- % GCdata_average_highFTPL{i_sub}.temporalGC{i_effect}{i_TD}.source2target = ...
- % mean(temp_struct.source2target(:,:,:,idx_high_in_GC), 4, 'omitnan');
- % GCdata_average_highFTPL{i_sub}.temporalGC{i_effect}{i_TD}.target2source = ...
- % mean(temp_struct.target2source(:,:,:,idx_high_in_GC), 4, 'omitnan');
- %
- % % === PVAL TEMPORAL GC ===
- % pval_struct = GCdata_FTPL{i_sub}.pval_temporalGC{i_effect}{i_TD};
- % GCdata_average_lowFTPL{i_sub}.pval_temporalGC{i_effect}{i_TD}.source2target = ...
- % mean(pval_struct.source2target(:,:,:,idx_low_in_GC), 4, 'omitnan');
- % GCdata_average_lowFTPL{i_sub}.pval_temporalGC{i_effect}{i_TD}.target2source = ...
- % mean(pval_struct.target2source(:,:,:,idx_low_in_GC), 4, 'omitnan');
- %
- % GCdata_average_highFTPL{i_sub}.pval_temporalGC{i_effect}{i_TD}.source2target = ...
- % mean(pval_struct.source2target(:,:,:,idx_high_in_GC), 4, 'omitnan');
- % GCdata_average_highFTPL{i_sub}.pval_temporalGC{i_effect}{i_TD}.target2source = ...
- % mean(pval_struct.target2source(:,:,:,idx_high_in_GC), 4, 'omitnan');
- %
- % % === SPECTRAL GC ===
- % spec_struct = GCdata_FTPL{i_sub}.spectralGC{i_effect}{i_TD};
- % GCdata_average_lowFTPL{i_sub}.spectralGC{i_effect}{i_TD}.source2target = ...
- % mean(spec_struct.source2target(:,:,:,:,idx_low_in_GC), 5, 'omitnan');
- % GCdata_average_lowFTPL{i_sub}.spectralGC{i_effect}{i_TD}.target2source = ...
- % mean(spec_struct.target2source(:,:,:,:,idx_low_in_GC), 5, 'omitnan');
- %
- % GCdata_average_highFTPL{i_sub}.spectralGC{i_effect}{i_TD}.source2target = ...
- % mean(spec_struct.source2target(:,:,:,:,idx_high_in_GC), 5, 'omitnan');
- % GCdata_average_highFTPL{i_sub}.spectralGC{i_effect}{i_TD}.target2source = ...
- % mean(spec_struct.target2source(:,:,:,:,idx_high_in_GC), 5, 'omitnan');
- % end
- % end
- % GCdata_average_lowFTPL{i_sub}.info = GCdata_FTPL{i_sub}.info;
- % GCdata_average_lowFTPL{i_sub}.label_allelecs = GCdata_FTPL{i_sub}.label_allelecs;
- % GCdata_average_lowFTPL{i_sub}.ind_pairedelecs_from = GCdata_FTPL{i_sub}.ind_pairedelecs_from;
- % GCdata_average_lowFTPL{i_sub}.ind_pairedelecs_to = GCdata_FTPL{i_sub}.ind_pairedelecs_to;
- %
- % GCdata_average_highFTPL{i_sub}.info = GCdata_FTPL{i_sub}.info;
- % GCdata_average_highFTPL{i_sub}.label_allelecs = GCdata_FTPL{i_sub}.label_allelecs;
- % GCdata_average_highFTPL{i_sub}.ind_pairedelecs_from = GCdata_FTPL{i_sub}.ind_pairedelecs_from;
- % GCdata_average_highFTPL{i_sub}.ind_pairedelecs_to = GCdata_FTPL{i_sub}.ind_pairedelecs_to;
- % end
- % AnatReg_CatLabels = ... %Select which anatomical regions should be plotted
- % {'AntPFC'; ...
- % 'VentralT'; ...
- % 'SupParLob'};
- %
- % Gavg_tempGC_peranatreg_lowFTPL = NASTD_ECoG_Connectivity_ObtainGCByAnatRegions ...
- % (sub_list_FTPL, ...
- % GCdata_average_lowFTPL, ...
- % ToneDur_text, ...
- % SelElecs, AnatReg_CatLabels, ...
- % save_poststepFigs, ...
- % param, paths_NASTD_ECoG); %This will have the format, for each field, of i_effect cells, with format nSourceElecs x nTargetElecs x nTD
- %
- % Gavg_tempGC_peranatreg_highFTPL = NASTD_ECoG_Connectivity_ObtainGCByAnatRegions ...
- % (sub_list_FTPL, ...
- % GCdata_average_highFTPL, ...
- % ToneDur_text, ...
- % SelElecs, AnatReg_CatLabels, ...
- % save_poststepFigs, ...
- % param, paths_NASTD_ECoG); %This will have the format, for each field, of i_effect cells, with format nSourceElecs x nTargetElecs x nTD
- % Compute GC low vs high FTPL for Parietal > Frontal
- %
- % index_of_interest_source = 7; %Parietal
- % index_of_interest_target = 1; %Frontal
- %
- % GC_Par_to_Front_lowFTPL = nan(numSubjects, 1); % one entry per subject
- % GC_Par_to_Front_highFTPL = nan(numSubjects, 1); % one entry per subject
- %
- % GC_Par_to_Front_lowFTPL_all = {}; % Pool across 4 different effect types, average across TDs
- % GC_Par_to_Front_highFTPL_all = {};
- %
- % for i_sub = 1:numSubjects
- % all_GC_rows_low = [];
- % all_GC_rows_high = [];
- %
- % for i_effect = 1:length(GCdata_FTPL{i_sub}.temporalGC)
- % for i_TD = 1:length(GCdata_FTPL{i_sub}.temporalGC{i_effect})
- % % Get data and subject indices for this effect and TD
- % GCvals_low = Gavg_tempGC_peranatreg_lowFTPL.source2target{i_effect}{index_of_interest_source, index_of_interest_target, i_TD};
- % subjIDs_low = Gavg_tempGC_peranatreg_lowFTPL.subject_index{i_effect}{index_of_interest_source, index_of_interest_target, i_TD};
- %
- % if ~isempty(GCvals_low) && ~isempty(subjIDs_low)
- % % Find rows belonging to this subject
- % rows_low = find(subjIDs_low == i_sub);
- % if ~isempty(rows_low)
- % all_GC_rows_low = [all_GC_rows_low; GCvals_low(rows_low, :)];
- % end
- % end
- %
- % % Get data and subject indices for this effect and TD
- % GCvals_high = Gavg_tempGC_peranatreg_highFTPL.source2target{i_effect}{index_of_interest_source, index_of_interest_target, i_TD};
- % subjIDs_high = Gavg_tempGC_peranatreg_highFTPL.subject_index{i_effect}{index_of_interest_source, index_of_interest_target, i_TD};
- %
- % if ~isempty(GCvals_high) && ~isempty(subjIDs_high)
- % % Find rows belonging to this subject
- % rows_high = find(subjIDs_high == i_sub);
- % if ~isempty(rows_high)
- % all_GC_rows_high = [all_GC_rows_high; GCvals_high(rows_high, :)];
- % end
- % end
- % end
- % end
- %
- % if ~isempty(all_GC_rows_low)
- % GC_Par_to_Front_lowFTPL(i_sub,1) = mean(all_GC_rows_low, 1, 'omitnan');
- % else
- % GC_Par_to_Front_lowFTPL(i_sub,1) = NaN; % or [] if you prefer
- % end
- %
- % if ~isempty(all_GC_rows_high)
- % GC_Par_to_Front_highFTPL(i_sub,1) = mean(all_GC_rows_high, 1, 'omitnan');
- % else
- % GC_Par_to_Front_highFTPL(i_sub,1) = NaN; % or [] if you prefer
- % end
- % end
- %
- % % Do stats
- % [~, pval, ~, stats] = ttest(GC_Par_to_Front_lowFTPL, GC_Par_to_Front_highFTPL);
- % [pval, h, stats] = signrank(GC_Par_to_Front_lowFTPL, GC_Par_to_Front_highFTPL);
- %
- % % Plot
- % % Combine data
- % % all_data = [GC_Par_to_Front_lowFTPL(:); GC_Par_to_Front_highFTPL(:)];
- % % group = [ones(length(GC_Par_to_Front_lowFTPL),1); 2*ones(length(GC_Par_to_Front_highFTPL),1)];
- % all_data = [GC_Par_to_Front_lowFTPL(:); mean(GC_Par_to_Front_lowFTPL); GC_Par_to_Front_highFTPL(:); mean(GC_Par_to_Front_highFTPL)];
- % group = [ones(length(GC_Par_to_Front_lowFTPL)+1,1); 2*ones(length(GC_Par_to_Front_highFTPL)+1,1)];
- %
- % % Create boxplot
- % figure; hold on;
- % h = boxplot(all_data, group, 'Labels', {'Low FTPL', 'High FTPL'}, ...
- % 'Colors', 'k', 'Widths', 0.5);
- %
- % % Change box colors
- % boxColors = [0.2 0.6 1; 1 0.4 0.4]; % Blue, Red
- % boxes = findobj(gca, 'Tag', 'Box');
- % for j = 1:length(boxes)
- % patch(get(boxes(j), 'XData'), get(boxes(j), 'YData'), ...
- % boxColors(3-j,:), 'FaceAlpha', 0.5, 'EdgeColor', 'none');
- % end
- %
- % % Overlay paired data
- % for i = 1:length(GC_Par_to_Front_lowFTPL)
- % plot([1, 2], [GC_Par_to_Front_lowFTPL(i), GC_Par_to_Front_highFTPL(i)], '-o', ...
- % 'Color', [0.6 0.6 0.6], ...
- % 'MarkerFaceColor', 'k', ...
- % 'MarkerEdgeColor', 'none', ...
- % 'LineWidth', 1.2);
- % end
- %
- % plot([1, 2], [mean(GC_Par_to_Front_lowFTPL), mean(GC_Par_to_Front_highFTPL)], '-o', ...
- % 'Color', [0.6 0.6 0.6], ...
- % 'MarkerFaceColor', 'k', ...
- % 'MarkerEdgeColor', 'none', ...
- % 'LineWidth', 1.2);
- %
- % % Significance annotation
- % [~, pval] = ttest(GC_Par_to_Front_lowFTPL, GC_Par_to_Front_highFTPL);
- % y_max = max([GC_Par_to_Front_lowFTPL(:); GC_Par_to_Front_highFTPL(:)]) + 0.01;
- % plot([1, 2], [y_max, y_max], 'k', 'LineWidth', 1.5)
- %
- % if pval < 0.001
- % sig_label = '***';
- % elseif pval < 0.01
- % sig_label = '**';
- % elseif pval < 0.05
- % sig_label = '*';
- % else
- % sig_label = 'n.s.';
- % end
- % text(1.5, y_max + 0.005, sig_label, ...
- % 'FontSize', 16, ...
- % 'FontWeight', 'bold', ...
- % 'HorizontalAlignment', 'center');
- %
- % % Formatting
- % title('GC during p34 Parietal > Frontal');
- % ylabel('Average GC');
- % ylim([min([GC_Par_to_Front_lowFTPL; GC_Par_to_Front_highFTPL]) - 0.01, y_max + 0.02]);
- % set(gca, 'FontSize', 12);
- % box on;
- %
- % filename = ['boxplot_compare_GC_lowhigh_FTPL_Par_to_Front.png'];
- % figfile = ['/isilon/LFMI/VMdrive/Lua/NASTD/Figures/' filename];
- % saveas(gcf, figfile, 'png');
- %
- %
- % %% Computing stats for FTPL low vs high GC comparison across pairs from different effect-type pairings using TRIALWISE data
- % % Compute GC low vs high FTPL for Parietal > Frontal
- %
- % index_of_interest_source = 7; %Parietal
- % index_of_interest_target = 1; %Frontal
- % effectTypeNames = {'Pred_Pred','PE_PE','Pred_PE','PE_Pred'};
- %
- % GC_Par_to_Front_HighMinusLow = struct(); % Final output
- %
- % for i_effect = 1:length(GCdata_FTPL{1}.temporalGC)
- % effect_field = effectTypeNames{i_effect};
- % for i_TD = 1:length(GCdata_FTPL{1}.temporalGC{1})
- % if ~isfield(GC_Par_to_Front_HighMinusLow, effect_field)
- % GC_Par_to_Front_HighMinusLow.(effect_field) = struct();
- % end
- % if ~isfield(GC_Par_to_Front_HighMinusLow.(effect_field), sprintf('TD_%d', i_TD))
- % GC_Par_to_Front_HighMinusLow.(effect_field).(sprintf('TD_%d', i_TD)) = [];
- % end
- %
- % pooled_diffs = []; % temporary holder for this TD across all subjects
- %
- % for i_sub = 1:numSubjects
- % % LOW
- % GCvals_low = Gavg_tempGC_peranatreg_lowFTPL.source2target{i_effect}{index_of_interest_source, index_of_interest_target, i_TD};
- % subjIDs_low = Gavg_tempGC_peranatreg_lowFTPL.subject_index{i_effect}{index_of_interest_source, index_of_interest_target, i_TD};
- %
- % if ~isempty(GCvals_low) && ~isempty(subjIDs_low)
- % rows_low = (subjIDs_low == i_sub);
- % GC_low = GCvals_low(rows_low, :);
- % else
- % GC_low = NaN;
- % end
- %
- % % HIGH
- % GCvals_high = Gavg_tempGC_peranatreg_highFTPL.source2target{i_effect}{index_of_interest_source, index_of_interest_target, i_TD};
- % subjIDs_high = Gavg_tempGC_peranatreg_highFTPL.subject_index{i_effect}{index_of_interest_source, index_of_interest_target, i_TD};
- %
- % if ~isempty(GCvals_high) && ~isempty(subjIDs_high)
- % rows_high = (subjIDs_high == i_sub);
- % GC_high = GCvals_high(rows_high, :);
- % else
- % GC_high = NaN;
- % end
- %
- % if ~isempty(GC_low) && ~isempty(GC_high)
- % n_rows = min(size(GC_low,1), size(GC_high,1));
- % GC_diff = GC_high(1:n_rows, :) - GC_low(1:n_rows, :); % pairwise subtraction
- % pooled_diffs = [pooled_diffs; GC_diff]; % append
- % end
- % end
- % GC_Par_to_Front_HighMinusLow.(effect_field).(sprintf('TD_%d', i_TD)) = pooled_diffs;
- % end
- % end
- %
- % % Average across TDs
- % GC_all = cell(1, length(effectTypeNames));
- % pvals = zeros(1, length(effectTypeNames));
- % numEffects = numel(effectTypeNames);
- %
- % % Prepare data
- % for i = 1:length(effectTypeNames)
- % data_TD1 = GC_Par_to_Front_HighMinusLow.(effectTypeNames{i}).TD_1;
- % data_TD2 = GC_Par_to_Front_HighMinusLow.(effectTypeNames{i}).TD_2;
- %
- % % Average across TDs
- % avgData = mean([data_TD1(:), data_TD2(:)], 2, 'omitnan');
- % GC_all{i} = avgData;
- %
- % % t-test against zero
- % [~, p] = ttest(avgData);
- % pvals(i) = p;
- % end
- %
- % % Plot
- % effectNames_plot = {'Pred --> Pred', 'PE --> PE', 'Pred --> PE', 'PE --> Pred'};
- % figure; hold on; box on;
- % colors = lines(numEffects); % distinct colors for each cloud
- % rng(0); % for reproducible jitter
- %
- % for i = 1:numEffects
- % x = i + (rand(size(GC_all{i})) - 0.5) * 0.4; % add jitter
- % scatter(x, GC_all{i}, 25, ...
- % 'MarkerFaceColor', colors(i,:), ...
- % 'MarkerEdgeColor', 'k', ...
- % 'MarkerFaceAlpha', 0.6, ...
- % 'MarkerEdgeAlpha', 0.6);
- % end
- %
- % % Formatting
- % xlim([0.5, numEffects + 0.5]);
- % xticks(1:numEffects);
- % xticklabels(effectNames_plot);
- % xtickangle(20);
- % ylabel('GC Difference (High FTPL − Low FTPL)');
- % yline(0, '--k', 'LineWidth', 1);
- %
- % % Add exact p-values above each scatter cloud
- % yl = ylim;
- % extra_space = 0.1 * range(yl); % 10% extra space
- % ylim([yl(1) + 2 * extra_space, yl(2) + extra_space]);
- %
- % % Update y-limit variable for use in placing the p-values
- % yl = ylim;
- % text_y = yl(2) - 0.05 * range(yl);
- % for i = 1:numEffects
- % text(i, text_y, sprintf('p = %.3g', pvals(i)), ...
- % 'HorizontalAlignment', 'center', ...
- % 'FontSize', 11, 'FontWeight', 'bold');
- % end
- %
- % % Save figure
- % set(gcf, 'Color', 'w');
- %
- %
- % filename = ['boxplot_compare_GC_lowhigh_FTPL_Par_to_Front_allpairs.png'];
- % figfile = ['/isilon/LFMI/VMdrive/Lua/NASTD/Figures/' filename];
- % saveas(gcf, figfile, 'png');
- %
- %% Computing stats for FTPL low vs high GC comparison across pairs from different effect-type pairings using AVERAGED data
- % Compute GC low vs high FTPL for Parietal > Frontal
- AnatReg_CatLabels = ... %Select which anatomical regions should be plotted
- {'AntPFC'; ...
- 'VentralT'; ...
- 'SupParLob'};
- sub_list_FTPL = sub_list(2:9);
- Gavg_tempGC_peranatreg_lowFTPL = NASTD_ECoG_Connectivity_ObtainGCByAnatRegions ...
- (sub_list_FTPL, ...
- GCdata_lowFTPL.GCdata_lowFTPL(2:9), ...
- ToneDur_text, ...
- SelElecs, AnatReg_CatLabels, ...
- save_poststepFigs, ...
- param, paths_NASTD_ECoG); %This will have the format, for each field, of i_effect cells, with format nSourceElecs x nTargetElecs x nTD
- Gavg_tempGC_peranatreg_highFTPL = NASTD_ECoG_Connectivity_ObtainGCByAnatRegions ...
- (sub_list_FTPL, ...
- GCdata_highFTPL.GCdata_highFTPL(2:9), ...
- ToneDur_text, ...
- SelElecs, AnatReg_CatLabels, ...
- save_poststepFigs, ...
- param, paths_NASTD_ECoG); %This will have the format, for each field, of i_effect cells, with format nSourceElecs x nTargetElecs x nTD
- index_of_interest_source = 7; %Parietal
- index_of_interest_target = 1; %Frontal
- effectTypeNames = {'Pred_Pred','PE_PE','Pred_PE','PE_Pred'};
- GC_Par_to_Front_HighMinusLow = struct(); % Final output
- for i_effect = 1:length(GCdata_lowFTPL.GCdata_lowFTPL{2}.temporalGC)
- effect_field = effectTypeNames{i_effect};
- for i_TD = 1:length(GCdata_lowFTPL.GCdata_lowFTPL{2}.temporalGC{1})
- if ~isfield(GC_Par_to_Front_HighMinusLow, effect_field)
- GC_Par_to_Front_HighMinusLow.(effect_field) = struct();
- end
- if ~isfield(GC_Par_to_Front_HighMinusLow.(effect_field), sprintf('TD_%d', i_TD))
- GC_Par_to_Front_HighMinusLow.(effect_field).(sprintf('TD_%d', i_TD)) = [];
- end
- pooled_diffs = []; % temporary holder for this TD across all subjects
- for i_sub = 1:8
- % LOW
- GCvals_low = Gavg_tempGC_peranatreg_lowFTPL.source2target{i_effect}{index_of_interest_source, index_of_interest_target, i_TD};
- subjIDs_low = Gavg_tempGC_peranatreg_lowFTPL.subject_index{i_effect}{index_of_interest_source, index_of_interest_target, i_TD};
- if ~isempty(GCvals_low) && ~isempty(subjIDs_low)
- rows_low = (subjIDs_low == i_sub);
- GC_low = GCvals_low(rows_low, :);
- else
- GC_low = NaN;
- end
- % HIGH
- GCvals_high = Gavg_tempGC_peranatreg_highFTPL.source2target{i_effect}{index_of_interest_source, index_of_interest_target, i_TD};
- subjIDs_high = Gavg_tempGC_peranatreg_highFTPL.subject_index{i_effect}{index_of_interest_source, index_of_interest_target, i_TD};
- if ~isempty(GCvals_high) && ~isempty(subjIDs_high)
- rows_high = (subjIDs_high == i_sub);
- GC_high = GCvals_high(rows_high, :);
- else
- GC_high = NaN;
- end
- if ~isempty(GC_low) && ~isempty(GC_high)
- n_rows = min(size(GC_low,1), size(GC_high,1));
- GC_diff = GC_high(1:n_rows, :) - GC_low(1:n_rows, :); % pairwise subtraction
- pooled_diffs = [pooled_diffs; GC_diff]; % append
- end
- end
- GC_Par_to_Front_HighMinusLow.(effect_field).(sprintf('TD_%d', i_TD)) = pooled_diffs;
- end
- end
- % Average across TDs
- GC_all = cell(1, length(effectTypeNames));
- pvals = zeros(1, length(effectTypeNames));
- numEffects = numel(effectTypeNames);
- % Prepare data
- for i = 1:length(effectTypeNames)
- data_TD1 = GC_Par_to_Front_HighMinusLow.(effectTypeNames{i}).TD_1;
- data_TD2 = GC_Par_to_Front_HighMinusLow.(effectTypeNames{i}).TD_2;
- % Average across TDs
- minLen = min(numel(data_TD1), numel(data_TD2));
- avgData = mean([data_TD1(1:minLen), data_TD2(1:minLen)], 2, 'omitnan');
- GC_all{i} = avgData;
- % t-test against zero
- [~, p] = ttest(avgData);
- pvals(i) = p;
- end
- % Plot
- effectNames_plot = {'Pred --> Pred', 'PE --> PE', 'Pred --> PE', 'PE --> Pred'};
- figure; hold on; box on;
- colors = lines(numEffects);
- rng(0);
- % Prepare data for boxplot
- allData = [];
- groupData = [];
- for i = 1:numEffects
- allData = [allData; GC_all{i}(:)];
- groupData = [groupData; repmat(i, numel(GC_all{i}), 1)];
- end
- % Overlay scatter points (lower alpha)
- for i = 1:numEffects
- x = i + (rand(size(GC_all{i})) - 0.5) * 0.4;
- scatter(x, GC_all{i}, 25, ...
- 'MarkerFaceColor', colors(i,:), ...
- 'MarkerEdgeColor', 'k', ...
- 'MarkerFaceAlpha', 0.3, ...
- 'MarkerEdgeAlpha', 0.3);
- % Mean line
- m = mean(GC_all{i}, 'omitnan');
- plot([i-0.3, i+0.3], [m, m], 'Color', colors(i,:), 'LineWidth', 3);
- end
- % Formatting
- xlim([0.5, numEffects + 0.5]);
- xticks(1:numEffects);
- xticklabels(effectNames_plot);
- xtickangle(20);
- ylabel('GC Difference (High FTPL > Low FTPL)');
- yline(0, '--k', 'LineWidth', 1);
- % Add exact p-values or significance stars
- ylim([-0.01, 0.02]);
- yl = ylim;
- text_y = yl(2) - 0.05 * range(yl);
- for i = 1:numEffects
- if pvals(i) < 0.001
- sigLabel = '***';
- elseif pvals(i) < 0.01
- sigLabel = '**';
- elseif pvals(i) < 0.05
- sigLabel = '*';
- else
- sigLabel = sprintf('p=%.3g', pvals(i));
- end
- text(i, text_y, sigLabel, ...
- 'HorizontalAlignment', 'center', ...
- 'FontSize', 12, 'FontWeight', 'bold', 'Color', 'k');
- end
- set(gcf, 'Color', 'w');
- filename = ['boxplot_compare_GC_lowhigh_FTPL_Par_to_Front_allpairs_avgData.png'];
- figfile = ['/isilon/LFMI/VMdrive/Lua/NASTD/Figures/' filename];
- saveas(gcf, figfile, 'png');
- %% Plot GC results
- AnatReg_CatLabels = ... %Select which anatomical regions should be plotted
- {'AntPFC'; ...
- 'VentralT'; ...
- 'SupParLob'};
- % AnatReg_CatLabels = ... %Select which anatomical regions should be plotted
- % {'AntPFC_IFG'; 'AntPFC_PrecentralG'; ...
- % 'VentralT_STG'; 'VentralT_MTG'; ...
- % 'SupParLob_PostcentralG'; 'SupParLob_SupramarginalG'};
- % AnatReg_CatLabels = ... %Select which anatomical regions should be plotted
- % {'AntPFC'; 'AntPFC_IFG'; 'AntPFC_PrecentralG'; ...
- % 'VentralT'; 'VentralT_STG'; 'VentralT_MTG'; ...
- % 'SupParLob'; 'SupParLob_PostcentralG'; 'SupParLob_SupramarginalG'; ...
- % 'OccipitalL'};
- %Single subject per electrode pairing
- % NASTD_ECoG_Connectivity_PlotGC_persub_aggrtone ...
- % (sub_list(vars.validSubjs), ...
- % ToneDur_text, ...
- % save_poststepFigs, ...
- % param, paths_NASTD_ECoG);
- % NASTD_ECoG_Connectivity_PlotGC_persub_pertone ...
- % (sub_list(vars.validSubjs), ...
- % ToneDur_text, InputDataType, label_ElecPairSel, ...
- % save_poststepFigs, ...
- % paths_NASTD_ECoG);
- %Single subject aggregated GC results
- % NASTD_ECoG_Connectivity_PlotGC_persub_aggrtoneanat ...
- % (sub_list(vars.validSubjs), ...
- % ToneDur_text, SelElecs, AnatReg_CatLabels, ...
- % save_poststepFigs, ...
- % param, paths_NASTD_ECoG);
- %Plot group-level aggregated GC results
- % NASTD_ECoG_Connectivity_PlotGC_allsub_aggrtone ...
- % (sub_list(vars.validSubjs), ...
- % ToneDur_text, SelElecs, AnatReg_CatLabels, ...
- % save_poststepFigs, ...
- % param, paths_NASTD_ECoG);
- NASTD_ECoG_Connectivity_PlotGC_allsub_aggrtone_median ...
- (sub_list(vars.validSubjs), ...
- ToneDur_text, SelElecs, AnatReg_CatLabels, ...
- save_poststepFigs, ...
- param, paths_NASTD_ECoG);
- %Plot GC output with statistics
- if strcmp(param.GC.tone_aggregation_label,'_30_31_32_33_34')
- NASTD_ECoG_Connectivity_PlotGC_statp30top32_vs_p33p34_lk ...
- (sub_list(vars.validSubjs), ...
- ToneDur_text, SelElecs, AnatReg_CatLabels, ...
- save_poststepFigs, ...
- param, paths_NASTD_ECoG);
- else
- NASTD_ECoG_Connectivity_PlotGC_statp1top31 ...
- (sub_list(vars.validSubjs), ...
- ToneDur_text, SelElecs, AnatReg_CatLabels, ...
- save_poststepFigs, ...
- param, paths_NASTD_ECoG);
- end
- %% 3) Compute Granger Causality (GC) during p34 for different PE effects
- addpath('/isilon/LFMI/VMdrive/Thomas/toolboxes/mvgc_v1.3/');
- % load('/isilon/LFMI/VMdrive/Thomas//NaturalisticAuditorySequences_ToneDuration(NAS_TD)/ECoG/Analysis/Connectivity/ElecSelect/Allsub_n9/SelElecs_p0.01uncorr.mat') %p < 0.01 thresh,uncorr elec selection
- % load('/isilon/LFMI/VMdrive/Thomas//NaturalisticAuditorySequences_ToneDuration(NAS_TD)/ECoG/Analysis/Connectivity/ElecSelect/Allsub_n9/SelElecs_p0.05uncorr.mat') %p < 0.05 thresh,uncorr elec selection
- % load('/isilon/LFMI/VMdrive/Thomas//NaturalisticAuditorySequences_ToneDuration(NAS_TD)/ECoG/Analysis/Connectivity/ElecSelect/Allsub_n9/SelElecs_p0.025FDRcorr.mat') %p < 0.025 thresh, FDRcorr elec selection
- % load('/isilon/LFMI/VMdrive/Thomas//NaturalisticAuditorySequences_ToneDuration(NAS_TD)/ECoG/Analysis/Connectivity/ElecSelect/Allsub_n9/SelElecs_AllElecs.mat') % no thresh, all elec selection
- %%%load('/isilon/LFMI/VMdrive/Thomas//NaturalisticAuditorySequences_ToneDuration(NAS_TD)/ECoG/Analysis/Connectivity/ElecSelect/Allsub_n9/SelElecs_p0.05uncorr_HighGamma.mat') %p < 0.05 thresh,uncorr elec selection
- % load('/isilon/LFMI/VMdrive/Thomas//NaturalisticAuditorySequences_ToneDuration(NAS_TD)/ECoG/Analysis/Connectivity/ElecSelect/Allsub_n9/SelElecs_p0.01uncorr_HighGamma.mat') %p < 0.05 thresh,uncorr elec selection
- param.GC.fs = 512;
- param.GC.downsample = 0; %Cave: Downsampling lead to problems with tone sample selection
- if param.GC.downsample == 0
- param.GC.newfs = param.GC.fs;
- else
- param.GC.newfs = param.GC.fs/param.GC.downsample;
- end
- param.GC.nvars = 2;
- param.GC.regmode = 'OLS'; % VAR model estimation regression mode ('OLS', 'LWR' or empty for default
- param.GC.maxmorder = 50; % maximum model order for model order estimation, rule of thumb = number of samples per input data snippet, but not > 100
- param.GC.morder = 'AIC'; % model order to use ('actual', 'AIC', 'BIC' or supplied numerical value)
- param.GC.tstat = 'F'; % statistical test for MVGC: 'F' for Granger's F-test (default) or 'chi2' for Geweke's chi2 test
- param.GC.alpha = 0.05; % significance level for significance test
- param.GC.mhtc = 'FDRD'; % multiple hypothesis test correction (see routine 'significance')
- param.GC.ElecPairEffect = {'Pred_Pred','PE_PE','Pred_PE','PE_Pred'};
- param.GC.ElecPairRegion = 'AllRegions';
- param.GC.InputDataType = {'Broadband'}; %{'Broadband', 'HP05toLP30Hz', 'HighGamma_LogAmp'};
- param.GC.epochdur_ms = 'full'; %'full', 200, 100
- if strcmp(param.GC.epochdur_ms, 'full')
- param.GC.epochdur_ms_label = 'fullTW';
- else
- param.GC.epochdur_ms_label = [num2str(param.GC.epochdur_ms) 'msTW'];
- end
- for i_sub = vars.validSubjs
- tic
- GCdata{i_sub} = ...
- NASTD_ECoG_Connectivity_CalculateGC_PEeffect ...
- (sub_list, i_sub, ...
- ToneDur_text, SelElecs, ...
- param, paths_NASTD_ECoG);
- disp(['-- GC PE computation for sub: ' sub_list{i_sub} ' finished after ' num2str(round(toc/60),2) ' min --'])
- end
- %save output
- path_outputdata = ([paths_NASTD_ECoG.ECoGdata_Connectivity 'GC/PEeffect/']);
- if (~exist(path_outputdata, 'dir')); mkdir(path_outputdata); end
- label_outputdata = ['GCdataPEeffect_n' num2str(length(vars.validSubjs)) '_' ...
- param.GC.ElecPairRegion '_' ...
- param.GC.InputDataType{1} '_' ...
- param.GC.epochdur_ms_label '_ensemnorm'];
- save([path_outputdata label_outputdata], 'GCdata')
- % load([path_outputdata label_outputdata], 'GCdata')
- %Plot GC results
- AnatReg_CatLabels = ... %Select which anatomical regions should be plotted
- {'AntPFC'; ...
- 'VentralT'; ...
- 'SupParLob'};
- NASTD_ECoG_Connectivity_PlotGC_statPEeffect ...
- (sub_list(vars.validSubjs), ...
- ToneDur_text, SelElecs, AnatReg_CatLabels, ...
- save_poststepFigs, ...
- param, paths_NASTD_ECoG);
- %% 4) Plot and do statistics for electrode combinations between regions of the auditory hierarchy
- addpath('/isilon/LFMI/VMdrive/Lua/Temp2A/Temp2A_fMRI_pilot/toolboxes/spm12');
- load('/isilon/LFMI/VMdrive/Thomas//NaturalisticAuditorySequences_ToneDuration(NAS_TD)/ECoG/Analysis/Connectivity/ElecSelect/Allsub_n9/SelElecs_p0.05uncorr.mat') %p < 0.05 thresh,uncorr elec selection
- atlas_path = 'brodmann.nii';
- % Determine if any of the electrodes are located in one of the auditory
- % regions of interest
- % Classify each electrode as part of a Brodmann's area
- BA_areas_Pred = assign_BA_from_MNI(SelElecs.PredEffect.("Elec Coords"), atlas_path);
- BA_areas_PE = assign_BA_from_MNI(SelElecs.PEEffect.("Elec Coords"), atlas_path);
- % Define ROI map: Brodmann areas → auditory/cognitive labels
- roi_map = containers.Map( ...
- [41, 42, 44, 45, 8, 40, 6, 22], ...
- {'Auditory Cortex', ...
- 'Auditory Cortex', ...
- 'IFC Dorsal', ...
- 'IFC Ventral', ...
- 'dlPFC', ...
- 'IPL', ...
- 'PMC', ...
- 'STS'});
- % For Prediction electrodes
- roi_labels_pred = cell(size(BA_areas_Pred));
- for i = 1:length(BA_areas_Pred)
- roi_labels_pred{i} = get_roi_label(BA_areas_Pred(i), roi_map);
- end
- % For Prediction Error electrodes
- roi_labels_PE = cell(size(BA_areas_PE));
- for i = 1:length(BA_areas_PE)
- roi_labels_PE{i} = get_roi_label(BA_areas_PE(i), roi_map);
- end
- % Combine everything into one table
- SelElecs.PredEffect.BAlabel = roi_labels_pred;
- SelElecs.PEEffect.BAlabel = roi_labels_PE;
- % Also need to update SelElecs.Pairs for stats
- % === Update Pred_Pred with PredEffect ===
- predPairFields = fieldnames(SelElecs.Pairs.Pred_Pred.AllRegions.Pairs_perelec);
- predEffect = SelElecs.PredEffect;
- for i = 1:length(predPairFields)
- pairName = predPairFields{i};
- targetElecs = SelElecs.Pairs.Pred_Pred.AllRegions.Pairs_perelec.(pairName);
- BAlabels = cell(height(targetElecs), 1);
- for j = 1:height(targetElecs)
- elecLabel = targetElecs.("Electrode Label"){j};
- subjLabel = targetElecs.("Subject Label"){j};
- % Find matching row in PredEffect
- matchIdx = strcmp(predEffect{:,1}, elecLabel) & strcmp(predEffect{:,2}, subjLabel);
- if any(matchIdx)
- baLabel = predEffect{matchIdx,12}{1}; % Get BAlabel (12th column)
- else
- baLabel = 'NA';
- end
- BAlabels{j,1} = baLabel;
- end
- targetElecs.BAlabel = BAlabels; % Add as new column
- SelElecs.Pairs.Pred_Pred.AllRegions.Pairs_perelec.(pairName) = targetElecs; % Update
- end
- % === Update PE_PE with PEEffect ===
- pePairFields = fieldnames(SelElecs.Pairs.PE_PE.AllRegions.Pairs_perelec);
- peEffect = SelElecs.PEEffect;
- for i = 1:length(pePairFields)
- pairName = pePairFields{i};
- targetElecs = SelElecs.Pairs.PE_PE.AllRegions.Pairs_perelec.(pairName);
- BAlabels = cell(height(targetElecs), 1);
- for j = 1:height(targetElecs)
- elecLabel = targetElecs.("Electrode Label"){j};
- subjLabel = targetElecs.("Subject Label"){j};
- % Find matching row in PEEffect
- matchIdx = strcmp(peEffect{:,1}, elecLabel) & strcmp(peEffect{:,2}, subjLabel);
- if any(matchIdx)
- baLabel = peEffect{matchIdx,12}{1}; % Get BAlabel (12th column)
- else
- baLabel = 'NA';
- end
- BAlabels{j,1} = baLabel;
- end
- targetElecs.BAlabel = BAlabels; % Add as new column
- SelElecs.Pairs.PE_PE.AllRegions.Pairs_perelec.(pairName) = targetElecs; % Update
- end
- % Output a surface project of Brodmanns areas with only the desired ROIs
- % addpath '/isilon/LFMI/VMdrive/Lua/surfice_atlas-master'
- % desired_ROIs = [41, 42, 44, 45, 8, 40, 6, 22];
- % nii_nii2atlas_rois('brodmann.nii', 'mylut.lut', desired_ROIs);
- %% Extract GC values for each pair
- subs = sub_list(vars.validSubjs);
- param.GC = [];
- param.GC.fs = 512;
- param.GC.downsample = 0; %Cave: Downsampling lead to problems with tone sample selection
- if param.GC.downsample == 0
- param.GC.newfs = param.GC.fs;
- else
- param.GC.newfs = param.GC.fs/param.GC.downsample;
- end
- param.GC.nvars = 2;
- param.GC.regmode = 'OLS'; % VAR model estimation regression mode ('OLS', 'LWR' or empty for default
- param.GC.maxmorder = 50; % maximum model order for model order estimation, rule of thumb = number of samples per input data snippet, but not > 100
- % param.GC.morder = 'AIC'; % model order to use ('actual', 'AIC', 'BIC' or supplied numerical value)
- param.GC.tstat = 'F'; % statistical test for MVGC: 'F' for Granger's F-test (default) or 'chi2' for Geweke's chi2 test
- param.GC.alpha = 0.05; % significance level for significance test
- param.GC.mhtc = 'FDRD'; % multiple hypothesis test correction (see routine 'significance')
- %param.GC.ElecPairEffect = {'Pred_Pred','PE_PE','Pred_PE','PE_Pred'};
- param.GC.ElecPairEffect = {'Pred_Pred','PE_PE'};
- param.GC.ElecPairRegion = 'AllRegions';
- param.GC.InputDataType = {'Broadband'}; %{'Broadband', 'HP05toLP30Hz', 'HighGamma_LogAmp'};
- param.GC.tone_aggregation = {1, 6, 11, 16, 21, 26, 31};
- param.GC.tone_aggregation = {2, 7, 12, 17, 22, 27, 32};
- param.GC.tone_aggregation = {30, 31, 32, 33, 34};
- param.GC.tone_aggregation_label = cellfun(@(c)[c],param.GC.tone_aggregation);
- param.GC.tone_aggregation_label = num2str((param.GC.tone_aggregation_label),'_%d');
- param.GC.tone_aggregation_label = erase(param.GC.tone_aggregation_label, ' ');
- param.GC.epochdur_ms = 'full'; %'full', 200, 100
- if strcmp(param.GC.epochdur_ms, 'full')
- param.GC.epochdur_ms_label = 'fullTW';
- else
- param.GC.epochdur_ms_label = [num2str(param.GC.epochdur_ms) 'msTW'];
- end
- param.GC.ElecPairRegion = 'AllRegions';
- param.GC.InputDataType = {'Broadband'}; %{'Broadband', 'HP05toLP30Hz', 'HighGamma_LogAmp'};
- % Load in GC data
- path_outputdata = ([paths_NASTD_ECoG.ECoGdata_Connectivity 'GC/']);
- if (~exist(path_outputdata, 'dir')); mkdir(path_outputdata); end
- label_outputdata = ['GCdata_n' num2str(length(vars.validSubjs)) '_' ...
- param.GC.ElecPairRegion '_' ...
- param.GC.InputDataType{1} param.GC.tone_aggregation_label '_' ...
- param.GC.epochdur_ms_label '_ensemnorm'];
- load([path_outputdata label_outputdata], 'GCdata')
- %Add in BA label information to GCdata
- % for i_sub = vars.validSubjs
- % for i_effect = 1:2
- % % Assign labels that correspond to ind_pairedelecs_from
- % sub = subs(i_sub);
- % if i_effect == 1
- % effecttype = 'Pred';
- % else
- % effecttype = 'PE';
- % end
- % GCdata{i_sub}.BAlabels{i_effect} = MNI_coords_all.BAlabel(strcmp(MNI_coords_all.("Subject Label"), sub) & strcmp(MNI_coords_all.EffectType, effecttype),:);
- % end
- % end
- % Now the GC results also have the BA labels for auditory cortex
- %Plot GC results
- AnatReg_CatLabels = {'Auditory Cortex', ... %Select which anatomical regions should be plotted
- 'IFC Dorsal', ...
- 'IFC Ventral', ...
- 'dlPFC', ...
- 'IPL', ...
- 'PMC', ...
- 'STS'};
- %Extract GC per anat regions
- NASTD_ECoG_Connectivity_BAregions_lk ...
- (sub_list(vars.validSubjs), GCdata,...
- ToneDur_text, SelElecs, AnatReg_CatLabels, ...
- save_poststepFigs, ...
- param, paths_NASTD_ECoG);
- % GCdata = cell(1, 9); % Initialize output
- %
- % for i = 1:9
- % % Start from GCdata_T1 and overwrite the field we want to average
- % GCdata{i} = GCdata_T1{i};
- %
- % avg_tgc = cell(1, 4); % Correct shape: 1×4
- %
- % for j = 1:4
- % avg_tgc{j} = cell(1, 2); % Each is a 1×2 cell
- %
- % for k = 1:2
- % % Extract source2target matrices
- % mat1 = GCdata_T1{i}.temporalGC{j}{k}.source2target;
- % mat2 = GCdata_T2{i}.temporalGC{j}{k}.source2target;
- %
- % % Compute average
- % avg_mat = (mat1 + mat2) / 2;
- %
- % % Copy one struct and overwrite source2target with the average
- % avg_struct = GCdata_T1{i}.temporalGC{j}{k};
- % avg_struct.source2target = avg_mat;
- %
- % % Save back
- % avg_tgc{j}{k} = avg_struct;
- % end
- % end
- %
- % % Assign averaged temporalGC to output
- % GCdata{i}.temporalGC = avg_tgc;
- % end
NASTD_ECoG_Connectivity_Main_lk.m at commit 9cafa02, no license · at the source
Overview
- Neuroscience Institute, New York University Langone Health, New York, NY USA
- Institute of Clinical Neuroscience and Medical Psychology, Medical Faculty, Heinrich Heine University Düsseldorf, Düsseldorf, Germany
- Department of Neurology, New York University Langone Health, New York, NY USA
- Department of Biomedical Engineering, NYU Tandon School of Engineering, New York, NY USA
- Department of Neuroscience, New York University Langone Health, New York, NY USA
- Department of Radiology, New York University Langone Health, New York, NY USA
Abstract
The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.
Repository
Its files are read in the Code ↔ Paper reader above, with 26 matches between paragraphs and lines of code.
BiyuHeLab/TimeForwardPrediction_iEEG_Baumgarten_Koenig
9cafa02247de275fa5b20745e861a6cccaf1bab7, 29 May 2026Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
281 files
- AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 573 linesBehaviour/ NASTD_Behav_CompSavePlot _GroupAvg.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 792 linesBehaviour/ NASTD_Behav_CompSavePlot _Subs.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 441 linesBehaviour/ NASTD_Behav_Predeffect_G roup_lk.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 428 linesBehaviour/ NASTD_ECoG_Behav_ANOVAGr oupAvg.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 160 linesBehaviour/ NASTD_ECoG_Behav_Compare MEG2ECOG_FTPLeffects_His togram.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 409 linesBehaviour/ NASTD_ECoG_Behav_GroupSt at.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 41 linesBehaviour/ NASTD_ECoG_Behav_Readout SeqsandFTPL.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 1,386 linesConnectivity/ HelperFunctions/ NASTD_ECoG_Connectivity_ CalculateGC_PEeffect.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 837 linesConnectivity/ HelperFunctions/ NASTD_ECoG_Connectivity_ CalculateGC_aggrtone.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 855 linesConnectivity/ HelperFunctions/ NASTD_ECoG_Connectivity_ CalculateGC_aggrtone_Sel Trials.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 856 linesConnectivity/ HelperFunctions/ NASTD_ECoG_Connectivity_ CalculateGC_aggrtone_tri alwise.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 747 lines, 2 matchesConnectivity/ HelperFunctions/ NASTD_ECoG_Connectivity_ CalculateGC_oldoption.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 903 lines, 1 matchConnectivity/ HelperFunctions/ NASTD_ECoG_Connectivity_ CalculateGC_pertone.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 903 linesConnectivity/ HelperFunctions/ NASTD_ECoG_Connectivity_ CalculateGC_pertone_NAST D_ECoG_Connectivity_Calc ulateGC_pertone_trialwis e.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 926 linesConnectivity/ HelperFunctions/ NASTD_ECoG_Connectivity_ CalculateGC_pertone_tria lwise.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 1,671 linesConnectivity/ HelperFunctions/ NASTD_ECoG_Connectivity_ ObtainGCByAnatRegions.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 877 linesConnectivity/ HelperFunctions/ NASTD_ECoG_Connectivity_ PlotGC_allsub_aggrtone.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 1,773 linesConnectivity/ HelperFunctions/ NASTD_ECoG_Connectivity_ PlotGC_allsub_aggrtone_m edian.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 998 linesConnectivity/ HelperFunctions/ NASTD_ECoG_Connectivity_ PlotGC_allsub_aggrtone_o ld_3plottypes.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 514 linesConnectivity/ HelperFunctions/ NASTD_ECoG_Connectivity_ PlotGC_persub_aggrtone.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 438 linesConnectivity/ HelperFunctions/ NASTD_ECoG_Connectivity_ PlotGC_persub_aggrtone_a llconnections.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 621 linesConnectivity/ HelperFunctions/ NASTD_ECoG_Connectivity_ PlotGC_persub_aggrtonean at.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 400 linesConnectivity/ HelperFunctions/ NASTD_ECoG_Connectivity_ PlotGC_persub_pertone.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 2,761 linesConnectivity/ HelperFunctions/ NASTD_ECoG_Connectivity_ PlotGC_statPEeffect.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 1,501 linesConnectivity/ HelperFunctions/ NASTD_ECoG_Connectivity_ PlotGC_statp1top31.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 811 lines, 1 matchConnectivity/ HelperFunctions/ NASTD_ECoG_Connectivity_ PlotGC_statp1top31_acros sTDs+seqs.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 700 lines, 1 matchConnectivity/ HelperFunctions/ NASTD_ECoG_Connectivity_ PlotGC_statp1top31_acros sTDs+seqs_alltones.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 1,728 linesConnectivity/ HelperFunctions/ NASTD_ECoG_Connectivity_ PlotGC_statp30top32_vs_p 33p34_BAregions_lk.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 1,728 linesConnectivity/ HelperFunctions/ NASTD_ECoG_Connectivity_ PlotGC_statp30top32_vs_p 33p34_lk.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 1,670 linesConnectivity/ HelperFunctions/ NASTD_ECoG_Connectivity_ PlotGC_statp32p33p34.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 1,726 lines, 1 matchConnectivity/ HelperFunctions/ NASTD_ECoG_Connectivity_ PlotSignElecCon_AllSubTD Lobes.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 2,663 linesConnectivity/ HelperFunctions/ NASTD_ECoG_Connectivity_ PlotSignElecConnectionsf orGC_AllSubTD.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 760 linesConnectivity/ HelperFunctions/ NASTD_ECoG_Connectivity_ PlotSignElecPred2PE_AllS ubTD.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 510 linesConnectivity/ HelperFunctions/ NASTD_ECoG_Connectivity_ PlotSignElec_AllSubTD.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 801 linesConnectivity/ HelperFunctions/ NASTD_ECoG_Connectivity_ ReadOutAllElecs_AllSubTD .m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 2,044 linesConnectivity/ HelperFunctions/ NASTD_ECoG_Connectivity_ ReadOutGCElecs_AllSubTD. m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 1,861 linesConnectivity/ HelperFunctions/ NASTD_ECoG_Connectivity_ statp30to32_vs_p33p34_BA regions_lk.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 269 linesConnectivity/ HelperFunctions/ NASTD_ECoG_Plot_SubplotS ignElecsSurf_ColorAnatAl lLobes_LH_Pairs.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 183 linesConnectivity/ HelperFunctions/ NASTD_ECoG_Plot_SubplotS ignElecsSurf_Label_LH_Pa irs.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 191 linesConnectivity/ HelperFunctions/ NASTD_ECoG_Plot_SubplotS ignElecsSurf_Label_LH_Pa irs_lk.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 1,208 lines, 3 matchesConnectivity/ NASTD_ECoG_Connectivity_ Main_lk.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 811 linesConnectivity/ NASTD_ECoG_Connectivity_ PlotGC_statp1top31_acros sTDs+seqs.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 160 linesDataPrep/ NASTD_ECoG_AssignAnatReg ions.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 374 linesDataPrep/ NASTD_ECoG_FiltNaNinterp _AmpEnvel.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 374 linesDataPrep/ NASTD_ECoG_FiltNaNinterp _AmpEnvel_No100msWindow. m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 298 linesDataPrep/ NASTD_ECoG_FiltNaNinterp _HP01toLP30Hz.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 297 linesDataPrep/ NASTD_ECoG_FiltNaNinterp _HP05toLP150Hz.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 297 linesDataPrep/ NASTD_ECoG_FiltNaNinterp _HP05toLP30Hz.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 298 linesDataPrep/ NASTD_ECoG_FiltNaNinterp _HP1toLP30Hz.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 298 linesDataPrep/ NASTD_ECoG_FiltNaNinterp _HP2toLP30Hz.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 290 linesDataPrep/ NASTD_ECoG_FiltNaNinterp _LP35Hz.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 73 linesDataPrep/ NASTD_ECoG_FiltNaNinterp _RemoveNaNtrials.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 255 lines, 1 matchHistoryTracking/ HelperFunctions/ NASTD_ECoG_HisTrack_Comb ineExpKvals.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 456 linesHistoryTracking/ HelperFunctions/ NASTD_ECoG_HisTrack_Comb ineExpShuffK.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 271 linesHistoryTracking/ HelperFunctions/ NASTD_ECoG_HisTrack_Comb ineShuffKvals.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 688 lines, 1 matchHistoryTracking/ HelperFunctions/ NASTD_ECoG_HisTrack_Comp ExpKvals.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 882 linesHistoryTracking/ HelperFunctions/ NASTD_ECoG_HisTrack_Comp ExpKvals_MultiRun.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 756 linesHistoryTracking/ HelperFunctions/ NASTD_ECoG_HisTrack_Comp ShuffKvals.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 438 linesHistoryTracking/ HelperFunctions/ NASTD_ECoG_HisTrack_Extr actSignExpKvals_AllSubpe rTW_forTable.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 344 linesHistoryTracking/ HelperFunctions/ NASTD_ECoG_HisTrack_Plot ExpKvalsBothTD_AllSubper TW.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 279 linesHistoryTracking/ HelperFunctions/ NASTD_ECoG_HisTrack_Plot ExpKvalsBothTD_SsubperTW .m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 288 linesHistoryTracking/ HelperFunctions/ NASTD_ECoG_HisTrack_Plot ExpKvals_AllSubperTW.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 280 linesHistoryTracking/ HelperFunctions/ NASTD_ECoG_HisTrack_Plot ExpKvals_SsubperTW.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 178 linesHistoryTracking/ HelperFunctions/ NASTD_ECoG_HisTrack_Plot ExpKvals_SsubperTW_Oldfo r1run.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 409 linesHistoryTracking/ HelperFunctions/ NASTD_ECoG_HisTrack_Plot SignExpKvalsBothTD_AllSu bAvgTW.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 441 linesHistoryTracking/ HelperFunctions/ NASTD_ECoG_HisTrack_Plot SignExpKvalsBothTD_AllSu bAvgTW_EachTD.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 417 linesHistoryTracking/ HelperFunctions/ NASTD_ECoG_HisTrack_Plot SignExpKvalsBothTD_AllSu bperTW.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 313 linesHistoryTracking/ HelperFunctions/ NASTD_ECoG_HisTrack_Plot SignExpKvalsBothTD_AnatR eg_AllSubAllTW.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 1,245 linesHistoryTracking/ HelperFunctions/ NASTD_ECoG_HisTrack_Plot SignExpKvalsBothTD_AnatR eg_AllSubperTW.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 336 linesHistoryTracking/ HelperFunctions/ NASTD_ECoG_HisTrack_Plot SignExpKvalsBothTD_Ssubp erTW.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 438 linesHistoryTracking/ HelperFunctions/ NASTD_ECoG_HisTrack_Plot SignExpKvals_AllSubperTW .m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 401 linesHistoryTracking/ HelperFunctions/ NASTD_ECoG_HisTrack_Plot SignExpKvals_AllSubperTW _Backup.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 243 linesHistoryTracking/ HelperFunctions/ NASTD_ECoG_HisTrack_Plot SignExpKvals_AllSubperTW _Mov.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 438 linesHistoryTracking/ HelperFunctions/ NASTD_ECoG_HisTrack_Plot SignExpKvals_AllSubperTW _lk.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 459 linesHistoryTracking/ HelperFunctions/ NASTD_ECoG_HisTrack_Plot SignExpKvals_BySubjColor .m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 334 linesHistoryTracking/ HelperFunctions/ NASTD_ECoG_HisTrack_Plot SignExpKvals_SsubperTW.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 290 linesHistoryTracking/ HelperFunctions/ NASTD_ECoG_HisTrack_Plot SignExpKvals_StimCorrEle c_AllSubperTW.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 513 linesHistoryTracking/ NASTD_ECoG_HisTrack_Main _lk.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 78 linesPlotting/ HelperFunctions/ PlotEleconSurf_template. m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 28 linesPlotting/ HelperFunctions/ autumn_reversed.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 162 linesPlotting/ HelperFunctions/ barwitherr.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 28 linesPlotting/ HelperFunctions/ bone_reversed.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 200 linesPlotting/ HelperFunctions/ boxplotGroup.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 28 linesPlotting/ HelperFunctions/ copper_reversed.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 23 linesPlotting/ HelperFunctions/ fgn_pred.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 23 linesPlotting/ HelperFunctions/ figd.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 34 linesPlotting/ HelperFunctions/ hot_reversed.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 15 linesPlotting/ HelperFunctions/ nearestVertices.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 294 linesPlotting/ HelperFunctions/ parula_reversed.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 28 linesPlotting/ HelperFunctions/ pink_reversed.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 196 linesPlotting/ HelperFunctions/ shadedErrorBar.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 66 linesPlotting/ HelperFunctions/ tight_subplot.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 98 linesPlotting/ NASTD_ECoG_PlotGroup_Plo tAllElecs_MNIsurf.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 119 linesPlotting/ NASTD_ECoG_PlotGroup_Plo tAllElecs_MNIsurf_withSO Z.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 354 linesPlotting/ NASTD_ECoG_PlotGroup_Plo tSignEffectsAllElecs_MNI surf.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 90 linesPlotting/ NASTD_ECoG_Plot_PlotElec sSurf.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 144 linesPlotting/ NASTD_ECoG_Plot_PlotElec sSurf_SubplotHemis.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 117 linesPlotting/ NASTD_ECoG_Plot_PlotSign ElecsSurf.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 214 linesPlotting/ NASTD_ECoG_Plot_PlotSign ElecsSurf_SubplotHemis.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 89 linesPlotting/ NASTD_ECoG_Plot_SubplotE lecsSurf.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 157 linesPlotting/ NASTD_ECoG_Plot_SubplotE lecsSurf_SubplotHemis.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 134 linesPlotting/ NASTD_ECoG_Plot_SubplotS ignElecsSurf.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 184 linesPlotting/ NASTD_ECoG_Plot_SubplotS ignElecsSurf_ColorAnat_L H_Pairs.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 142 linesPlotting/ NASTD_ECoG_Plot_SubplotS ignElecsSurf_Label.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 142 linesPlotting/ NASTD_ECoG_Plot_SubplotS ignElecsSurf_Label_LH.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 167 linesPlotting/ NASTD_ECoG_Plot_SubplotS ignElecsSurf_Label_LH_Co nnect.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 246 linesPlotting/ NASTD_ECoG_Plot_SubplotS ignElecsSurf_Label_Subpl otHemis.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 231 linesPlotting/ NASTD_ECoG_Plot_SubplotS ignElecsSurf_SubplotHemi s.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 225 linesPlotting/ NASTD_ECoG_Plot_SubplotS ignElecsSurf_SubplotHemi s_avgTW.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 127 linesPlotting/ NASTD_ECoG_Plot_SubplotS ignElecsSurf_SubplotLH_a vgTW.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 189 linesPlotting/ NASTD_ECoG_Plot_SubplotS ignPvsPEElecsSurf_Label_ LH.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 231 linesPlotting/ NASTD_ECoG_Plot_SubplotS ignPvsPEElecsSurf_Label_ LH_Connect.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 362 linesPlotting/ Temp_ElectrodeSelectionP lotting4Okinawa.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 67 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_BLCda ta.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 395 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_CompP red_ClusterFT_Subs.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 687 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_CompP red_Sample_Subs.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 562 lines, 1 matchPrediction/ Helper Functions/ NASTD_ECoG_Predict_CompP red_Sample_Subs_FTPL.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 182 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_CompP red_Sample_Subs_NoCluste rCorr_FTPL.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 228 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_CompP red_Sample_Subs_NoCluste rCorr_lk.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 316 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_CompP red_TW_Subs.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 297 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_CompP red_TW_Subs_FTLP.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 298 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_CompP red_TW_Subs_FTPL.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 544 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_CompP redp33_Subs.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 620 lines, 1 matchPrediction/ Helper Functions/ NASTD_ECoG_Predict_CompP redp33_Subs_ManualArtifa ctCorrection.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 180 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_Compa rePredEffects_TWvsSample .m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 265 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_Compa rePredErrEffects_TWvsSam ple.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 1,079 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PlotE RF4SignClusterElec_AllSu b.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 1,058 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PlotE RF4SignClusterElec_AllSu bTD.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 2,467 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PlotE RF4SignClusterElec_AllSu bTD_lk.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 1,653 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PlotE RF4SignClusterElec_longp 34_lk.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 1,406 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PlotE RF4SignClusterElec_pitch regression_lk.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 184 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PlotE RFs.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 396 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PlotE ffectSummary_Sub.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 462 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PlotF DRSignClusterElec_AllSub TD.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 434 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PlotF DRSignClusterElec_AllSub TD_Mov.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 280 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PlotS ignClusterElec_AllSub.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 684 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PlotS ignClusterElec_AllSubTD_ BySubj_FDR.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 605 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PlotS ignClusterElec_AllSubTD_ BySubj_uncorr.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 606 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PlotS ignClusterElec_AllSubTD_ FDR_Uncorr.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 598 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PlotS ignClusterElec_AllSubTD_ FDR_Uncorr_Both.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 598 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PlotS ignClusterElec_AllSubTD_ FDR_Uncorr_BothHemi.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 450 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PlotS ignClusterElec_AllSubTD_ FDR_Uncorr_FTPL.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 549 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PlotS ignClusterElec_AllSubTD_ RegionalFDR.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 435 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PlotS ignClusterElec_AllSub_FD R_Uncorr.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 207 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PlotS ignClusterElec_OnsetTime s.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 328 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PlotS ignClusterElec_OnsetTime s_FTPL.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 461 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PlotS ignClusterElec_SubplotPa ramBothH_AllSub.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 474 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PlotS ignClusterElec_SubplotPa ramBothH_AllSubTD.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 559 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PlotS ignClusterElec_SubplotPa ram_AllSub.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 537 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PlotS ignClusterElec_SubplotPa ram_AllSubTD.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 594 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PlotS ignClusterElec_SubplotPa ram_AllSubTD_FDR_lk.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 594 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PlotS ignClusterElec_SubplotPa ram_AllSubTD_lk.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 383 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PlotS ignClusterElec_SubplotPa ram_AllSub_FDR_Uncorr.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 484 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PlotS ignClusterElec_SubplotPa ram_AllSub_lk.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 325 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PlotS ignElec_AllSub.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 319 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PlotS ignElec_SsubperTW.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 313 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PlotS ignElec_Sub.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 287 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_Plot_ AllsubSignElec.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 227 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_Plot_ SsubSignElec.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 362 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PredE ffectTable.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 354 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PredE ffectTable_FTPL_lk.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 365 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PredE ffectTable_NoClusterCorr _lk.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 354 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PredE ffectTable_RR_lk.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 357 linesPrediction/ Helper Functions/ NASTD_ECoG_Predict_PredE ffectTable_lk.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 462 linesPrediction/ Helper Functions/ Old/ NASTD_ECoG_Predict_CompP redp33_Subs_OldVersion.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 318 linesPrediction/ Helper Functions/ Old/ NASTD_ECoG_Predict_CompP redp33_Subs_specificTD.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 440 linesPrediction/ Helper Functions/ Old/ NASTD_Predict_ComputePre diction_Gamma_Subs.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 250 linesPrediction/ Helper Functions/ Old/ NASTD_Predict_PlotPredic tion_Gamma_Subs.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 49 linesPrediction/ Helper Functions/ Old/ NASTD_Predict_PlotPredic tion_LoopSubs.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 252 linesPrediction/ Helper Functions/ Old/ NASTD_Predict_PlotPredic tion_Subs.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 895 lines, 2 matchesPrediction/ NASTD_ECoG_Predict_Main_ lk.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 309 linesStimulusCorrelation/ HelperFunctions/ NASTD_ECoG_StimCorr_Comp areResElecs.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 586 linesStimulusCorrelation/ HelperFunctions/ NASTD_ECoG_StimCorr_Iden tvsSim.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 161 linesStimulusCorrelation/ HelperFunctions/ NASTD_ECoG_StimCorr_Phas eDissim.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 191 linesStimulusCorrelation/ HelperFunctions/ NASTD_ECoG_StimCorr_Phas eDissim_new.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 343 linesStimulusCorrelation/ HelperFunctions/ NASTD_ECoG_StimCorr_Plot SignElec_AllSub.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 350 linesStimulusCorrelation/ HelperFunctions/ NASTD_ECoG_StimCorr_Plot SignElec_AllSubTD.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 476 linesStimulusCorrelation/ HelperFunctions/ NASTD_ECoG_StimCorr_Plot SignElec_AllSubTD_lk.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 376 linesStimulusCorrelation/ HelperFunctions/ NASTD_ECoG_StimCorr_Plot SignElec_AllSubTD_lk_Onl ySig.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 309 linesStimulusCorrelation/ HelperFunctions/ NASTD_ECoG_StimCorr_Plot SignElec_AllSubTD_lk_plo tting.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 345 linesStimulusCorrelation/ HelperFunctions/ NASTD_ECoG_StimCorr_Plot SignElec_AllSub_OnlySig. m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 446 linesStimulusCorrelation/ HelperFunctions/ NASTD_ECoG_StimCorr_Tone Proc.m - AnalysisCode/
Analysis_and_Plotting/ , MATLAB, 302 lines, 1 matchStimulusCorrelation/ NASTD_ECoG_StimCorr_Main _lk.m - AnalysisCode/
HelperFunctions/ , R, 19 linesNonParametricTwoWayAnova .r - AnalysisCode/
HelperFunctions/ , MATLAB, 88 linesRA_test.m - AnalysisCode/
HelperFunctions/ , MATLAB, 222 linesRMAOV1.m - AnalysisCode/
HelperFunctions/ , MATLAB, 291 linesRMAOV2.m - AnalysisCode/
HelperFunctions/ , MATLAB, 50 linesSaveMNIcoords_Brodmann.m - AnalysisCode/
HelperFunctions/ , MATLAB, 95 linesShuffle.m - AnalysisCode/
HelperFunctions/ , MATLAB, 17 linesakaikeWeights.m - AnalysisCode/
HelperFunctions/ , MATLAB, 21 linesbioinfochecknargin.m - AnalysisCode/
HelperFunctions/ , MATLAB, 63 linescontiguous.m - AnalysisCode/
HelperFunctions/ , MATLAB, 152 linesdistinguishable_colors.m - AnalysisCode/
HelperFunctions/ , MATLAB, 73 linesdprime.m - AnalysisCode/
HelperFunctions/ , MATLAB, 226 linesfdr_bh.m - AnalysisCode/
HelperFunctions/ , MATLAB, 25 linesfind_predicted_tone.m - AnalysisCode/
HelperFunctions/ , MATLAB, 174 linesfind_temporal_clusters.m - AnalysisCode/
HelperFunctions/ , MATLAB, 391 linesmafdr_Matlab2019b.m - AnalysisCode/
HelperFunctions/ , MATLAB, 25 linesmyft_trialfilter.m - AnalysisCode/
HelperFunctions/ , MATLAB, 142 linesnii_nii2atlas_rois.m - AnalysisCode/
HelperFunctions/ , MATLAB, 133 linesperm_rm_anova2.m - AnalysisCode/
HelperFunctions/ , MATLAB, 81 linesplot_subset_kratio.m - AnalysisCode/
HelperFunctions/ , MATLAB, 160 linesprocess_subject_power_sp ectra.m - AnalysisCode/
HelperFunctions/ , MATLAB, 160 linesprocess_subject_power_sp ectra_1swindow.m - AnalysisCode/
HelperFunctions/ , MATLAB, 151 linesprocess_subject_power_sp ectra_FFTnowindow.m - AnalysisCode/
HelperFunctions/ , MATLAB, 3 linesr2z.m - AnalysisCode/
HelperFunctions/ , MATLAB, 145 linesrm_anova2.m - AnalysisCode/
Preprocessing/ , MATLAB, 197 linesHelperFunctions/ NASTD_ECoG_Preproc_AmpEn velope.m - AnalysisCode/
Preprocessing/ , MATLAB, 183 linesHelperFunctions/ NASTD_ECoG_Preproc_Commo nAvgRef.m - AnalysisCode/
Preprocessing/ , MATLAB, 50 linesHelperFunctions/ NASTD_ECoG_Preproc_Creat eElecStruct.m - AnalysisCode/
Preprocessing/ , MATLAB, 200 linesHelperFunctions/ NASTD_ECoG_Preproc_Creat eFTstruct.m - AnalysisCode/
Preprocessing/ , MATLAB, 59 linesHelperFunctions/ NASTD_ECoG_Preproc_Defin eBlocks.m - AnalysisCode/
Preprocessing/ , MATLAB, 52 linesHelperFunctions/ NASTD_ECoG_Preproc_Defin eTrials.m - AnalysisCode/
Preprocessing/ , MATLAB, 34 linesHelperFunctions/ NASTD_ECoG_Preproc_Detre ndLineNoiseFilt.m - AnalysisCode/
Preprocessing/ , MATLAB, 255 linesHelperFunctions/ NASTD_ECoG_Preproc_GetMN IandEDFElecInfo.m - AnalysisCode/
Preprocessing/ , MATLAB, 38 linesHelperFunctions/ NASTD_ECoG_Preproc_Impor tMNILocations.m - AnalysisCode/
Preprocessing/ , MATLAB, 29 linesHelperFunctions/ NASTD_ECoG_Preproc_Impor tT1Locations.m - AnalysisCode/
Preprocessing/ , MATLAB, 19 linesHelperFunctions/ NASTD_ECoG_Preproc_Indiv MNI2EDFLabelAdjust.m - AnalysisCode/
Preprocessing/ , MATLAB, 36 linesHelperFunctions/ NASTD_ECoG_Preproc_Match ElecLabels.m - AnalysisCode/
Preprocessing/ , MATLAB, 458 linesHelperFunctions/ NASTD_ECoG_Preproc_ReadT riggers.m - AnalysisCode/
Preprocessing/ , MATLAB, 150 linesHelperFunctions/ NASTD_ECoG_Preproc_Remov ePulseArtifact.m - AnalysisCode/
Preprocessing/ , MATLAB, 105 linesHelperFunctions/ importElecsfile.m - AnalysisCode/
Preprocessing/ , MATLAB, 106 linesHelperFunctions/ importElecsfile_AnatLabe ls.m - AnalysisCode/
Preprocessing/ , MATLAB, 95 linesIED_detector_rev3.7.2014 / TUTORIAL.m - AnalysisCode/
Preprocessing/ , MATLAB, 111 linesIED_detector_rev3.7.2014 / label_stat.m - AnalysisCode/
Preprocessing/ , MATLAB, 718 lines, 2 matchesIED_detector_rev3.7.2014 / spike_detector_hilbert_v 16_byISARG.m - AnalysisCode/
Preprocessing/ , MATLAB, 937 lines, 2 matchesNASTD_ECoG_Preproc_Main. m - AnalysisCode/
Preprocessing/ , MATLAB, 86 linesNASTD_ECoG_Preproc_SelCl eanTrials.m - AnalysisCode/
Preprocessing/ , MATLAB, 49 linesNASTD_ECoG_Preproc_SelTr ialsperPredp34.m - AnalysisCode/
Preprocessing/ , MATLAB, 73 linesNASTD_ECoG_Preproc_SelTr ialsperTD.m - AnalysisCode/
Preprocessing/ , MATLAB, 484 lines, 1 matchNASTD_ECoG_Preproc_SubPr eprocSettings.m - AnalysisCode/
Preprocessing/ , MATLAB, 160 linesSpikeDetection/ AutomatedSpikeDetection. m - AnalysisCode/
Preprocessing/ , MATLAB, 25 linesSpikeDetection/ SpikeDetectionSettings.m - AnalysisCode/
Preprocessing/ , MATLAB, 61 linesSpikeDetection/ newAutomatedDetection_De tectBeta.m - AnalysisCode/
Preprocessing/ , MATLAB, 45 linesSpikeDetection/ newAutomatedDetection_Fi ltering.m - AnalysisCode/
Preprocessing/ , MATLAB, 24 linesSpikeDetection/ newAutomatedDetection_Li neNoiseFiltering.m - AnalysisCode/
Preprocessing/ , MATLAB, 109 linesSpikeDetection/ newAutomatedDetection_sp ikeDetection1Channel.m - AnalysisCode/
Preprocessing/ , MATLAB, 52 linesTemp_AmplitudeEnvelope.m - ParadigmCode/
._sfa_expt4.m , MATLAB, not shown here - ParadigmCode/
._sfa_expt4_getParams.m , MATLAB, not shown here - ParadigmCode/
._sfa_expt4_runTrial.m , MATLAB, not shown here - ParadigmCode/
CreateWav/ , MATLAB, 162 linesCreateToneSeqWavFile_NAS TD_ECoG.m - ParadigmCode/
CreateWav/ , MATLAB, 134 linesFindToneSeqs.m - ParadigmCode/
CreateWav/ , MATLAB, 23 linesfigd.m - ParadigmCode/
CreateWav/ , MATLAB, 66 linesseries2soundwave.m - ParadigmCode/
example.m , MATLAB, 70 lines - ParadigmCode/
figd.m , MATLAB, 23 lines - ParadigmCode/
functions/ , MATLAB, 13 linescm2degrees.m - ParadigmCode/
functions/ , MATLAB, 13 linesdegrees2cm.m - ParadigmCode/
functions/ , MATLAB, 42 linesdegrees2pixels.m - ParadigmCode/
functions/ , MATLAB, 11 linesgetKeyboardNumber.m - ParadigmCode/
functions/ , MATLAB, 21 linesgetScreenMidpoint.m - ParadigmCode/
functions/ , MATLAB, 32 linesmakeTextTexture.m - ParadigmCode/
functions/ , MATLAB, 46 linesopenScreen.m - ParadigmCode/
functions/ , MATLAB, 40 linespixels2degrees.m - ParadigmCode/
functions/ , MATLAB, 136 linesrecordValidKeys.m - ParadigmCode/
functions/ , MATLAB, 16 linessec2hms.m - ParadigmCode/
functions/ , MATLAB, 11 linessend_trigger.m - ParadigmCode/
functions/ , MATLAB, 26 linesstartExperiment.m - ParadigmCode/
functions/ , MATLAB, 111 linestimedBreak.m - ParadigmCode/
functions/ , MATLAB, 82 linestrimMatrixBorders.m - ParadigmCode/
functions/ , MATLAB, 7 linesunpackStructFields.m - ParadigmCode/
functions/ , MATLAB, 11 lineswaitUntil.m - ParadigmCode/
get_range_mean_exptfinal , MATLAB, 11 linestone.m - ParadigmCode/
instruction_exmaples.m , MATLAB, 46 lines - ParadigmCode/
make_MC_pics.m , MATLAB, 27 lines - ParadigmCode/
series2soundwave.m , MATLAB, 66 lines - ParadigmCode/
sfa_expt1_rest_screen.m , MATLAB, 23 lines - ParadigmCode/
sfa_expt4.m , MATLAB, 262 lines - ParadigmCode/
sfa_expt4_Training.m , MATLAB, 225 lines - ParadigmCode/
sfa_expt4_getParams.m , MATLAB, 116 lines, 1 match - ParadigmCode/
sfa_expt4_getParamsTrain , MATLAB, 111 lines, 1 matching.m - ParadigmCode/
sfa_expt4_makeStim.m , MATLAB, 207 lines, 2 matches - ParadigmCode/
sfa_expt4_makeTrainingSt , MATLAB, 166 lines, 1 matchim.m - ParadigmCode/
sfa_expt4_plot_stim.m , MATLAB, 40 lines - ParadigmCode/
sfa_expt4_runBlock.m , MATLAB, 274 lines - ParadigmCode/
sfa_expt4_runBlockTraini , MATLAB, 209 linesng.m - ParadigmCode/
sfa_expt4_runTrial.m , MATLAB, 339 lines - ParadigmCode/
sfa_expt4_runTrialTraini , MATLAB, 347 linesng.m - ParadigmCode/
sfa_expt4_sample.m , MATLAB, 70 lines - README.md, Text, 33 lines
Code availability statement
The paper has a code availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:
- it points to the authors' code: BiyuHeLab/
TimeForwardPrediction_iE EG_Baumgarten_Koenig
Read it in the paper: doi.org/10.1038/s41467-026-75359-0.
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;
- 280 scripts, each with its path and the digest of its content;
- 26 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.
Data availability statement
The paper has a data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:
- no repository, dataset or request procedure was recognized in it
Read it in the paper: doi.org/10.1038/s41467-026-75359-0.
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, 27 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 9 authors, 2 keywords, 12 MeSH terms, 1 funder, 48 references.
Cite
This paper
Baumgarten, T. J., Koenig, L., Hardstone, R., Flinker, A., Devore, S., Friedman, D., Dugan, P., Devinsky, O., & He, B. J. (2026). Neural mechanisms of time-forward predictions for naturalistic auditory tone sequences. Nature communications, 17(1), 8459. https://
BibTeX
@article{baumgarten2026n
author = {Baumgarten, Thomas J and Koenig, Lua and Hardstone, Richard and Flinker, Adeen and Devore, Sasha and Friedman, Daniel and Dugan, Patricia and Devinsky, Orrin and He, Biyu J},
title = {{Neural mechanisms of time-forward predictions for naturalistic auditory tone sequences}},
journal = {Nature communications},
year = {2026},
month = jul,
volume = {17},
number = {1},
pages = {8459},
publisher = {Nature Publishing Group},
issn = {2041-1723},
doi = {10.1038/
url = {https://
pmid = {42426016},
pmcid = {PMC13478490}
}
RIS
TY - JOUR
AU - Baumgarten, Thomas J
AU - Koenig, Lua
AU - Hardstone, Richard
AU - Flinker, Adeen
AU - Devore, Sasha
AU - Friedman, Daniel
AU - Dugan, Patricia
AU - Devinsky, Orrin
AU - He, Biyu J
TI - Neural mechanisms of time-forward predictions for naturalistic auditory tone sequences
T2 - Nature communications
J2 - Nat Commun
PY - 2026
DA - 2026/
VL - 17
IS - 1
SP - 8459
SN - 2041-1723
PB - Nature Publishing Group
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"type": "article-journal",
"title": "Neural mechanisms of time-forward predictions for naturalistic auditory tone sequences",
"container-title": "Nature communications",
"author": [
{
"family": "Baumgarten",
"given": "Thomas J"
},
{
"family": "Koenig",
"given": "Lua"
},
{
"family": "Hardstone",
"given": "Richard"
},
{
"family": "Flinker",
"given": "Adeen"
},
{
"family": "Devore",
"given": "Sasha"
},
{
"family": "Friedman",
"given": "Daniel"
},
{
"family": "Dugan",
"given": "Patricia"
},
{
"family": "Devinsky",
"given": "Orrin"
},
{
"family": "He",
"given": "Biyu J"
}
],
"container-title-short":
"volume": "17",
"issue": "1",
"page": "8459",
"DOI": "10.1038/
"PMID": "42426016",
"PMCID": "PMC13478490",
"ISSN": "2041-1723",
"publisher": "Nature Publishing Group",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
9
]
]
}
}
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.1038/s41467-026-73540-z [code]
- Predictive acoustical processing in human cortical layers.Journal: Nature communicationsIn common: FieldTrip, FreeSurfer, SPM, 2 other tools, cognitive, 10 references
- [2] doi:10.1002/advs.77857 [code]
- Brain Network Dynamics of Local and Global Predictive Processing in Aging.Journal: Advanced science (Weinheim, Baden-Wurttemberg, Germany)In common: FieldTrip, SPM, Signal Processing Toolbox, 1 other tool, cognitive, 7 references
- [3] doi:10.1038/s41467-026-73947-8 [code]
- Frontal cortex organization supporting audiovisual processing during naturalistic viewing.Journal: Nature communicationsIn common: cognitive, 3 references, 2 authors
- [4] doi:10.7554/elife.108408 [code]
- Frequency and laminar profile of feature-specific visual activity revealed by interleaved EEG-fMRI.Journal: eLifeIn common: FieldTrip, FreeSurfer, SPM, 2 other tools, EEG, 5 references
- [5] doi:10.1371/journal.pbio.3003966 [code]
- Behavioral engagement and stimulus regularities coordinate auditory-prefrontal network activity.Journal: PLoS biologyIn common: fdr_bh (Benjamini-Hochberg FDR), Statistics and Machine Learning Toolbox, 8 references
- [6] doi:10.1126/sciadv.aec0518 [code]
- Hybrid spatial organization and evidence for magnitude-independent neural coding of linguistic information during sentence production.Journal: Science advancesIn common: 3 references, 2 authors
- [7] doi:10.1038/s41467-026-71151-2 [code]
- Common and distinct neural correlates of social interaction processing and theory of mind in narratives.Journal: Nature communicationsIn common: fdr_bh (Benjamini-Hochberg FDR), Psychtoolbox, FieldTrip, 4 other tools, cognitive, 1 reference
- [8] doi:10.1038/s41593-026-02345-6 [code]
- Human hippocampal ripples tune cortical responses based on predicted uncertainty.Journal: Nature neuroscienceIn common: FieldTrip, Signal Processing Toolbox, Statistics and Machine Learning Toolbox, cognitive, 7 references
- [9] doi:10.1162/imag.a.1218 [code]
- Reliability and signal comparison of OPM-MEG, fMRI &
amp; iEEG in a repeated movie viewing paradigm. Journal: Imaging neuroscience (Cambridge, Mass.)In common: fdr_bh (Benjamini-Hochberg FDR), FieldTrip, Statistics and Machine Learning Toolbox, 5 references - [10] doi:10.1371/journal.pcbi.1014563 [code]
- Single pulse electrical stimulation in white matter modulates iEEG visual responses in human early visual cortex.Journal: PLoS computational biologyIn common: fdr_bh (Benjamini-Hochberg FDR), FreeSurfer, SPM, 2 other tools, EEG, 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, 280 scripts, and 26 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:c6cfb1a1a53b63ee…
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
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
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.
