Skip to content

Latest commit

 

History

History
54 lines (43 loc) · 3.03 KB

README.md

File metadata and controls

54 lines (43 loc) · 3.03 KB

sleepeegpy

sleepeegpy is a high-level package built on top of MNE-python, yasa, PyPREP and specparam (fooof) for preprocessing, analysis, and visualization of sleep EEG data.

The repository also includes a Jupyter notebook demonstrating how to use this package and provides a ready-made workflow for common use cases. image

Installation

Prerequisites

  • Python Version: Ensure you have Python version >3.9 and <3.12 installed.

Steps

  1. Create a Python Virtual Environment: Create a Python virtual environment. For more information you can refer to python venv, virtualenv or conda.
  2. Activate the Environment
  3. Install sleepeegpy:
    pip install sleepeegpy
  4. Download notebooks: Download this repository zip folder, you will need only the notebooks folder.

Quickstart

The notebooks are useful for familiarizing yourself with the library's functionalities. To use them:

  1. Navigate to the Pipeline Notebooks folder and run Jupyter.
    jupyter notebook
  2. Open the complete_pipeline notebook using Jupyter Notebook within the activated environment and follow the instructions.

Additionally, detailed documentation is available for further reference.

RAM requirements

For overnight, high-density (256 channels) EEG recordings downsampled to 250 Hz expect at least 64 GB RAM expenditure for cleaning, spectral analyses, and event detection.

Citation

  • Belonosov, G., Falach, R., Schmidig, J.F., Aderka, M., Zhelezniakov, V., Shani-Hershkovich, R., Bar, E., Nir, Y. "SleepEEGpy: a Python-based software “wrapper” package to organize preprocessing, analysis, and visualization of sleep EEG data." bioRxiv (2023). doi: https://doi.org/10.1101/2023.12.17.572046
  • Belonosov, G., Falach, R., Schmidig, F., Aderka, M., Zhelezniakov, V., Shani-Hershkovich, R., Bar, E., & Nir, Y. (2024). SleepEEGpy: A Python-based package for preprocessing, analysis, and visualization of sleep EEG data [Dataset]. Zenodo. https://doi.org/10.5281/ZENODO.13903088

Troubleshooting

Installation error on macOS - `libomp` not found

If you encounter the following error when installing sleepeegpy on macOS:

ERROR: Could not find a version that satisfies the requirement libomp (from versions: none)
ERROR: No matching distribution found for libomp

You can resolve this by running:

brew install cmake libomp
pip install lightgbm
pip install sleepeegpy