Drops (rejects) bad epochs from MNE Epochs files by their indices using MNE-Python's Epochs.drop() method. This app is useful for:
- Removing epochs marked as artifacts or bad quality
- Removing epochs by index from a separate quality control analysis
- Cleaning up epoched data for subsequent analysis
The app generates:
- An epochs file with the specified epochs removed
- A text summary of the dropped epochs
- An HTML report with before/after epoch visualizations
- A
product.jsonwith metadata about the dropped epochs
mne(neuro/meeg/mne/epochs): epoched file to remove epochs from (required)events(neuro/meg/fif-override): special-case input whoseevents.tsvcontains a single line of comma-separated indices of bad trials to drop (optional)
out_dir/meg-epo.fif(neuro/meeg/mne/epochs): epochs file with the specified epochs removedout_dir/info.txt: summary of dropped and remaining epochsout_figs/: PNG plots of epochs before dropping and of the epochs dropped from theeventsfile /dropconfigout_report/report.html: HTML report with the original, dropped, and remaining epochsproduct.json: metadata about dropped epochs
| key | type | default | description |
|---|---|---|---|
mne |
input (neuro/meeg/mne/epochs) |
required | path to the input MNE epochs file (.fif format) |
events |
input (neuro/meg/fif-override) |
"" (optional) |
path to an events.tsv-style file whose contents are a comma-separated list of epoch indices to drop |
drop |
string | "" (optional) |
comma-separated list of epoch indices to drop (e.g., "1, 5, 16") |
If both events and drop are provided, the union of both sets of indices is used.
- Go to the drop-bad-epo app page on Brainlife.io.
- Select an MNE epochs file as the
mneinput. - Optionally select an
eventsinput, and/or set thedropparameter to a comma-separated list of epoch indices. - Submit the process and retrieve the resulting epochs file, report, and
product.jsononce it completes.
# Set up a config.json, e.g.:
# {
# "mne": "in_dir/meg-epo.fif",
# "drop": "1,5,10"
# }
./main- Execution: Python with MNE-Python and the shared
brainlife_utilslibrary - Data format: MNE
.fifformat (compatible with all downstream Brainlife.io apps) - Epoch dropping: Uses MNE's
Epochs.drop()method for reliable epoch removal - Index handling: Supports comma-separated indices or file-based index lists
- Maximilien Chaumon, Paris Brain Institute
We kindly ask that you cite the following articles when publishing papers and code using this app:
Hayashi, S., Caron, B.A., Heinsfeld, A.S. et al. brainlife.io: a decentralized and open-source cloud platform to support neuroscience research. Nat Methods 21, 809–813 (2024). https://doi.org/10.1038/s41592-024-02237-2
Gramfort, A. et al. MEG and EEG data analysis with MNE-Python. Front. Neurosci. 7, 267 (2013). https://doi.org/10.3389/fnins.2013.00267
brainlife.io is publicly funded and for the sustainability of the project we kindly ask that you acknowledge the following funding sources:
Copyright (c) 2026 MEEG Brainlife team. Licensed under AGPL-3.0, see license.txt.