https://github.com/abuzarmahmood/pytau

Library to streamline batch-fitting of Bayesian changepoint models to neural population spiking data

https://github.com/abuzarmahmood/pytau

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: joss.theoj.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (18.1%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Library to streamline batch-fitting of Bayesian changepoint models to neural population spiking data

Basic Info
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 1
  • Open Issues: 63
  • Releases: 2
Created over 4 years ago · Last pushed 11 months ago
Metadata Files
Readme Contributing License

README.md

PyTau Logo

PyTau

Powerful Changepoint Detection for Neural Data

[![status](https://joss.theoj.org/papers/e3e3d9ce5b59166cef17ee7e9bb9f53c/status.svg)](https://joss.theoj.org/papers/e3e3d9ce5b59166cef17ee7e9bb9f53c) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/abuzarmahmood/pytau/master.svg)](https://results.pre-commit.ci/latest/github/abuzarmahmood/pytau/master) [![Pytest](https://github.com/abuzarmahmood/pytau/actions/workflows/pytest_workflow.yml/badge.svg)](https://github.com/abuzarmahmood/pytau/actions/workflows/pytest_workflow.yml)

🚀 What is PyTau?

PyTau is a specialized Python package for detecting state changes in neural data using Bayesian changepoint models. It provides:

  • Streamlined batch inference on PyMC3-based changepoint models
  • Robust detection of state transitions in neural firing patterns
  • Comprehensive visualization tools for model results

📚 Documentation

Full API Documentation

⚡ Quick Start

```bash

Create and activate conda environment

conda create -n "pytauenv" python=3.6.13 ipython notebook -y conda activate pytauenv

Clone repository

git clone https://github.com/abuzarmahmood/pytau.git

Install package

cd pytau pip install -e . # Install in development mode

Alternative: Install from requirements file

pip install -r requirements.txt

Download test data and run example notebook

cd pytau/howto bash scripts/downloadtest_data.sh cd notebooks jupyter notebook ```

🧠 Key Features

  • Multiple Model Types:

    • Single-taste Poisson models
    • All-taste hierarchical models
    • Dirichlet process models for automatic state detection
    • Variable sigmoid models for flexible transition shapes
  • Flexible Data Handling:

    • Support for shuffled, simulated, and actual neural data
    • Comprehensive preprocessing pipeline
    • Automated model selection
  • Powerful Analysis Tools:

    • State transition detection
    • Cross-region correlation analysis
    • Statistical significance testing

📊 Data Organization

PyTau uses a centralized database approach for model management:

  • Centralized Storage: Models stored in a central location with metadata
  • Comprehensive Tracking: Each model includes:
    • Animal and session information
    • Region and taste details
    • Model parameters and preprocessing steps
    • Fit statistics and results

🔄 Pipeline Architecture

PyTau's modular pipeline ensures reproducible analysis:

1️⃣ Model Generation

  • Purpose: Creates and fits Bayesian changepoint models
  • Components: Various model types for different neural data structures
  • Input: Processed spike trains and model parameters
  • Output: Fitted model with posterior samples

2️⃣ Data Preprocessing

  • Purpose: Prepares raw neural data for modeling
  • Features: Handles various data transformations (shuffling, simulation)
  • Input: Raw spike trains with parameters for processing
  • Output: Binned, processed spike count data

3️⃣ I/O Management

  • Purpose: Handles data loading, model storage, and database management
  • Features: Automatic model retrieval or fitting based on parameters
  • Operations: HDF5 data loading, metadata tracking, database integration

4️⃣ Batch Processing

  • Purpose: Enables large-scale model fitting across datasets
  • Features: Parameter iteration and parallel processing

💻 Advanced Usage

Parallelization

PyTau supports parallel processing using GNU Parallel with isolated Theano compilation directories to prevent clashes. See single_process.sh and this implementation.

🤝 Contributing

We welcome contributions to PyTau! Please see the CONTRIBUTING.md file for guidelines on how to contribute to the project.

📜 Citation

If you use PyTau in your research, please cite: @article{pytau2023, title={PyTau: Bayesian Changepoint Detection for Neural Data}, author={Mahmood, Abuzar}, journal={Journal of Open Source Software}, year={2023} }

Owner

  • Name: Abuzar Mahmood
  • Login: abuzarmahmood
  • Kind: user
  • Location: Waltham, MA
  • Company: Graduate Program in Neuroscience, Brandeis University

I am a Systems Neuroscience graduate student at Brandeis University working on methods to describe firing in neuronal populations

JOSS Publication

pytau: A Python package for streamlined changepoint model analysis in neuroscience
Published
January 12, 2026
Volume 11, Issue 117, Page 8509
Authors
Abuzar Mahmood ORCID
Swartz Foundation Computational Neuroscience Fellow, Volen Center for Complex Systems, Brandeis University, Waltham, MA, USA, Department of Psychology, Brandeis University, Waltham, MA, United States of America
Editor
Frederick Boehm ORCID
Tags
neuroscience changepoint analysis time-series bayesian modeling

GitHub Events

Total
  • Create event: 30
  • Release event: 1
  • Issues event: 57
  • Delete event: 19
  • Issue comment event: 194
  • Push event: 143
  • Pull request review comment event: 1
  • Pull request review event: 2
  • Pull request event: 45
  • Fork event: 1
Last Year
  • Create event: 30
  • Release event: 1
  • Issues event: 57
  • Delete event: 19
  • Issue comment event: 194
  • Push event: 143
  • Pull request review comment event: 1
  • Pull request review event: 2
  • Pull request event: 45
  • Fork event: 1

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 35
  • Total pull requests: 22
  • Average time to close issues: 3 months
  • Average time to close pull requests: 4 days
  • Total issue authors: 5
  • Total pull request authors: 3
  • Average comments per issue: 1.8
  • Average comments per pull request: 2.05
  • Merged pull requests: 14
  • Bot issues: 0
  • Bot pull requests: 2
Past Year
  • Issues: 32
  • Pull requests: 22
  • Average time to close issues: 2 days
  • Average time to close pull requests: 4 days
  • Issue authors: 4
  • Pull request authors: 3
  • Average comments per issue: 1.81
  • Average comments per pull request: 2.05
  • Merged pull requests: 14
  • Bot issues: 0
  • Bot pull requests: 2
Top Authors
Issue Authors
  • abuzarmahmood (32)
  • cmazzio (4)
  • Mraymon5 (2)
  • drbcary (1)
  • rly (1)
Pull Request Authors
  • abuzarmahmood (20)
  • pre-commit-ci[bot] (2)
  • Mraymon5 (1)
Top Labels
Issue Labels
blech_bot (23) under_development (10)
Pull Request Labels
blech_bot (4)

Dependencies

requirements.txt pypi
  • arviz ==0.11.1
  • easygui ==0.98.1
  • pymc3 ==3.9.3
  • tables ==3.6.1
  • theano ==1.0.5
setup.py pypi