V1-V4-LFPs-and-Visual-Attention
This repositoty contains electrophysiologcal Data symultaneously recorded in V1 and V4 during a selective visual attention task, and code to access the data, retrieve metadata and run the analysis described in detail in:
Ferro D, van Kempen J, Boyd M, Panzeri S, Thiele A. PNAS 2021. Directed information exchange between cortical layers in macaque V1 and V4 and its modulation by selective attention. doi:10.1073/pnas.2022097118
And previously previewed in preprint form:
Ferro D, van Kempen J, Boyd M, Panzeri S, Thiele A. BioRxiv 2020. Directed information exchange between cortical layers in macaque V1 and V4 and its modulation by selective attention. doi:10.1101/2020.06.09.142190.
The folder Data contains LFP data sampled at frequency of 1017.375 Hz, digitalized at 32 bits. The data can be accessed through the inspection of included metadata at different levels: session (also occasionally coded as 'PEN'), trials (each with its specific randomized set of stimuli color, stimuli color order, task-related delays etc.), laminar compartment (Supra-, Granular, Infra-granular), attentional condition (RF, OUT1, OUT2; OUTrp in the case where trials for OUT are pooled by a random subset of equal size from OUT1 and OUT2), and task-related time windows (composed of 1024 time points respectively aligned as: PreStimulus, PostStimulus, PostCue, PreFirstDim, PreSecondDim, PreThirdDim).
The folder Code contains the main functions developed to perform tha analyses and the results presented in the paper.
The script 'getSubjectInfos()' accepts as input 'monkey 1' or 'monkey 2' and returns a data structure containing information about each recording session detailed by the subfields:
sInfos=getSubjectInfos(sName)
│ % sName valid inputs {'monkey 1', 'monkey 2'}; *REQUIRED FIELD
│
├─── subjectName % the subject name;
├─── penIDs % the ID of the sessions analysed;
├─── grcIDs %(not used) ID of task-conditions generating file;
├─── ctxIDs %(not used) ID of neural-related data setup;
└─── penInfos % a session-by-session data structure with session infos;
│
├─── dateTime % string indicating the date and time of recording;
├─── V1Contacts % structure containing information about V1 recording contacts;
│ ├─── Depths % channel depth priorly aligned to earliest CSD sink (see Methods);
│ ├─── Channels % 1:16 or 17:32, label of the channel on the recording probe;
│ ├─── ChRejected % (very rare) channels rejected due to exper. failure / probe drift;
│ ├─── ChSNRLowEq3 % channels with MUAe SNR <= 3 (see Methods);
│ ├─── Quality % 'OK','BAD', general comment about data quality by visual inspection;
│ ├─── LaminarAlignments % channel depth priorly aligned to earliest CSD sink binned at 0.15 mm;
│ ├─── LaminarLayers % 'TD'=too deep, 'I'=Infrag., 'G'=Gran., 'S'=Suprag., 'TS'=too superf.;
│ └─── SelectedChs % channels selected to be analysed
│
├─── V4Contacts
│ ├─── Depths % channel depth priorly aligned to earliest CSD sink (see Methods);
│ ├─── Channels % 1:16 or 17:32, ID of the channel used by experimenters;
│ ├─── ChRejected % (very rare) channels rejected due to exper. failure / probe drift;
│ ├─── ChSNRLowEq3 % channels with MUAe SNR <= 3 (see Methods);
│ ├─── Quality % 'OK','BAD', general comment about data quality by visual inspection;
│ ├─── LaminarAlignments % channel depth priorly aligned to earliest CSD sink binned at 0.15 mm;
│ ├─── LaminarLayers % 'TD'=too deep, 'I'=Infrag., 'G'=Gran., 'S'=Suprag., 'TS'=too superf.;
│ └─── SelectedChs % channels selected to be analysed
│
├─── penNum % ID of the session analysed (redundant, added for consistency checks);
├─── grcNum % (not used) # of task-conditions generating file;
├─── selectedTimeWinsFilePaths
│ ├─── V1Contacts.LFPs % filepath of V1 LFP data when automatically loaded (change if needed);
│ ├─── V1Contacts.MUAs % filepath of V1 MUA data when automatically loaded (deprecated);
│ ├─── V4Contacts.LFPs % filepath of V4 LFP data when automatically loaded (change if needed);
│ └─── V4Contacts.MUAs % filepath of V4 MUA data when automatically loaded (deprecated);
│
└─── grcColorOrder % char triplet with stimuli presentation order (e.g. 'RBG');
The script 'getSubjectData()' accepts as input 'monkey 1' or 'monkey 2' and returns a data structure containing information about each recording session detailed by the subfiels.
sData=getSubjectData(sName,sVisualArea,sPenNumber,sDataType,sSelectedTimeWins)
│ % sName % {'monkey 1', 'monkey 2'}; *REQUIRED FIELD
│ % sVisualArea % {'V1', 'V4'} *REQUIRED FIELD
│ % sPenNumber % {double, 'GOOD', 'ALL'} 'ALL' is default
│ % sDataType % {'LFPs', 'MUAEs', 'ALL'} 'LFPs' is default ('MUAEs' is deprecated)
│ % sSelectedTimeWins % {'PreStim','PostStim','Stationary','PostCue','PeFirstDim','PreSecondDim','PreThirdDim','ALL'} MUTUALLY EXCLUSIVE, 'ALL' is default
│
├─── subjectName % the subject name;
├─── penIDs % the ID of the sessions analysed;
├─── penInfos % a session-by-session data structure with session infos (see getSubjectInfos());
└─── LfpStruct % a session-by-session data structure with LFP data;
│
├─── Sorted % string with date and time of recording;
│ ├─── Labels % task-related metadata information;
│ │ ├─── Dimming % 1:3 stimulus at first, second or third dimming is attended;
│ │ ├─── Outcome % trial-by-trial behavioral outcome (0=successful/rewarded);
│ │ ├─── GratCondition % 1:36 unique task-related configuration (stimuli color x stimuli order x dimming order)
│ │ ├─── selectedNlxEvents % (deprecated) Neuralynx ID of events selected;
│ │ ├─── SupraChsLamAlignsBi % Channel index of selected Supra laminar alignments
│ │ ├─── GranrChsLamAlignsBi % Channel index of selected Granr laminar alignments
│ │ └─── InfraChsLamAlignsBi % Channel index of selected Infra laminar alignments
│ │
│ ├─── Delays % trial-by-trial dimming delays;
│ │ ├─── Stationary % stationary time window delay;
│ │ ├─── CueOnset % cue onset pseudo-random delay;
│ │ ├─── FirstDim % first dim pseudo-random delay;
│ │ ├─── SecondDim % second dim pseudo-random delay;
│ │ └─── ThirdDim % third dim pseudo-random delay;
│ │
│ ├─── Full.Supra
│ │ ├─── RF
│ │ │ ├─── PreStimDataBi % (chs x trials x 1024 timepoints) Pre-stimulus (≅ -1, 0 s before stimulus onset) LFPs bipolar derived
│ │ │ ├─── PostStimDataBi % (chs x trials x 1024 timepoints) Post-stimulus (≅ 0, 1 s after stimulus onset) LFPs bipolar derived
│ │ │ ├─── PostStimDataBiZSc % (chs x trials x 1024 timepoints) Post-stimulus (≅ 0, 1 s after stimulus onset) LFPs bipolar derived and Z-scored to Prestim (0 mean, 1 std)
│ │ │ ├─── StationaryDataBi % (chs x trials x 1024 timepoints) Stationary (≅ .2, 1.2 s after stimulus onset) LFPs bipolar derived
│ │ │ ├─── StationaryDataBiZSc % (chs x trials x 1024 timepoints) Post-stimulus (≅ .2, 1.2 s after stimulus onset) LFPs bipolar derived and Z-scored to Prestim (0 mean, 1 std)
│ │ │ ├─── PostCueDataBi % (chs x trials x 1024 timepoints) Post-cue (≅ 0, 1 s after cue onset) LFP data bipolar derived
│ │ │ ├─── PostCueDataBiZSc % (chs x trials x 1024 timepoints) Post-cue (≅ 0, 1 s after cue onset) LFP data bipolar derived and Z-scored to Prestim (0 mean, 1 std)
│ │ │ ├─── PreFirstDimDataBi % (chs x trials x 1024 timepoints) Pre-firstdim (≅ -1, 0 s before first dim) LFPs bipolar derived
│ │ │ ├─── PreFirstDimDataBiZSc % (chs x trials x 1024 timepoints) Pre-firstdim (≅ -1, 0 s before first dim) LFPs bipolar derived and Z-scored to Prestim (0 mean, 1 std)
│ │ │ ├─── PreSecondDimDataBi % (chs x trials x 1024 timepoints) Pre-seconddim (≅ -1, 0 s before second dim) LFPs bipolar derived
│ │ │ ├─── PreSecondDimDataBiZSc % (chs x trials x 1024 timepoints) Pre-seconddim (≅ -1, 0 s before second dim) LFPs bipolar derived and Z-scored to Prestim (0 mean, 1 std)
│ │ │ ├─── PreThirdDimDataBi % (chs x trials x 1024 timepoints) Pre-thirddim (≅ -1, 0 s before third dim) LFPs bipolar derived
│ │ │ ├─── PreThirdDimDataBiZSc % (chs x trials x 1024 timepoints) Pre-thirddim (≅ -1, 0 s before third dim) LFPs bipolar derived and Z-scored to Prestim (0 mean, 1 std)
│ │ │ ├─── gratCondFirstDim % trial-by-trial first dimming RF task configuration
│ │ │ ├─── gratCondSecondDim % trial-by-trial second dimming RF task configuration
│ │ │ └─── gratCondThirdDim % trial-by-trial third dimming RF task configuration
│ │ │
│ │ ├─── OUT1
│ │ │ ├─── PreStimDataBi % (chs x trials x 1024 timepoints) Pre-stimulus (approx. -1000, 0 ms before stimulus onset) LFP data bipolar derived
│ │ │ ├─── ...
│ │ │ └─── gratCondThirdDim % trial-by-trial third dimming OUT1 task configuration
│ │ │
│ │ └─── OUT2
│ │ ├─── PreStimDataBi % (chs x trials x 1024 timepoints) Pre-stimulus (approx. -1000, 0 ms before stimulus onset) LFP data bipolar derived
│ │ ├─── ...
│ │ └─── gratCondThirdDim % trial-by-trial third dimming OUT2 task configuration
│ │
│ ├─── Full.Granr % (see Full.Supra)
│ │ ├─── RF
│ │ ├─── ...
│ │ └─── OUT2
│ │
│ └─── Full.Infra % (see Full.Supra)
│ ├─── RF
│ ├─── ...
│ └─── OUT2
│
└─── penNum % ID of the session analysed (redundant, added for consistency checks);
The script 'process_Spectral_Power_V1V4_AllTimeWins()' performs spectral power analysis for each subject in V1 or in V4 and reports results organised session-by-session in the data structure 'PmtStruct' for all task-related time windows (depends on: 'support_tools.zip', 'support_routines.zip' included in the folder, please unzip in the local folder before running this script);
The script 'process_Spectral_Coherence_V1V4_PreFirstDim()' performs spectral coherence analysis for each subject within V1, within V4, between V1-V4 depths, in the task time window before first stimulus dimming (though varying time window is very handy) and reports results organised session-by-session in the data structures: 'sCohV1Struct', 'sCohV4Struct' and 'SCohV1V4Struct' (depends on: 'support_tools.zip', 'support_routines.zip' included in the folder, please unzip in the local folder before running this script);
The script 'process_cGC_within_V1V4_MultiMethods_PreFirstDim()' performs cGC analysis and plots results at the local level of columns V1 and V4 respectively, in the task time window before first stimulus dimming (though varying time window is very handy). Results are organised session-by-session in the data structure 'sGCsStruct' (depends on: 'support_tools.zip', 'support_routines.zip' included in the folder, please unzip in the local folder before running this script);
The script 'process_cGC_between_V1V4_MultiMethods_PreFirstDim()' performs cGC analysis and plots results at the inter-areal level between V1 and V4, in the task time window before first stimulus dimming (though varying time window is very handy). Results are organised session-by-session in the data structure 'sGCsStructV1V4' (depends on: 'support_tools.zip', 'support_routines.zip' included in the folder, please unzip in the local folder before running this script);