Giter Site home page Giter Site logo

analysis-pipeline-for-optogenetics_ex's Introduction

Optogenetics_analysis pipeline

This package is the first (of many!) to support the analysis of a project in the Sabatini Lab at Harvard Medical School in which we try to better understand how the brain allows us to decide what to do next.

It uses jupyter noteboooks and each stage of the pipeline can be run stand-alone or as part of work flow controlled by one "master jupyter notebook" that uses the papermill library to control all the notebooks in the pipeline.

This package is written to analyze optogenetics experiments but can also be used to analyze the mice behavior without optogenetic perturbations. The goal was to write a pipeline that allows for others in the lab to write there own notebooks and add them to the pipeline.

The choice of notebook will determine what pipeline/analysis will be executed. If specific output data structures already exist based on previous runs of the pipeline the "master jupyter notebook" will recognize those data structures and only run what is needed to complete the new analyses. This saves lots of time and allows to efficiently explore the data.

The design of this behavioral task for mice was inspired by operant conditioning behavioral tasks. For more details see task description.

Getting started

The optogenetics_analysis pipeline was tested using python 3.7.3.

It is recommended to install it in a separate conda environment.

The papermill.execute function in the optogenetics_Papermill.ipynb notebook calls upon a specific kernel called optogenetics_env.

Here are some simple commands you can run in the terminal to get going.

cd github
git clone https://github.com/gilmandelbaum/analysis-pipeline-for-optogenetics_ex
conda create -n optogenetics_env python=3.7.3
conda activate optogenetics_env
cd analysis-pipeline-for-optogenetics_ex
pip install -r requirements.txt 
python -m ipykernel install --user --name optogenetics_env --display-name "optogenetics_env"
jupyter notebook

For each session the stages of analysis are:

Nb stands for notebooks. The number refers to when the notebook will be exected in the pipeline. The x after each number stands for the version of the notebook. For example, one can run a seq of notebooks: 0a1a1d2a4a4b4c5a6a.

Nb_0x_pre_analysis

Nb_1x_define_trials_of_interest

Nb_2x_import_lick_data

Nb_4x_assign_licks_to_behavioral_states

Nb_5x_form_one_structure_with_all_data

Nb_6x_extract_specific_information

data analysis notebook(s) run and combine data from all the sessions.

all the notebooks run together using a optogenetics_Papermill.ipynb notebook or can be run stand alone.

Acknowledgments

This analysis package was written by Gil Mandelbaum and Maria Diaz Bobillo in the lab of Bernardo Sabatini at Harvard Medical School.

analysis-pipeline-for-optogenetics_ex's People

Contributors

gilmandelbaum avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.