Paper: Electrophysiological decoding captures the temporal trajectory of face categorization in infants
Roman Kessler & Michael A. Skeide
When using, please cite:
-
Kessler, R., & Skeide, M. A. (2024). Electrophysiological decoding captures the temporal trajectory of face categorization in infants. bioRxiv. https://doi.org/10.1101/2024.10.07.617144
-
Kessler, R., & Skeide, M. A. (2024). EEG Dataset of 38 Infants (Aged 5-11 Months) Viewing Human and Monkey Faces (Two Identities Each) (1.0) [Data set]. Zenodo. https://doi.org/10.5281/zenodo.13881206
The raw data can be downloaded at https://doi.org/10.5281/zenodo.13881207.
The conda environment is saved in folder env. All python/bash/slurm scripts are found in src.
To create the conda environment use
conda env create -f environment.yml
The system architecture and hardware details of the HPC used for all Python and Bash scripts with SLURM job scheduling system can be found in MPCDF RAVEN user guide.
The R environment, which is used in a targets pipeline and all related processing scripts are found in targets.
packages <-c("dplyr", "magrittr", "ggplot2", "ggpubr", "grid", "png", "reader", "permuco")
install.packages(packages)
The system architecture and hardware details of the Mac used to process the targets pipeline in R can be found here. A 16 GB RAM version was used.
For all scripts, adjust the paths depending on your environment. Run the following on a HPC cluster with SLURM job scheduling system.
Preprocessing (starts one job per participant and session):
⏳ 10 minutes per session
bash src/run_preprocess.sh
Time-resolved decoding (starts one job per participant), incl. interpretation:
⏳ <=10 hours per participant
bash src/run_predictions_timeresolved_merge.sh
EEGNet decoding (starts one job per participant and contrast).
⏳ <=24 hours per participant and contrast. Make sure to set appropriate time limit in run_prediction.slurm.
bash src/run_predictions_braindecode_merge.sh
Postprocessing of
- Time-resolved decoding
- Time-resolved interpretation
- EEGNet decoding
⏳ 30 minutes
python src/postprocess_accuracies.py
⏳ 1 minute each
- demographics.ipynb will output the demographic information for the manuscript (see Methods)
- dnn_stimulus_representation.ipynb is an analysis of stimulus embeddings (see Methods)
- interpret_timeresolved.ipynb performs a group analysis for the model interpretation of the time-resolved decoding (Fig. 2)
⏳ 10 minutes
The targets pipeline includes all remaining analyses and outputs all plots. Other numbers are written in the respective processing nodes. The project can be opened in RStudio. The _targets.R file needs to be sourced. Then, tar_make()
produces all results or re-runs all outdated nodes of the network.
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.