Python package to process and visualize TDT fiber photometry data
Project description
FibPhoFlow
FibPhoFlow is an open-source fiber photometry data analysis package compatible with data obtained from TdT fiber photometry hardware and software.
Installation
This package is currently available on PyPi for download with pip, but certain dependency issues associated with the HDF5 data storage related python packages, h5py and pytables, tend to cause build errors in different environments. The simplest way to use this python package is to use the python package manager, Anaconda. If you are trying to pip install this package without Conda you will need to download the C package HDF5. The instructions that follow are for the Conda installation.
Step 1:
- Download Anaconda or Miniconda
- Download an IDE which allows you to see plots, such as Spyder or Jupyterlab
- You can install Spyder or Jupyterlab once you have Conda with one of these:
conda install -c anaconda spyder
conda install -c conda-forge jupyterlab
- You can install Spyder or Jupyterlab once you have Conda with one of these:
Step 2: Create Conda virtual environment for fibphoflow
- Open your Terminal
- Create a folder somewhere (i.e. desktop) to launch Conda environment
mkdir folder_name
cd folder_name
- Right click save this Anaconda virtual environment (venv) file into your folder
- While in the folder you created, create the Conda venv (includes needed package dependences)
conda env create -f environment.yml
- Activate Conda venv
conda activate fibphoflow_venv
- For more information on general conda venv usage, see here
Step 3: Connect the Conda venv with your IDE
- Configure your venv with Spyder or Jupyter with these instructions
Overview of Workflow
- Note that a well documented practice analysis walkthrough will be added soon.
-
The raw fiber photometry data streams from TdT photometry recording directories are loaded using the TdT python package. TdT recording files need to be located in the working directory or its subdirectories for them to be located while running fibphoflow.py. The script is currently only compatible with a GCaMP and UV/Isosbestic stream.
-
A simple low pass filtering step (a moving average) is applied to help smooth out signal noise
-
The streams (GCaMP and UV) are downsampled based on the hz value one sets.
-
A normalization of the calcium stream is performed using the isosbestic stream
-
From here, based on the experimental metadata found in the experiment's excel file, the processed streams from step 3 are chopped up into specific "epoch" traces for analysis and these traces are normalized to user-defined recording baseline periods to obtain traces in terms of delta F/F.
To-do's
-
Fix package dependency issues and allow for download with conda-forge
-
Add option for butterworth low pass filtering step.
-
Make things more Jupyter compatible so that report printouts can be made easier
-
Clean up code commenting/documentation, along with error messages
-
Add third red calcium channel
-
Add z-scoring
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
Hashes for fibphoflow-0.1.26.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a00f3f200460a4c0f515649d5ff0a1a6a478660f5a44558ae6ab0edd9755a690 |
|
MD5 | 60588eaeae17d4394b3520847609496a |
|
BLAKE2b-256 | 866e6e4cfecf7bfa4efc4a1bfb22c152c1a03be546fdc1624daced1a31b9554e |