Metadata-Version: 2.4
Name: autoclean-eeg
Version: 2.0.2
Summary: A modular framework for automated EEG data processing, built on MNE-Python
Project-URL: Homepage, https://github.com/cincibrainlab/autoclean_pipeline
Project-URL: Repository, https://github.com/cincibrainlab/autoclean_pipeline
Project-URL: Documentation, https://cincibrainlab.github.io/autoclean_pipeline/
Project-URL: Issues, https://github.com/cincibrainlab/autoclean_pipeline/issues
Author-email: Gavin Gammoh <gavin.gammoh@cchmc.org>, Ernest Pedapati <ernest.pedapati@cchmc.org>
License: MIT License
        
        Copyright (c) 2024 Cincinnati Children's Hospital Medical Center
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE. 
License-File: LICENSE
Keywords: bids,eeg,electrophysiology,mne-python,neuroscience,preprocessing,signal-processing
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
Requires-Python: <3.13,>=3.10
Requires-Dist: autoreject>=0.3.0
Requires-Dist: bctpy>=0.6.1
Requires-Dist: cython>=0.29.0
Requires-Dist: defusedxml
Requires-Dist: eeglabio>=0.0.3
Requires-Dist: fastparquet>=2024.11.0
Requires-Dist: fooof>=1.1.0
Requires-Dist: loguru>=0.6.0
Requires-Dist: matplotlib>=3.4.0
Requires-Dist: mne-bids>=0.10
Requires-Dist: mne-connectivity>=0.7.0
Requires-Dist: mne-icalabel>=0.7.0
Requires-Dist: mne>=1.7.0
Requires-Dist: networkx>=3.4.2
Requires-Dist: nibabel>=5.3.2
Requires-Dist: numpy>=1.20.0
Requires-Dist: pandas>=1.3.0
Requires-Dist: platformdirs>=3.0.0
Requires-Dist: pybv>=0.6.0
Requires-Dist: pydantic>=2.0
Requires-Dist: pyprep>=0.3.0
Requires-Dist: python-dotenv>=0.19.0
Requires-Dist: python-picard==0.8
Requires-Dist: python-ulid>=1.0.0
Requires-Dist: pyyaml>=5.1
Requires-Dist: reportlab>=3.6.0
Requires-Dist: rich>=10.0.0
Requires-Dist: schema>=0.7.0
Requires-Dist: scipy>=1.7.0
Requires-Dist: seaborn>=0.13.2
Requires-Dist: torch>=1.9.0
Provides-Extra: ai
Requires-Dist: openai>=1.78.1; extra == 'ai'
Provides-Extra: docs
Requires-Dist: mkdocs; extra == 'docs'
Requires-Dist: mkdocs-git-revision-date-localized-plugin; extra == 'docs'
Requires-Dist: mkdocs-glightbox; extra == 'docs'
Requires-Dist: mkdocs-material; extra == 'docs'
Requires-Dist: mkdocstrings-python>=1.16.2; extra == 'docs'
Requires-Dist: mkdocstrings>=0.20.0; extra == 'docs'
Provides-Extra: gui
Requires-Dist: mne-qt-browser>=0.3.0; extra == 'gui'
Requires-Dist: pyjsonviewer>=0.1.0; extra == 'gui'
Requires-Dist: pymupdf; extra == 'gui'
Requires-Dist: pymupdf>=1.0.0; extra == 'gui'
Requires-Dist: pyqt5>=5.15.0; extra == 'gui'
Requires-Dist: pyside6>=6.5.0; extra == 'gui'
Requires-Dist: pyvistaqt>=0.11.2; extra == 'gui'
Requires-Dist: qtpy>=2.4.3; extra == 'gui'
Requires-Dist: textual-dev>=0.11.0; extra == 'gui'
Requires-Dist: textual>=0.11.0; extra == 'gui'
Description-Content-Type: text/markdown

# AutoClean EEG

[![Python](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/downloads/)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

A modular framework for automated EEG data processing, built on MNE-Python.

## Features

- Framework for automated EEG preprocessing with "lego block" modularity
- Support for multiple EEG paradigms (ASSR, Chirp, MMN, Resting State) 
- BIDS-compatible data organization and comprehensive quality control
- Extensible plugin system for file formats, montages, and event processing
- Research-focused workflow: single file testing → parameter tuning → batch processing
- Detailed output: logs, stage files, metadata, and quality control visualizations

## Installation

```bash
pip install autoclean-eeg
```

For development installation:

```bash
git clone https://github.com/cincibrainlab/autoclean_pipeline.git
cd autoclean-eeg
uv tool install -e --upgrade ".[dev]"
```

## Quick Start

AutoClean EEG offers two approaches for building custom EEG processing workflows:

### Option 1: Python Task Files (Recommended for New Users)

Create simple Python files that combine configuration and processing logic:

```python
# my_task.py
from typing import Any, Dict
from autoclean.core.task import Task

# Embedded configuration
config = {
    'resample_step': {'enabled': True, 'value': 250},
    'filtering': {'enabled': True, 'value': {'l_freq': 1, 'h_freq': 100}},
    'ICA': {'enabled': True, 'value': {'method': 'picard'}},
    'epoch_settings': {'enabled': True, 'value': {'tmin': -1, 'tmax': 1}}
}

class MyRestingTask(Task):
    def __init__(self, config: Dict[str, Any]):
        self.settings = globals()['config']
        super().__init__(config)
    
    def run(self) -> None:
        self.import_raw()
        self.run_basic_steps(export=True)
        self.run_ica(export=True)
        self.create_regular_epochs(export=True)
```

```python
# Use your custom task
from autoclean import Pipeline

pipeline = Pipeline(output_dir="/path/to/output")
pipeline.add_task("my_task.py")
pipeline.process_file("/path/to/data.raw", task="MyRestingTask")
```

### Option 2: Traditional YAML Configuration

For complex workflows or when you prefer separate config files:

```python
from autoclean import Pipeline

# Initialize pipeline with YAML configuration
pipeline = Pipeline(
    output_dir="/path/to/output"
)

# Process using built-in tasks
pipeline.process_file(
    file_path="/path/to/test_data.raw", 
    task="rest_eyesopen"
)
```

### Typical Research Workflow

1. **Test single file** to validate task and tune parameters
2. **Review results** in output directories and adjust as needed  
3. **Process full dataset** using batch processing

```python
# Batch processing (works with both approaches)
pipeline.process_directory(
    directory="/path/to/dataset",
    task="MyRestingTask",  # or built-in task name
    pattern="*.raw"
)
```

**Key Benefits of Python Task Files:**
- **Simpler**: No separate YAML files to manage
- **Self-contained**: Configuration and logic in one file
- **Flexible**: Optional `export=True` parameters control file outputs
- **Intuitive**: Pandas-like API with sensible defaults

## Documentation

Full documentation is available at [https://cincibrainlab.github.io/autoclean_pipeline/](https://cincibrainlab.github.io/autoclean_pipeline/)

## Contributing

We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Citation

If you use this software in your research, please cite:

```bibtex
@software{autoclean_eeg,
  author = {Gammoh, Gavin, Pedapati, Ernest, and Grace Westerkamp},
  title = {AutoClean EEG: Automated EEG Processing Pipeline},
  year = {2024},
  publisher = {GitHub},
  url = {[https://github.com/yourusername/autoclean-eeg](https://github.com/cincibrainlab/autoclean_pipeline/)}
}
```

## Acknowledgments

- Cincinnati Children's Hospital Medical Center
- Built with [MNE-Python](https://mne.tools/)
