Python calcium imaging analysis (PyCaAn)
Project description
PyCaAn stands for Python Calcium imaging Analysis This repository contains tools to analyze large datasets of calcium imaging data, plot, and extract statistics.
Features:
- Tuning curves
- Unbiased information theoretic metrics
- Low-dimensional embeddings (manifolds)
- Data simulator
- Dataframe support for quick plotting/stats
- and more!
Installation
To use internal functions in other projects, you need to install PyCaAn in your preferred environment.
Currently, this is done with a developer install:
pip install -e .
Run analyses
PyCaAn provides both high- and low-level access to analytical functions.
Low level
Any function can be called using:
import pycaan
Example: to binarize calcium transients, use:
from pycaan import binarize_ca_traces binarized_traces, neural_data = binarize_ca_traces(ca_traces, z_threshold, sampling_frequency)
High level
First define your paths (input dataset, output result folders) and other parameters in params.yaml,
you can analyze a single session from the terminal using:
% python3 pycaan//analysis/extract_tuning_data.py --session_path ../../example_dataset/example_region/example_subject/example_mouse
you can also perform a specific type of analysis on selected sessions (batch process) after running run_dataset_curation.py:
% python3 run_analysis.py --extract_tuning
Finally, for a fully automatized dataset analysis, you can run:
sh runAll.sh
This function will curate your dataset with desired threshold (e.g. minimum number of neurons per recording) and run all analyses.
Dataset naming convention
Dataset path has to be specified in params.yaml
The naming convention should follow these principles:
region/subject/subject_task_condition1_condition2_..._date
For example:
amygdala/F173/F173_OF_darkness_20230804
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pycaan-0.1.2.tar.gz.
File metadata
- Download URL: pycaan-0.1.2.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5cadb111effec9bf5b013aa589220fc5dd0f3e0942cf7958954cec5640bf9d0b
|
|
| MD5 |
319070d20447288a1cf53e26fdfb2ed0
|
|
| BLAKE2b-256 |
3f496f239cb2456b843ee2179de6ac0e746523a8aa6fbc89994ae6643abf3130
|
File details
Details for the file pycaan-0.1.2-py3-none-any.whl.
File metadata
- Download URL: pycaan-0.1.2-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c1764f716fe42533265d1282867e896057282f1e07f646de105a12d2645285b
|
|
| MD5 |
cc91c5e919f98352747b5389f0a24454
|
|
| BLAKE2b-256 |
b2031455d86851af795926de12d5e0738e1019023fcc7f673bb57a24d7303fbb
|