A toolbox to visualize neuronal imaging data and apply the NC-MCM framework to it
This is a toolbox uses neuronal & behavioral data and visualizes it. The main functionalities include:
Numerous options to visualize neuronal data and create diagnostic plots
Creating neural manifolds using
sklearndimensionality reduction algorithms or
Make interactive behavioral state diagrams using
Cluster behavioral probability trajectories and test them for non-markovianity
Movies of behavioral/neuronal trajectories saved as
These are some of the plots created from calcium imaging data of C. elegans
Interactive behavioral state diagram for worm 3 and 3 cognitive states (saved as a .html file)
Comparison of predicted and true label using BunDLeNet's tau model as mapping and its predictor on worm 3
Movie using BunDLeNet's tau model as mapping on worm 1
Getting Started (for end-users)
Installation: Open a terminal window in your Python project directory and run
pip install ncmcm
Importing the package: In your Python script or notebook, import the package
ncmcm.Databaseclass as a container for your neuronal and behavioral dataset
Tutorial: Check out the
Demo.ipynbnotebook included in the package. It serves as a useful starting point to explore the functionalities of
Installation and usage information (for contributors)
If you're interested in contributing to this project or creating your own versions based on the existing code, follow these steps:
Clone the Repository: Clone this repository to your local machine using Git:
git clone https://github.com/DriftKing1998/NC-MCM-Visualizer.git
Install Dependencies: Navigate to the project directory and install the required dependencies using pip:
cd <project_directory> pip install -r requirements.txt
Explore the Code:
ncmcm.classes.pycontains the classes used by ncmcm:
Databaseis a container for data, which can be used to generate the behavioral probability maps by adding a sklearn-model. It also allows to create different plots and diagnostics.
Visualizeris created by adding a mapping or a BundDLeNet (=default). It allows to create 3D plots and movies.
CustomEnsembleModelis a model that creates an ensemble of models, specializing each model to detect a label.
ncmcm.functions.pycontains some auxiliary functions:
- Functions to prepare data
- Functions to test for stationarity & non-markovianity
- Plotting functions for the tests
ncmcm.BundDLeNet.pycontains all the parts of BundDLeNet:
- Class for creating/training the model
- Functions to prep data and get loss
Make Changes: Make your desired changes or enhancements to the codebase. Feel free to add new features, fix bugs, or improve documentation.
Testing: Ensure that your changes are tested thoroughly. You can run existing tests or write new ones to validate your modifications.
Create a Branch: Create a new branch for your changes:
git checkout -b <new_branch>
Commit Your Changes: Once you're satisfied with your changes, commit them to your branch:
git add . git commit -m "description of changes"
Push Changes: Push your changes to your forked repository:
git push origin <new_branch>
Add to the Codebase
Since this project is a first step, any additions are more than welcome.
Pull request: Go to the repository and open a pull request from your branch. Provide a clear description of your changes and why they're beneficial.
Review: Await feedback from me and address any requested changes. Once approved, your changes will be merged into the main branch.