Pyfiber: an open source python library that facilitates the merge of operant behavior and fiber photometry- focus on intravenous self-administration
Authors: Conlisk Dana , Ceau Matias , Fiancette Jean-François , Winke Nanci , Darmagnac Elise , Herry Cyril , Deroche-Gamonet Véronique 
Published: September 2022

Background

Advances in in vivo fluorescent imaging have exploded with the recent developments of genetically encoded calcium indicators (GECIs) and fluorescent biosensors. Their use with a bulk imaging technique such as fiber photometry (FP) can be highly beneficial in identifying neuronal signatures in behavioral neuroscience experiments.

Popularity of FP has grown rapidly. Initially applied to classical conditioning, its integration into operant behavior paradigms is progressing. However, in operant behavior, protocols can be complex including numerous scheduled events, while behavioral responses can occur in diverse and non-predictable manners. To optimize data processing and analysis, there is a need for a flexible tool to extract and relate behavioral and fiber photometry data occurring over operant sessions.

New Method

Applied to cocaine intravenous self-administration (using ImetronicⓇ polymodal apparati) and FP recordings in the prelimbic cortex (using Doric Lenses photometry system) in the rat, we established Pyfiber, an outline and open source data analysis python library that facilitates the merge of fiber photometry (using Doric Lenses) with operant behavior (using ImetronicⓇ). It allows relating activity changes within a neuronal population to the various behavioral responses and events occurring during operant behavior.

Results

We show some of the possibilities and benefits of the analytical tool Pyfiber, which helps to: 1. Extract the different types of events that occur in an operant session, 2. Extract and process the fiber photometry signals, 3. Select events of interest and align them to the corresponding fiber photometry signals, 4. Apply the most appropriate type of FP signal normalization and signal analysis according to the studied type of event or behavioral response, 5. Run data extraction and analysis on multiple individuals and sessions at the same time, 6. Collect results in an easily readable format for statistical analysis.

From our data and through the use of Pyfiber, we show that we can successfully record and easily analyze calcium transients surrounding events occurring during a cocaine self-administration paradigm in the rat.

Comparison with Existing Method(s)

While other analytical tools can be used for streamlined fiber photometry analysis, they are either too rigid and specific or too flexible, requiring extensive coding to properly fit the data sets. Additionally, current tools do not permit easy exploration of multiple types of events in parallel- something that is possible with Pyfiber.

Conclusions

This work established an open source resource that facilitates the pairing of fiber photometry recordings (using Doric Lenses photometry system) with operant behavior (using ImetronicⓇ polymodal apparati), setting a solid foundation in analyzing the relationship between different dimensions of operant behavior with fluorescent signals from brain regions of interest.