neurodent


Nameneurodent JSON
Version 0.2.0 PyPI version JSON
download
home_pageNone
SummaryRodent EEG analysis tools
upload_time2025-10-26 03:59:31
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseNone
keywords eeg rodent neuroscience data analysis pipeline pythoneeg pyeeg
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Neurodent

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15780751.svg)](https://doi.org/10.5281/zenodo.15780751)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/josephdong1000/Neurodent/HEAD) 
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/josephdong1000/neurodent/)


> Presented at [USRSE'25](https://doi.org/10.5281/zenodo.17274681)!

A Python package for standardizing rodent EEG analysis and figure generation. Various EEG formats are loadable and features are extracted in parallel. Also includes a Snakemake workflow for automated analysis.

## Usage

Tutorial: *WIP!*

API documentation: https://josephdong1000.github.io/neurodent/

## Overview

Neurodent provides two main analysis workflows:

1. **Windowed Analysis Results (WAR)** - Extracts features from continuous EEG data divided into time windows
2. **Spike Analysis Results (SAR)** - Analyzes spike-sorted neural data and integrates it with EEG features

The library supports multiple data formats (binary files, SpikeInterface recordings, MNE objects) and includes parallel processing capabilities using Dask for large datasets.

### Features Extracted

#### Linear Features (single values per channel)
- **RMS amplitude** - Root mean square of the signal
- **Log RMS amplitude** - Logarithm of RMS amplitude  
- **Amplitude variance** - Variance of signal amplitude
- **Log amplitude variance** - Logarithm of amplitude variance
- **PSD total power** - Total power spectral density across frequency band
- **Log PSD total power** - Logarithm of total PSD power
- **PSD slope** - Slope of power spectral density on log-log scale
- **Spike count** - Number of detected spikes
- **Log spike count** - Logarithm of spike count

#### Band Features (values per frequency band)
- **PSD band power** - Power spectral density for each frequency band
- **Log PSD band power** - Logarithm of PSD band power
- **PSD fractional power** - PSD band power as fraction of total power
- **Log PSD fractional power** - Logarithm of PSD fractional power

#### Connectivity Features
- **Coherence** - Spectral coherence between channels
- **Pearson correlation** - Pearson correlation coefficient between channels

#### Frequency Domain
- **Power Spectral Density** - Full power spectral density with frequency coordinates

#### Frequency Bands
- **Delta**: 0.1-4 Hz, **Theta**: 4-8 Hz, **Alpha**: 8-13 Hz, **Beta**: 13-25 Hz, **Gamma**: 25-40 Hz

#### Basic Workflow
1. **Load Data**: Use `LongRecordingOrganizer` to load EEG recordings from various formats
2. **Windowed Analysis**: Create `AnimalOrganizer` to compute features across time windows
3. **Spike Analysis**: Integrate spike-sorted data from `MountainSortAnalyzer`
4. **Visualization**: Generate plots using `ExperimentPlotter` and `AnimalPlotter`

#### Example Usage
```python
# Load and organize recordings
lro = LongRecordingOrganizer(data_path, mode="bin")
ao = AnimalOrganizer(lro)

# Compute windowed analysis
war = ao.compute_windowed_analysis(features=["rms", "psdband", "cohere"])

# Generate plots
ep = ExperimentPlotter([war])
ep.plot_feature("rms", groupby="genotype")
```

#### Advanced Features
- **Flexible Data Loading**: Neurodent uses MNE and SpikeInterface loaders in Python and custom loaders for proprietary formats using MATLAB, including:
  - Neuroscope/Neuralynx (.dat, .eeg)
  - Open Ephys (.continuous)
  - NWB (.nwb) neurophysiology format
  - Binary (.bin) files
- **Bad Channel Detection**: Automatic identification of bad channels using Local Outlier Factor
- **Multi-processing**: Parallel/distributed processing with Dask for large datasets
- **Data Filtering**: Built-in filtering for artifacts and outliers
- **Flexible Grouping**: Group analysis by genotype, time of day, recording session, etc.

## Snakemake Workflow

A companion Snakemake workflow is provided for building automated Neurodent analysis pipelines.

The workflow processes multiple animals in parallel through WAR generation, quality filtering, fragment/channel filtering, and statistical analysis with SLURM cluster integration.

To run Snakemake on a specific computing environment, first create a [Snakemake profile](https://github.com/snakemake-profiles/doc), then run Snakemake:

```bash
# Run the complete workflow
snakemake
```

## Acknowledgements

This project benefited from insights and best practices described in Peter K. G. Williams’s [One Good Tutorial](https://onegoodtutorial.org/).

## Citation

If you find Neurodent useful, please cite our work!

```bibtex
@misc{https://doi.org/10.5281/zenodo.17051374,
  doi = {10.5281/ZENODO.17051374},
  url = {https://zenodo.org/doi/10.5281/zenodo.17051374},
  author = {Dong,  Joseph and Yongtaek Oh,   and Marsh,  Eric},
  title = {josephdong1000/PyEEG: 0.1.1},
  publisher = {Zenodo},
  year = {2025},
  copyright = {MIT License}
}
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "neurodent",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "EEG, rodent, neuroscience, data analysis, pipeline, PythonEEG, PyEEG",
    "author": null,
    "author_email": "Joseph Dong <dongjp@chop.edu>, Yongtaek Oh <ohy2@chop.edu>, Eric Marsh <marshe@chop.edu>",
    "download_url": "https://files.pythonhosted.org/packages/b8/b8/0ea664036678776f60fcc3e07a903447fcca50a02451793b9e6700e30fc7/neurodent-0.2.0.tar.gz",
    "platform": null,
    "description": "# Neurodent\n\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15780751.svg)](https://doi.org/10.5281/zenodo.15780751)\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/josephdong1000/Neurodent/HEAD) \n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/josephdong1000/neurodent/)\n\n\n> Presented at [USRSE'25](https://doi.org/10.5281/zenodo.17274681)!\n\nA Python package for standardizing rodent EEG analysis and figure generation. Various EEG formats are loadable and features are extracted in parallel. Also includes a Snakemake workflow for automated analysis.\n\n## Usage\n\nTutorial: *WIP!*\n\nAPI documentation: https://josephdong1000.github.io/neurodent/\n\n## Overview\n\nNeurodent provides two main analysis workflows:\n\n1. **Windowed Analysis Results (WAR)** - Extracts features from continuous EEG data divided into time windows\n2. **Spike Analysis Results (SAR)** - Analyzes spike-sorted neural data and integrates it with EEG features\n\nThe library supports multiple data formats (binary files, SpikeInterface recordings, MNE objects) and includes parallel processing capabilities using Dask for large datasets.\n\n### Features Extracted\n\n#### Linear Features (single values per channel)\n- **RMS amplitude** - Root mean square of the signal\n- **Log RMS amplitude** - Logarithm of RMS amplitude  \n- **Amplitude variance** - Variance of signal amplitude\n- **Log amplitude variance** - Logarithm of amplitude variance\n- **PSD total power** - Total power spectral density across frequency band\n- **Log PSD total power** - Logarithm of total PSD power\n- **PSD slope** - Slope of power spectral density on log-log scale\n- **Spike count** - Number of detected spikes\n- **Log spike count** - Logarithm of spike count\n\n#### Band Features (values per frequency band)\n- **PSD band power** - Power spectral density for each frequency band\n- **Log PSD band power** - Logarithm of PSD band power\n- **PSD fractional power** - PSD band power as fraction of total power\n- **Log PSD fractional power** - Logarithm of PSD fractional power\n\n#### Connectivity Features\n- **Coherence** - Spectral coherence between channels\n- **Pearson correlation** - Pearson correlation coefficient between channels\n\n#### Frequency Domain\n- **Power Spectral Density** - Full power spectral density with frequency coordinates\n\n#### Frequency Bands\n- **Delta**: 0.1-4 Hz, **Theta**: 4-8 Hz, **Alpha**: 8-13 Hz, **Beta**: 13-25 Hz, **Gamma**: 25-40 Hz\n\n#### Basic Workflow\n1. **Load Data**: Use `LongRecordingOrganizer` to load EEG recordings from various formats\n2. **Windowed Analysis**: Create `AnimalOrganizer` to compute features across time windows\n3. **Spike Analysis**: Integrate spike-sorted data from `MountainSortAnalyzer`\n4. **Visualization**: Generate plots using `ExperimentPlotter` and `AnimalPlotter`\n\n#### Example Usage\n```python\n# Load and organize recordings\nlro = LongRecordingOrganizer(data_path, mode=\"bin\")\nao = AnimalOrganizer(lro)\n\n# Compute windowed analysis\nwar = ao.compute_windowed_analysis(features=[\"rms\", \"psdband\", \"cohere\"])\n\n# Generate plots\nep = ExperimentPlotter([war])\nep.plot_feature(\"rms\", groupby=\"genotype\")\n```\n\n#### Advanced Features\n- **Flexible Data Loading**: Neurodent uses MNE and SpikeInterface loaders in Python and custom loaders for proprietary formats using MATLAB, including:\n  - Neuroscope/Neuralynx (.dat, .eeg)\n  - Open Ephys (.continuous)\n  - NWB (.nwb) neurophysiology format\n  - Binary (.bin) files\n- **Bad Channel Detection**: Automatic identification of bad channels using Local Outlier Factor\n- **Multi-processing**: Parallel/distributed processing with Dask for large datasets\n- **Data Filtering**: Built-in filtering for artifacts and outliers\n- **Flexible Grouping**: Group analysis by genotype, time of day, recording session, etc.\n\n## Snakemake Workflow\n\nA companion Snakemake workflow is provided for building automated Neurodent analysis pipelines.\n\nThe workflow processes multiple animals in parallel through WAR generation, quality filtering, fragment/channel filtering, and statistical analysis with SLURM cluster integration.\n\nTo run Snakemake on a specific computing environment, first create a [Snakemake profile](https://github.com/snakemake-profiles/doc), then run Snakemake:\n\n```bash\n# Run the complete workflow\nsnakemake\n```\n\n## Acknowledgements\n\nThis project benefited from insights and best practices described in Peter K. G. Williams\u2019s [One Good Tutorial](https://onegoodtutorial.org/).\n\n## Citation\n\nIf you find Neurodent useful, please cite our work!\n\n```bibtex\n@misc{https://doi.org/10.5281/zenodo.17051374,\n  doi = {10.5281/ZENODO.17051374},\n  url = {https://zenodo.org/doi/10.5281/zenodo.17051374},\n  author = {Dong,  Joseph and Yongtaek Oh,   and Marsh,  Eric},\n  title = {josephdong1000/PyEEG: 0.1.1},\n  publisher = {Zenodo},\n  year = {2025},\n  copyright = {MIT License}\n}\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Rodent EEG analysis tools",
    "version": "0.2.0",
    "project_urls": {
        "Documentation": "https://josephdong1000.github.io/neurodent/",
        "Homepage": "https://github.com/josephdong1000/neurodent",
        "Issue Tracker": "https://github.com/josephdong1000/neurodent/issues",
        "Repository": "https://github.com/josephdong1000/neurodent"
    },
    "split_keywords": [
        "eeg",
        " rodent",
        " neuroscience",
        " data analysis",
        " pipeline",
        " pythoneeg",
        " pyeeg"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "576ecec050bbd4ff7119fcc2a6c52b4e2b3e902662e83cdfc31d617077c0b390",
                "md5": "7962c92299a1a27c4f48ee23d06ebbdc",
                "sha256": "623736d13a5f568090101f2d93321fe2eb2b447af48d256ed13a7b2d05899bb6"
            },
            "downloads": -1,
            "filename": "neurodent-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7962c92299a1a27c4f48ee23d06ebbdc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 109643,
            "upload_time": "2025-10-26T03:59:29",
            "upload_time_iso_8601": "2025-10-26T03:59:29.904637Z",
            "url": "https://files.pythonhosted.org/packages/57/6e/cec050bbd4ff7119fcc2a6c52b4e2b3e902662e83cdfc31d617077c0b390/neurodent-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b8b80ea664036678776f60fcc3e07a903447fcca50a02451793b9e6700e30fc7",
                "md5": "daa338fb7e9072af3e0cab7f85223146",
                "sha256": "3e83c4be4d5fec0f27ec0a1e83d18c2a48999409422e9315e8471a358934f263"
            },
            "downloads": -1,
            "filename": "neurodent-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "daa338fb7e9072af3e0cab7f85223146",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 229043,
            "upload_time": "2025-10-26T03:59:31",
            "upload_time_iso_8601": "2025-10-26T03:59:31.394322Z",
            "url": "https://files.pythonhosted.org/packages/b8/b8/0ea664036678776f60fcc3e07a903447fcca50a02451793b9e6700e30fc7/neurodent-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-26 03:59:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "josephdong1000",
    "github_project": "neurodent",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "neurodent"
}
        
Elapsed time: 1.92423s