Pipeline inputs#

Input file paths#

Argument

Description

Example

vhdr_files (required)

List of raw EEG file paths

c("raw/Vp01.vhdr", "raw/Vp02.vhdr", ...)

Nested list if (some) participants have multiple EEG files or

list(c("raw/Vp01_a.vhdr", "raw/Vp01_b.vhdr"), "raw/Vp02.vhdr", ...)

Directory path with raw EEG files

"raw"

log_files (required)

List of behavioral log file paths

c("log/Vp01.txt", "log/Vp02.txt", ...)

Directory of raw EEG files

"log"

Output file paths#

Argument

Description

Example

output_dir (required)

Output directory

"data/output"

clean_dir (default: NULL)

Cleaned (continuous) data output directory

"data/clean"

epochs_dir (default: NULL)

Epoched data output directory

"data/clean"

report_dir (default: NULL)

HTML quality control report output directory

"data/reports"

to_df (default: TRUE)

Save outputs as data frames with comma-separated values or

TRUE

Save outputs as MNE-Python (.fif) files or

FALSE

Save outputs as data frames and MNE-Python files

"both"

Preprocessing options#

Argument

Description

Example

downsample_sfreq (default: NULL)

Downsample to lower sampling rate or

250.0

Do not downsample

NULL

veog_channels (default: "auto")

Construct bipolar VEOG from two EEG or EOG channels or

c("Fp1", "IO1")

Construct VEOG from default channels or

"auto"

Do not construct a new VEOG channel

NULL

heog_channels (default: "auto")

Construct bipolar HEOG from two EEG or EOG channels or

c("F9", "F10")

Construct HEOG from default channels or

"auto"

Do not construct a new HEOG channel

NULL

montage (default: "easycap-M1")

Standard EEG montage name or

"easycap-M1"

Custom EEG montage file path

"data/chanlocs.elc"

ref_channels (default: "average")

List of channels to re-reference EEG channels to or

c("M1", "M2")

Re-reference EEG channels to an average reference or

"average"

Use the Reference Electrode Standardization Technique (REST)

"REST"

bad_channels (default: NULL)

Lists of bad channels for each participant or

list(c("P7", "Oz"), c("Fp2"), ...)

Dict with participant labels and their list of bad channels or

list("Vp05" = list("PO8", "O2"), ...)

Auto-detect bad channels based on standard error across epochs or

"auto"

Don’t interpolate any bad channels

NULL

besa_files (default: NULL)

Directory of BESA/MSEC correction matrix files or

"data/cali"

List of BESA/MSEC correction matrix file paths or

c("data/cali/Vp01.matrix", "data/cali/Vp02.matrix", ...)

Don’t use BESA/MSEC ocular correction

NULL

ica_method (default: NULL)

ICA method or

"fastica" or "infomax" or "picard"

Don’t apply ICA

NULL

ica_n_components (default: NULL)

Number of ICA components to use or

15

Proportion of variance explained by ICA components or

0.99

Use (almost) all possible ICA components

NULL

highpass_freq (default: 0.1)

High-pass filter cutoff frequency or

0.1

Do not apply high-pass filter

NULL

lowpass_freq (default: 40.0)

Low-pass filter cutoff frequency or

40.0

Do not apply low-pass filter

NULL

Epoching options#

Argument

Description

Example

triggers (recommended, default: NULL)

Numerical EEG triggers for events of interest

c(201, 202)

triggers_column (default: NULL)

Name of log file column with EEG triggers for automatic matching

"trigger"

epochs_tmin (default: -0.5)

Start of epochs relative to event onset (in s)

-0.5

epochs_tmax (default: 1.5)

End of epochs relative to event onset (in s)

1.5

baseline (default: c(-0.2, 0.0))

Time window for baseline correction (in s) or

c(-0.2, 0.0)

Use entire prestimulus interval or

c(NULL, 0.0)

Do not perform baseline correction

NULL

reject_peak_to_peak (default: 200.0)

Peak-to-peak threshold for rejecting epochs (in µV) or

200.0

Do not reject epochs based on peak-to-peak amplitude

NULL

components (recommended, default: NULL)

Definition of single trial ERP components of interest

list("name" = list("P1", "N170"), "tmin" = list(0.08, 0.15), "tmax" = list(0.13, 0.2), "roi" = list(c("PO3", ...), c("P7", ...)))

Averaging options#

Argument

Description

Example

average_by (recommended, default: NULL)

Selection of (combinations of) conditions to create by-participant averages for (keys = custom condition labels, values = Pandas query)

list("neg_unrel" = "context == 'negative' & semantics == 'unrelated' & rt < 3000", ...)

Time-frequency analsis options#

Argument

Description

Example

perform_tfr (default: FALSE)

Enable time-frequency analysis or

TRUE or FALSE

tfr_subtract_evoked (default: FALSE)

Subtract evoked activity from epochs before time-frequency analysis or

TRUE or FALSE

tfr_freqs (default: seq(4.0, 40.0, length.out = 37))

Frequencies for the family of Morlet wavelets

seq(6.0, 41.0, by = 2.0)

tfr_cycles (default: seq(2.0, 20.0, length.out = 37))

Numbers of cycles for the family of Morlet wavelets

seq(2.0, 21.0, by = 1.0)

tfr_mode (default: "percent")

Method for divisive baseline correction of event-related power using the full epoch interval (Delorme & Grandchamp, 2012)

"percent" or "ratio" or "logratio" or "zscore" or "zlogratio" or NULL

tfr_baseline (default: c(-0.45, -0.05))

Time window for subtractive baseline correction of event-related power

c(-0.45, -0.05)

tfr_components (default: NULL)

Similar to components, the definition of single trial event-related power bands of interest

list("name" = list("alpha"), "tmin" = list(0.05), "tmax" = list(0.25), "fmin" = list(8.0), "fmax" = list(13.0), "roi" = list(c("PO9", ...)))

Permutation test options#

Argument

Description

Example

perm_contrasts (default: NULL)

Contrast(s) between condition labels (see average_by) to compute cluster-based permutation tests for

list(c("related", "unrelated"))

perm_tmin (default: 0.0)

Start of time window (in s relative to stimulus onset) for restricting the permutation test

0.0 or NULL (i.e., use entire epoch)

perm_tmax (default: 1.0)

End of time window (in s relative to stimulus onset) for restricting the permutation test

1.0 or NULL (i.e., use entire epoch)

perm_channels (default: NULL)

Selection of channels for restricting the permutation test

c("C1", "Cz", "C2", ...) or NULL (i.e., use all channels)

perm_fmin (default: NULL)

Lowest frequency (in Hz) for restricting the permutation test (event-related power only)

8.0 or NULL (i.e., use all frequencies)

perm_fmax (default: NULL)

Highest frequency (in Hz) for restricting the permutation test (event-related power only)

30.0 or NULL (i.e., use all frequencies)

Performance options#

Argument

Description

Example

n_jobs (default: 1)

Number of jobs (i.e., participants) to be processed in parallel

4 or -1 (i.e., use all CPUs)