OSCR

The role of fear learning in the development of psychosis: an EEG study utilizing a differential fear conditioning paradigm in people with psychotic vulnerability.

Code ↔ Paper

3 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 3 matches
  1. [1] § Methods and materials › EEG and FPS data acquisition and processing ↔ Codes/LPP/LPP_preprocessing_afterICA.m, lines 201–234 · score 0.69 · channel deviation, variance, rejection, EEGLAB, Preprocessing, amplitude
  2. [2] § Methods and materials › EEG and FPS data acquisition and processing ↔ Codes/LPP/LPP_preprocessing_untilICA.m, lines 363–406 · score 0.59 · segmented, rejected, Component, EEGLAB, Preprocessing, filtered
  3. [3] § Methods and materials › Statistical analyses ↔ Codes/Statistics/Statistics_LMER.R, lines 3610–3663 · score 0.52 · Pairwise comparisons, emmeans, linear, models, LPPs

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 · 451 lines · 19 KB · no license · 1 match

  1. %% ANALYSIS SCRIPT - ***EEG*** - PROOF - Classical Paradigm (Real Data) / Metin Ozyagcilar / PREPROCESSING AFTER ICA / NOV 2023
  2. %% TOOLBOXES / PLUG-INs
  3. % (1) EEGLAB (v2023.1)
  4. % Delorme A & Makeig S (2004) EEGLAB: an open-source toolbox for analysis of single-trial EEG dynamics,
  5. % Journal of Neuroscience Methods 134:9-21
  6. %%
  7. clear all; close all; clc;
  8. %% DEFINE FOLDERS
  9. % mainpath = 'D:\PROOF';
  10. %mainpath = 'C:\Users\metin\Desktop\PROOF_EEGSCRFPS_Analysis\AnalysisHome'; % if you work laptop
  11. % mainpath ='C:\Users\metin\Desktop\PROOF_EEGSCRFPS_Analysis\AnalysisHome'; % if youwork on Uni comp
  12. mainpath = 'D:\PROOF' % if you work on harddisk
  13. path_eeglab = [mainpath, '\eeglab2023.1']; % where eeglab is located
  14. %path_eeglab = [mainpath, '\eeglab2022.0']; % where eeglab is located
  15. path_rawdata = [mainpath, '\Real\Raw\']; % where raw data is located
  16. path_preprocessed = [mainpath, '\Real\Preprocessed\']; % where pre-processed data is saved
  17. path_condspecific = [mainpath, '\Real\Epoched\']; % where pre-processed data is saved
  18. %% EXTRACT SUBJECT IDs
  19. % Extract subject IDs (CHECKS ALL OF THE RAW DATA IN THE FOLDER):
  20. %cd (path_rawdata)
  21. %sub = dir('*.vhdr');
  22. %sub = {sub.name}; % subject IDs are stored here
  23. %for i = 1:length(sub)
  24. %sub{i} = sub{i}(1:7); % remove .vhdr extension and only keep the subject IDs
  25. %end
  26. %clear i;
  27. % LOAD SUBJECT IDs
  28. %load([mainpath, '\THESIS\Analysis\files.mat'], 'files');
  29. % DEFINE SUBJECT IDs MANUALLY
  30. sub = {'CF_189' 'CF_193'}
  31. %% TRIGGERS:
  32. % 20: CS- / 24: CS+ / 21: GS- / 23: GS+ / 22: GSU % keep writing here[1
  33. %% DEFINE PARAMETERS
  34. irr_1 = 'SCR'; % irrelevant channel 1
  35. irr_2 = 'Startle'; % irrelevant channel 2
  36. irr_3 = 'EKG'; % irrelevant channel 2 % +++ CHECK THAT AGAIN +++
  37. irr_4 = 'IO2' % irrelevant channel 3
  38. highpass = .01; % cut-off for the first high-pass filter
  39. highpass_ica = 1; % cut-off for the high-pass filter to be applied for ICA preparetaion
  40. lowpass = 30; % cut-off for the low-pass filter
  41. %notch_1 = 45; % first cut-off for the notch filter
  42. %notch_2 = 55; % second cut-off for the notch filter
  43. events_phase_wholeacq = {'S 2021' 'S 2022' 'S 2421' 'S 2422'};
  44. conds_phase_wholeacq = {'ACSMComb', 'ACSPComb'};
  45. events_phase_wholeext= {'S 2041' 'S 2042' 'S 2043' 'S 2441' 'S 2442' 'S 2443'};
  46. conds_phase_wholeext= {'ECSMComb', 'ECSPComb'};
  47. events_phase = {'S 201' 'S 241' 'S 2021' 'S 2421' 'S 2022' 'S 2422' 'S 203' 'S 213' 'S 223' 'S 233' 'S 243' 'S 2041' 'S 2441' 'S 2042' 'S 2442' ...
  48. 'S 2043' 'S 2443' 'S 205' 'S 245'}; % short version
  49. conds_phase = {'HCSM','HCSP','ACSMFirst', 'ACSPFirst', 'ACSMSecond', 'ACSPSecond', 'GCSM', 'GGSM', 'GGSU', 'GGSP', 'GCSP', ...
  50. 'ECSMFirst', 'ECSPFirst', 'ECSMSecond', 'ECSPSecond', 'ECSMThird', 'ECSPThird', 'ROFCSM', 'ROFCS+'}; % short version / G2 = RO
  51. %TEMP
  52. %events_phase = {'S 2021' 'S 2421' 'S 2022' 'S 2422' 'S 203' 'S 213' 'S 223' 'S 233' 'S 243' 'S 2041' 'S 2441' 'S 2042' 'S 2442' ...
  53. % 'S 2043' 'S 2443' 'S 205' 'S 245'}; % short version
  54. %conds_phase = {'ACSMFirst', 'ACSPFirst', 'ACSMSecond', 'ACSPSecond', 'GCSM', 'GGSM', 'GGSU', 'GGSP', 'GCSP', ...
  55. % 'ECSMFirst', 'ECSPFirst', 'ECSMSecond', 'ECSPSecond', 'ECSMThird', 'ECSPThird', 'ROFCSM', 'ROFCS+'}; % short version / G2 = RO
  56. epoch_start = -0.4;
  57. epoch_end = 2.6;
  58. base_start = -200;
  59. nobad = 0;
  60. %badcompz ={[1,3,'CF_001'], [1,2,'CF_002'],[1,4,'CF_003'], [1,4,'CF_004'], [1,2,5 'CF_006'], [1,7,'CF_0047'], ...
  61. % [1,2,'CF_009'], [1,5,'CF_013'], [1,5,'CF_015'], [1,2,'CF_016'], [1,2, 3,'CF_020'], [1,3,'CF_021'], [1,4,'CF_022'], ...
  62. % [1,2,'CF_023'], [1,3,'CF_024'], [1,4,'CF_026'], [1,4,'CF_027_02'], [1,5,'CF_028'], [1,3,'CF_031'], [1,4,'CF_032'], ...
  63. % [1,3,'CF_033'], [1,4,'CF_034'], [1,8,'CF_035'], [1,5,'CF_036'], [1,3,'CF_038'], [1,2,'CF_039'], [1,6,'CF_41'], ...
  64. % [2,3,5,'CF_043'], [2,3,'CF_044'], [1,5,'CF_045'], [1,3,'CF_046'], [1,7,'CF_048'], [1,3,'CF_049'], [1,4,'CF_051'], ...
  65. %[1,2,'CF_052'], [1,3,'CF_054'], [1,3,'CF_055'], [1,3,'CF_056'], [1,2,'CF_057'], [1,3,'CF_058'], ...
  66. %[1,2,'CF_061'], [1,3,'CF_063'], [1,3 'CF_064'],}; % TEMP for automatic comp rejection in the loop with predefined comp indexes
  67. %% PREPROCESSING AFTER ICA
  68. a = 0; % create and index variable here to create seperate datasets on EEGLAB after each step
  69. for i = 1:length(sub); % loops through subjects
  70. %% OCULAR CORRECTION (ICA) - REJECT BAD COMPONENTS
  71. cd(path_eeglab);
  72. eeglab; % first, re-start the eeglab
  73. eeglab redraw
  74. EEG = pop_loadset('filename',[sub{i}, '_icaed', '.set'],'filepath', [path_preprocessed, '\', sub{i}]);
  75. % pop_topoplot(EEG,0,[1:size(EEG.icawinv,2)],EEG.setname,[9 9] ,0,'electrodes','on'); % plot the components
  76. pop_selectcomps(EEG, [1:size(EEG.icawinv,2)] ); % plot the components - this one is better because you can also click on them to see the properties
  77. pop_eegplot(EEG, 0, 1, 1); % ?
  78. EEG.badcomps = input('Enter bad component indices [] : '); % enter bad component indices (after visually inspecting them on the plot)
  79. badcomp = EEG.badcomps;
  80. EEG = pop_subcomp(EEG, badcomp, 0); % bye bye bad components
  81. %EEG = pop_subcomp(EEG, badcompz{i}, 0); % bye bye bad components % TEMP for automatic comp rejection in the loop with predefined comp indexes
  82. [ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, a,'setname',[sub{i}, '_icapruned'],'savenew',[path_preprocessed,'\\', ...
  83. sub{i} '\\', sub{i}, '_icapruned', '.set'],'gui','off'); % create a dataset on EEGLAB and assign a name to the data
  84. eeglab redraw;
  85. a = a+1; % increase a by 1 so that it creates a different dataset on the next ste
  86. %for i = 1:length(sub); % loops through subjects % TEMP
  87. %%
  88. for r = 1:2 % (first rerefav then rerefmast, with another inner loop starting here)
  89. cd(path_eeglab);
  90. eeglab; % first, re-start the eeglab
  91. eeglab redraw
  92. a = 0; % re-set the index variable a
  93. EEG = pop_loadset('filename',[sub{i}, '_icapruned', '.set'],'filepath', [path_preprocessed, '\', sub{i}]);
  94. % EEG = pop_loadset('filename',[sub{i}, '_50hzremoved', '.set'],'filepath', [path_preprocessed, '\', sub{i}]);
  95. % TEMP for comparing data with & withouth eyeblinks removed
  96. if r == 1;
  97. %% RE-REFERENE (AVERAGE)
  98. chan_IO_reref_av = find(strcmpi('IO1',{EEG.chanlocs.labels})); % find the channel index of IO1
  99. EEG = pop_reref( EEG, [],'exclude', chan_IO_reref_av);
  100. [ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, a,'setname',[sub{i}, '_rerefav'],'savenew',[path_preprocessed,'\\', ...
  101. sub{i} '\\', sub{i}, '_rerefav', '.set'],'gui','off'); % create a dataset on EEGLAB and assign a name to the data
  102. eeglab redraw;
  103. a = a+1; % increase a by 1 so that it creates a different dataset on the next ste
  104. end
  105. if r == 2;
  106. %% RE-REFERENCE (MASTOIDS)
  107. chan_IO_reref_mast = find(strcmpi('IO1',{EEG.chanlocs.labels})); % find the channel index of IO1
  108. chan_mast_1 = find(strcmpi('T9',{EEG.chanlocs.labels})); % find the channel index of the mastoid elec 1
  109. chan_mast_2 = find(strcmpi('T10',{EEG.chanlocs.labels})); % find the channel index of the mastoid elec 2
  110. EEG = pop_reref( EEG, [chan_mast_1 chan_mast_2], 'exclude', chan_IO_reref_mast);
  111. [ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, a,'setname',[sub{i}, '_rerefmast'],'savenew',[path_preprocessed,'\\', ...
  112. sub{i} '\\', sub{i}, '_rerefmast', '.set'],'gui','off'); % create a dataset on EEGLAB and assign a name to the data
  113. eeglab redraw;
  114. a = a+1; % increase a by 1 so that it creates a different dataset on the next ste
  115. end
  116. end
  117. %for i = 1:length(sub); % loops through subjects % TEMP
  118. %a = 0; %TEMP
  119. %% CREATE EPOCHS
  120. for z = 1:2 % load the datasets (load first rerefav then rerefmast and do the rest, with another loop starting here)
  121. eeglab; % first, re-start the eeglab
  122. eeglab redraw
  123. a = 0; % re-set the index variable a
  124. if z == 1; % for rerefav dataset
  125. EEG = pop_loadset('filename',[sub{i}, '_rerefav', '.set'],'filepath', [path_preprocessed, '\', sub{i}]); % this may not work check it
  126. end
  127. if z == 2; % for rerefmast dataset
  128. EEG = pop_loadset('filename',[sub{i}, '_rerefmast', '.set'],'filepath', [path_preprocessed, '\', sub{i}]); % this may not work check it
  129. end
  130. EEG = pop_epoch(EEG, events_phase, [epoch_start epoch_end], 'newname', [sub{i}, '_epoched'], 'epochinfo', 'yes'); % create epochs
  131. [ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, a,'gui','off');
  132. if z == 1;
  133. [ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, a,'setname',[sub{i}, '_rerefav', '_epoched'],'savenew',[path_preprocessed,'\\', ...
  134. sub{i}, '\\', sub{i}, '_rerefav', '_epoched', '.set'],'gui','off'); % create a dataset on EEGLAB and assign a name to the data
  135. eeglab redraw;
  136. a = a+1; % increase a by 1 so that it creates a different dataset on the next step
  137. end
  138. if z == 2;
  139. [ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, a,'setname',[sub{i}, '_rerefmast', '_epoched'],'savenew',[path_preprocessed,'\\', ...
  140. sub{i}, '\\', sub{i}, '_rerefmast', '_epoched', '.set'],'gui','off'); % create a dataset on EEGLAB and assign a name to the data
  141. eeglab redraw;
  142. a = a+1; % increase a by 1 so that it creates a different dataset on the next step
  143. end
  144. EEG = eeg_checkset( EEG );
  145. eeglab redraw;
  146. %% ARTEFACT REJECTION
  147. % (Criteria: amplitude, variance and channel deviation larger than 3-z scores)
  148. % +++ maybe add again a temporary loop here to change stuff post processesing?
  149. if nobad == 0;
  150. datachan = [1:size(EEG.data,1)];
  151. list_props = epoch_properties(EEG,datachan); % determine contaminated epochs
  152. marked_trials = find(min_z(list_props,prep_rej_opt(list_props,3))); % store indices of contaminated epochs
  153. bad_trials = zeros(1,EEG.trials);
  154. bad_trials(marked_trials) = 1; % index to bad trials in the data
  155. EEG = pop_rejepoch(EEG,bad_trials,0); % bad trials are removed
  156. eeglab redraw;
  157. if z == 1;
  158. [ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, a,'setname',[sub{i}, '_rerefav', '_badtrialsrejected'],'savenew',[path_preprocessed,'\\', ...
  159. sub{i}, '\\', sub{i}, '_rerefav', '_badtrialsrejected', '.set'],'gui','off'); % create a dataset on EEGLAB and assign a name to the data
  160. eeglab redraw;
  161. a = a+1; % increase a by 1 so that it creates a different dataset on the next step
  162. end
  163. if z == 2;
  164. [ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, a,'setname',[sub{i}, '_rerefmast', '_badtrialsrejected'],'savenew',[path_preprocessed,'\\', ...
  165. sub{i}, '\\', sub{i}, '_rerefmast', '_badtrialsrejected', '.set'],'gui','off'); % create a dataset on EEGLAB and assign a name to the data
  166. eeglab redraw;
  167. a = a+1; % increase a by 1 so that it creates a different dataset on the next step
  168. end
  169. elseif nobad == 1;
  170. end
  171. eeglab redraw;
  172. %% ARTEFACT REJECTION Option 2 EPOCH INT
  173. % Option A
  174. % EEG = pop_eegmaxmin(EEG, [],[], 75, [], 1, 0);
  175. % EEG = pop_TBT(EEG, EEG.reject.rejmaxminE , 10, 0.15, 1); % can I put here the last stuff from below [] EEG.chanlocs? ASK?
  176. % ~~ %
  177. % Option B (To add back all channels from the input EEG data-set) IS IT BETTER THAN A? WITH A YOU GET MISSING CHANNELS...:
  178. % EEG = pop_eegmaxmin(EEG); % Is this then takes the default stuff? Is it the same as above?
  179. % EEG = pop_eegmaxmin(EEG, [],[], 150, [], 1, 0); %START FROM HERE
  180. % my_bads = EEG.reject.rejmaxminE;
  181. % EEG = pop_TBT(EEG,my_bads,10,0.3,[],EEG.chanlocs); % or any other chanloc
  182. % struct, this is like option 1
  183. %EEG = pop_TBT(EEG,my_bads,[],0.3,[],EEG.chanlocs); % or any other chanloc struct --> I've put [] instead of 10, now it is doing option 4 (in the notes), I hope??
  184. %if z == 1;
  185. %[ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, a,'setname',[sub{i}, '_rerefav', '_badtrialsrejected'],'savenew',[path_preprocessed,'\\', ...
  186. %sub{i}, '\\', sub{i}, '_rerefav', '_badtrialsrejected', '.set'],'gui','off'); % create a dataset on EEGLAB and assign a name to the data
  187. %eeglab redraw;
  188. %a = a+1; % increase a by 1 so that it creates a different dataset on the next step
  189. %end
  190. %if z == 2;
  191. %[ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, a,'setname',[sub{i}, '_rerefmast', '_badtrialsrejected'],'savenew',[path_preprocessed,'\\', ...
  192. %sub{i}, '\\', sub{i}, '_rerefmast', '_badtrialsrejected', '.set'],'gui','off'); % create a dataset on EEGLAB and assign a name to the data
  193. %eeglab redraw;
  194. %a = a+1; % increase a by 1 so that it creates a different dataset on the next step
  195. %end
  196. %eeglab redraw;
  197. % Option A explaination
  198. % Epoched data were subjected to an automated bad-channel and artifact detection using EEGPLAB's TBT plugin (Ben-Shachar, 2018): within each
  199. % epoch, channels that exceeded a differential average amplitude of 75μV were marked for rejection. Channels that were marked as bad
  200. % on more then 15/% of all epochs were excluded. Epochs having more than 10 bad channels were excluded. Epochs with less
  201. % than 10 bad channels were included, while replacing the bad-channel data with spherical interpolation of the neighboring channel values.
  202. %% ARTEFACT REJECTION Option 3 like BVA
  203. % ?
  204. %% BASELINE CORRECTION
  205. EEG = eeg_checkset( EEG );
  206. EEG = pop_rmbase(EEG, [base_start 0], []); % baseline correction
  207. if z == 1;
  208. [ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, a,'setname',[sub{i}, '_rerefav', '_baselineremoved'],'savenew',[path_preprocessed,'\\', ...
  209. sub{i}, '\\', sub{i}, '_rerefav', '_baselineremoved', '.set'],'gui','off'); % create a dataset on EEGLAB and assign a name to the data
  210. eeglab redraw;
  211. a = a+1; % increase a by 1 so that it creates a different dataset on the next step
  212. end
  213. if z == 2;
  214. [ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, a,'setname',[sub{i}, '_rerefmast', '_baselineremoved'],'savenew',[path_preprocessed,'\\', ...
  215. sub{i}, '\\', sub{i}, '_rerefmast', '_baselineremoved', '.set'],'gui','off'); % create a dataset on EEGLAB and assign a name to the data
  216. eeglab redraw;
  217. a = a+1; % increase a by 1 so that it creates a different dataset on the next step
  218. end
  219. eeglab redraw;
  220. %% CREATE SEPERATE DATASETS
  221. idx = length(ALLEEG);
  222. e = 1;
  223. while e <= size(events_phase) % loop through triggers
  224. for c = 1:size(conds_phase,2) % loop through condition names
  225. EEG = pop_selectevent(ALLEEG(idx), 'latency','-2<=2','type',{events_phase{e}},...
  226. 'deleteevents','off','deleteepochs','on','invertepochs','off'); % create a condition specific dataset
  227. if z == 1;
  228. [ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, a,'setname',[sub{i}, '_rerefav', '_', conds_phase{c}],'savenew',[path_condspecific,'\\', ...
  229. sub{i}, '\\', sub{i}, '_rerefav', '_', conds_phase{c}, '.set'],'gui','off'); % create a dataset on EEGLAB and assign a name to the data
  230. eeglab redraw;
  231. a = a+1; % increase a by 1 so that it creates a different dataset on the next step
  232. end
  233. if z == 2;
  234. [ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, a,'setname',[sub{i}, '_rerefmast', '_', conds_phase{c}],'savenew',[path_condspecific,'\\', ...
  235. sub{i}, '\\', sub{i}, '_rerefmast', '_', conds_phase{c}, '.set'],'gui','off'); % create a dataset on EEGLAB and assign a name to the data
  236. eeglab redraw;
  237. a = a+1; % increase a by 1 so that it creates a different dataset on the next step
  238. end
  239. EEG = eeg_checkset(EEG);
  240. [ALLEEG, EEG, CURRENTSET] = eeg_store(ALLEEG, EEG);
  241. e = e+1;
  242. end
  243. end
  244. end
  245. end
  246. %% CREATE SEPERATE DATASETS FOR ACQ AS A WHOLE
  247. for i = 1:length(sub); % loop through all subjects
  248. for z = 1:2 % load the datasets (load first rerefav then rerefmast and do the rest, with another loop starting here)
  249. e= 1;
  250. a = 1;
  251. cd(path_eeglab);
  252. eeglab; % first, re-start the eeglab
  253. eeglab redraw
  254. if z == 1;
  255. EEG = pop_loadset('filename',[sub{i}, '_rerefav', '_baselineremoved', '.set'],'filepath', [path_preprocessed, '\', sub{i}]);
  256. EEG = eeg_checkset(EEG);
  257. [ALLEEG, EEG, CURRENTSET] = eeg_store(ALLEEG, EEG);
  258. idx = length(ALLEEG);
  259. end
  260. if z == 2;
  261. EEG = pop_loadset('filename',[sub{i}, '_rerefmast', '_baselineremoved', '.set'],'filepath', [path_preprocessed, '\', sub{i}]);
  262. EEG = eeg_checkset(EEG);
  263. [ALLEEG, EEG, CURRENTSET] = eeg_store(ALLEEG, EEG);
  264. idx = length(ALLEEG);
  265. end
  266. while e <= size(events_phase_wholeacq) % loop through triggers
  267. for c = 1:size(conds_phase_wholeacq,2) % loop through condition names
  268. EEG = pop_selectevent(ALLEEG(idx), 'latency','-2<=2','type',{events_phase_wholeacq{e}, events_phase_wholeacq{e+1}},...
  269. 'deleteevents','off','deleteepochs','on','invertepochs','off'); % create a condition specific dataset
  270. if z == 1;
  271. [ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, a,'setname',[sub{i}, '_rerefav', '_', conds_phase_wholeacq{c}],'savenew',[path_condspecific,'\\', ...
  272. sub{i}, '\\', sub{i}, '_rerefav', '_', conds_phase_wholeacq{c}, '.set'],'gui','off'); % create a dataset on EEGLAB and assign a name to the data
  273. eeglab redraw;
  274. a = a+1; % increase a by 1 so that it creates a different dataset on the next step
  275. end
  276. if z == 2;
  277. [ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, a,'setname',[sub{i}, '_rerefmast', '_', conds_phase_wholeacq{c}],'savenew',[path_condspecific,'\\', ...
  278. sub{i}, '\\', sub{i}, '_rerefmast', '_', conds_phase_wholeacq{c}, '.set'],'gui','off'); % create a dataset on EEGLAB and assign a name to the data
  279. eeglab redraw;
  280. a = a+1; % increase a by 1 so that it creates a different dataset on the next step
  281. end
  282. EEG = eeg_checkset(EEG);
  283. [ALLEEG, EEG, CURRENTSET] = eeg_store(ALLEEG, EEG);
  284. e = e+2;
  285. end
  286. end
  287. end
  288. end
  289. eeglab redraw;
  290. %% CREATE SEPERATE DATASETS FOR EXT AS A WHOLE
  291. for i = 1:length(sub); % loop through all subjects
  292. for z = 1:2 % load the datasets (load first rerefav then rerefmast and do the rest, with another loop starting here)
  293. e= 1;
  294. a = 1;
  295. cd(path_eeglab);
  296. eeglab; % first, re-start the eeglab
  297. eeglab redraw
  298. if z == 1;
  299. EEG = pop_loadset('filename',[sub{i}, '_rerefav', '_baselineremoved', '.set'],'filepath', [path_preprocessed, '\', sub{i}]);
  300. EEG = eeg_checkset(EEG);
  301. [ALLEEG, EEG, CURRENTSET] = eeg_store(ALLEEG, EEG);
  302. idx = length(ALLEEG);
  303. end
  304. if z == 2;
  305. EEG = pop_loadset('filename',[sub{i}, '_rerefmast', '_baselineremoved', '.set'],'filepath', [path_preprocessed, '\', sub{i}]);
  306. EEG = eeg_checkset(EEG);
  307. [ALLEEG, EEG, CURRENTSET] = eeg_store(ALLEEG, EEG);
  308. idx = length(ALLEEG);
  309. end
  310. while e <= size(events_phase_wholeext) % loop through triggers
  311. for c = 1:size(conds_phase_wholeext,2) % loop through condition names
  312. EEG = pop_selectevent(ALLEEG(idx), 'latency','-2<=2','type',{events_phase_wholeext{e}, events_phase_wholeext{e+1}, events_phase_wholeext{e+2}},...
  313. 'deleteevents','off','deleteepochs','on','invertepochs','off'); % create a condition specific dataset
  314. if z == 1;
  315. [ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, a,'setname',[sub{i}, '_rerefav', '_', conds_phase_wholeext{c}],'savenew',[path_condspecific,'\\', ...
  316. sub{i}, '\\', sub{i}, '_rerefav', '_', conds_phase_wholeext{c}, '.set'],'gui','off'); % create a dataset on EEGLAB and assign a name to the data
  317. eeglab redraw;
  318. a = a+1; % increase a by 1 so that it creates a different dataset on the next step
  319. end
  320. if z == 2;
  321. [ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, a,'setname',[sub{i}, '_rerefmast', '_', conds_phase_wholeext{c}],'savenew',[path_condspecific,'\\', ...
  322. sub{i}, '\\', sub{i}, '_rerefmast', '_', conds_phase_wholeext{c}, '.set'],'gui','off'); % create a dataset on EEGLAB and assign a name to the data
  323. eeglab redraw;
  324. a = a+1; % increase a by 1 so that it creates a different dataset on the next step
  325. end
  326. EEG = eeg_checkset(EEG);
  327. [ALLEEG, EEG, CURRENTSET] = eeg_store(ALLEEG, EEG);
  328. e = e+3;
  329. end
  330. end
  331. end
  332. end
  333. eeglab redraw;

LPP_preprocessing_afterICA.m, no license · at the source

Overview

Authors: Metin Özyagcilar1, Nilay Esin Ahrens-Demirdal1, Anja Riesel2, Tina B Lonsdorf3,4, Tania M Lincoln1
  1. Clinical Psychology and Psychotherapy, Institute of Psychology, Faculty of Psychology and Human Movement Science, Universität Hamburg, Hamburg, Germany
  2. Clinical Psychology and Neuroscience, Institute of Psychology, Faculty of Psychology and Human Movement Science, Universität Hamburg, Hamburg, Germany
  3. Biological Psychology and Cognitive Neuroscience, Department of Psychology, Universität Bielefeld, Bielefeld, Germany
  4. Institute of Systems Neuroscience, University Medical Center Hamburg-Eppendorf, Hamburg, Germany
Journal: Schizophrenia (Heidelberg, Germany), volume 12, issue 1, article 45
Dates: received 12 February 2026; accepted 23 April 2026; published online 15 May 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1038/s41537-026-00761-y · PMID 42140955 · PMCID PMC13179330 · OpenAlex W7161252776
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: EEG (modality), human (organism), schizophrenia / psychosis (population), clinical / translational (subfield)
Methods: Statistics, Smoothing, state filtering, decompositions, Preprocessing, Physiology & signal measures
Keywords: Human behaviour, Biomarkers
Topic: Schizophrenia research and treatment (Psychiatry and Mental health, Medicine), according to OpenAlex
Funding: Deutsche Forschungsgemeinschaft (German Research Foundation) (449640848)
Citations: not cited yet (Europe PMC); 64 references in the paper

Abstract

By studying how individuals in an “at-risk” state of psychosis learn about threat and safety cues – specifically, how they develop and unlearn fear responses to neutral cues – we might better understand the mechanisms leading to heightened arousal and fear that are characteristic of acute psychotic episodes. At-risk individuals (N = 88; of which 28 fulfilled ultra-high-risk criteria on the Comprehensive Assessment of At-Risk Mental States interview and 60 scored above a predefined threshold on the Community Assessment of Psychic Experiences) and healthy controls (N = 44) underwent a standardized and validated differential fear conditioning paradigm including an acquisition, generalization, and extinction phase. The main outcomes of interest were the late positive potential, fear-potentiated startle, and self-reported ratings of valence, arousal, fear, and expectancy elicited by the conditioned stimuli (CS). The at-risk group exhibited diminished fear learning, evident in significantly reduced differentiation between the CS+ vs. CS- in the valence ratings compared to controls. Additionally, they demonstrated impaired fear extinction, evident in valence and arousal ratings, in which their CS differentiation showed a slower reduction than the controls. There were no group differences in late positive potential responses. At risk mental states appear to be associated with problems in distinguishing dangerous from safe stimuli and a diminished ability to adjust affective responses to conditioned stimuli based on new information, while the late-positive potential and fear-potentiated startle are unaltered. Early interventions could focus on recalibrating subjective emotional evaluations of fear-associated events.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repository

Its files are read in the Code ↔ Paper reader above, with 3 matches between paragraphs and lines of code.

OSF fj9cg

License: none: the authors keep all their rights
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Languages: MATLAB (4), R (1)
Size: 35 files, 5 scripts
Software Heritage: not checked
Found in: “Code availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: EEGLAB (4 files), broom (1 file), data.table (1 file), emmeans (1 file), ggplot2 (1 file), lme4 (1 file), lmerTest (1 file), nlme (1 file), psych (1 file), tidyverse (1 file)
Availability: 1 check, the latest on 28 September 2026: the link answers (HTTP 200)
  • 28 September 2026: the link answers (HTTP 200)
5 files
At the source: osf.io/fj9cg/

Code availability

Analysis code(s) used in the processing of datasets are available in the OSF repository (https://osf.io/fj9cg/). The software(s) as well as their versions used are reported in the following sections.

Reproduced under the paper's license (CC BY), from the paper cited above.

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 5 scripts, each with its path and the digest of its content;
  • 3 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

The datasets generated during and/or analyzed during the current study are available in the OSF repository (https://osf.io/fj9cg/).

Reproduced under the paper's license (CC BY), from the paper cited above.

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, 28 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 5 authors, 2 keywords, 1 funder, 56 references.

Cite

This paper

Özyagcilar, M., Ahrens-Demirdal, N. E., Riesel, A., Lonsdorf, T. B., & Lincoln, T. M. (2026). The role of fear learning in the development of psychosis: an EEG study utilizing a differential fear conditioning paradigm in people with psychotic vulnerability. Schizophrenia (Heidelberg, Germany), 12(1), 45. https://doi.org/10.1038/s41537-026-00761-y

BibTeX

@article{ozyagcilar2026role,
author = {Özyagcilar, Metin and Ahrens-Demirdal, Nilay Esin and Riesel, Anja and Lonsdorf, Tina B and Lincoln, Tania M},
title = {{The role of fear learning in the development of psychosis: an EEG study utilizing a differential fear conditioning paradigm in people with psychotic vulnerability}},
journal = {Schizophrenia (Heidelberg, Germany)},
year = {2026},
month = may,
volume = {12},
number = {1},
pages = {45},
publisher = {Nature Publishing Group},
issn = {2754-6993},
doi = {10.1038/s41537-026-00761-y},
url = {https://doi.org/10.1038/s41537-026-00761-y},
pmid = {42140955},
pmcid = {PMC13179330}
}

RIS

TY - JOUR
AU - Özyagcilar, Metin
AU - Ahrens-Demirdal, Nilay Esin
AU - Riesel, Anja
AU - Lonsdorf, Tina B
AU - Lincoln, Tania M
TI - The role of fear learning in the development of psychosis: an EEG study utilizing a differential fear conditioning paradigm in people with psychotic vulnerability
T2 - Schizophrenia (Heidelberg, Germany)
J2 - Schizophrenia (Heidelb)
PY - 2026
DA - 2026/05/15
VL - 12
IS - 1
SP - 45
SN - 2754-6993
PB - Nature Publishing Group
DO - 10.1038/s41537-026-00761-y
UR - https://doi.org/10.1038/s41537-026-00761-y
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41537-026-00761-y",
"type": "article-journal",
"title": "The role of fear learning in the development of psychosis: an EEG study utilizing a differential fear conditioning paradigm in people with psychotic vulnerability",
"container-title": "Schizophrenia (Heidelberg, Germany)",
"author": [
{
"family": "Özyagcilar",
"given": "Metin"
},
{
"family": "Ahrens-Demirdal",
"given": "Nilay Esin"
},
{
"family": "Riesel",
"given": "Anja"
},
{
"family": "Lonsdorf",
"given": "Tina B"
},
{
"family": "Lincoln",
"given": "Tania M"
}
],
"container-title-short": "Schizophrenia (Heidelb)",
"volume": "12",
"issue": "1",
"page": "45",
"DOI": "10.1038/s41537-026-00761-y",
"PMID": "42140955",
"PMCID": "PMC13179330",
"ISSN": "2754-6993",
"publisher": "Nature Publishing Group",
"URL": "https://doi.org/10.1038/s41537-026-00761-y",
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
15
]
]
}
}

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.1073/pnas.2606871123 [code]
Oxytocin modulates the neurocomputational mechanisms engaged in learning rank relationships in social networks.
Journal: Proceedings of the National Academy of Sciences of the United States of America
In common: nlme, psych, broom, 6 other tools
[2] doi:10.1038/s41398-026-04010-9 [code]
Bullying victimization and brain development: a longitudinal structural magnetic resonance imaging study from adolescence to early adulthood.
Journal: Translational psychiatry
In common: nlme, psych, broom, 6 other tools
[3] doi:10.1371/journal.pbio.3003979 [code]
Impaired midfrontal‑motor theta phase synchronization characterizes maladaptive motivational behavior in people with obsessive‑compulsive disorder.
Journal: PLoS biology
In common: psych, EEGLAB, emmeans, 5 other tools, EEG, 1 reference
[4] doi:10.1371/journal.pone.0353990 [code]
Positive mood enhances accessibility of unrelated concepts in the first language but not in the foreign language.
Journal: PloS one
In common: psych, EEGLAB, emmeans, 4 other tools, EEG, 2 references
[5] doi:10.1038/s41467-026-71415-x [code]
Regional BOLD variability reflects microstructural maturation and neuronal ensheathment in the preterm infant cortex.
Journal: Nature communications
In common: nlme, psych, broom, 5 other tools
[6] doi:10.1126/sciadv.aec9291 [code]
Computational mechanisms of perception in autism revealed using games inspired by rodent operant tasks.
Journal: Science advances
In common: nlme, psych, broom, 5 other tools
[7] doi:10.1111/psyp.70265 [code]
Neurocognitive Dynamics of Translating Information From a Spatial Map Into Action.
Journal: Psychophysiology
In common: nlme, EEGLAB, emmeans, 4 other tools, EEG, 1 reference
[8] doi:10.1016/j.neuroimage.2026.122115 [code]
Midfrontal theta power relates to response speeding following frustrative nonreward.
Journal: NeuroImage
In common: psych, EEGLAB, emmeans, 4 other tools, EEG, 1 reference
[9] doi:10.1038/s41398-026-04122-2 [code]
Multi-session CBM-I for social anxiety: examining psychopathology, cognitive, neural, and psychophysiological effects in a randomized controlled trial.
Journal: Translational psychiatry
In common: nlme, psych, EEGLAB, 4 other tools, clinical / translational
[10] doi:10.1002/hbm.70605 [code]
BrainEnrich: Revealing Biological Insights for Imaging-Derived Phenotypes Through Transcriptomic Enrichment.
Journal: Human brain mapping
In common: nlme, EEGLAB, broom, 4 other tools

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.

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.