Skip to content

int-brain-lab/ibleatools

Repository files navigation

IBL Electrophysiology Feature Computation and Region Inference

This repository contains tools for computing electrophysiology features and performing region inference from neural recordings.

Installation

  1. First, activate the IBL conda environment:
conda activate iblenv
  1. Clone the ibleatools repository, and cd into it
cd ...yourpath/ibleatools
  1. Once in the ibleatools folder, install the required packages using pip:
pip install -e .

Usage

The main interface is through main.py, which can be run using a configuration file:

python main.py --config config.yaml

Configuration File

The configuration is managed through a YAML file. To avoid committing local changes, the actual configuration file (config.yaml) is ignored by git. Instead, a template file (config_template.yaml) is provided. To use the tool:

  1. Copy the template file to create your local configuration:
cp config_template.yaml config.yaml
  1. Edit config.yaml with your specific settings:
# Required parameters
pid: "5246af08-0730-40f7-83de-29b5d62b9b6d"  # Probe ID
t_start: 300.0  # Start time in seconds
duration: 3.0  # Duration in seconds

# Operation mode
mode: "both"  # Options: 'features', 'inference', or 'both'

# Optional parameters
features_path: "/path/to/output_dir"  # Path to output directory.
model_path: "/path/to/model"  # Path to the model directory for region inference

Configuration Parameters

  • Required Parameters:

    • pid: Probe ID for the recording
    • t_start: Start time in seconds
    • duration: Duration of the analysis in seconds
  • Operation Mode:

    • mode: Specifies which operations to perform
      • features: Only compute features
      • inference: Only perform region inference
      • both: Perform both feature computation and region inference
  • Optional Parameters:

    • output_dir: Path to output directory
    • model_path: Path to the model directory for region inference. If not provided, a default path will be used

Features

The tool performs two main operations:

  1. Feature Computation:

    • Computes various electrophysiology features from the raw data
    • Saves features in Parquet format for efficient storage and retrieval
  2. Region Inference:

    • Uses pre-trained models to infer brain regions
    • Can be run independently if features are already computed

Output

  • Features are saved in Parquet format for efficient storage
  • Region inference results include predicted regions and their probabilities
  • All operations are logged for tracking and debugging

About

Tools for electrophysiology analysis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages