Inscopix CNMF-E

Inscopix CNMF-E

Today is an exciting day for Inscopix, as it marks our first release of a data processing algorithm for everyone to freely use, evaluate, and contribute to. As those in the circuit neuroscience field can appreciate, transforming calcium imaging data from pixels to neurons can be a difficult and cumbersome process. One approach — Constrained Non-negative Matrix Factorization for microendoscopic data (CNMF-E) — has recently become popular for demixing 1-photon miniscope data in a way that leverages our understanding of the underlying optics and neural signals. Initially developed by Pengcheng Zhuo, Liam Paninski, and colleagues (a project I was fortunate to be involved with as a graduate student), there are currently implementations in MATLAB by the authors (Zhou et al. 2018) and Python via the open-source toolbox for Calcium Imaging Data Analysis (CaImAn, Giovannucci et al. 2019). Today, Inscopix is adding our own version into the mix: Inscopix CNMF-E is implemented from scratch in C++, designed and built on the open-source shoulders of both previous projects.

Led by our team’s data engineering aficionados Bruno Boivin and Nosheen Adil, the goal of this project was to bring CNMF-E to life in the Inscopix Data Processing Software (IDPS). Along the way, we took the opportunity to improve where possible for our specific applications and customer needs. In particular, we worked hard to prioritize both ease and flexibility of use. For example, aside from the input file path, Inscopix CNMF-E requires a single user-specified input (the average cell diameter) to get started. Optimal values for spatial filters used during processing are automatically inferred from the specified cell diameter, or can be set manually along with five other independent tunable parameters. This design allows for streamlined optimization across different datasets. To flexibly support different computing resources (RAM, CPUs), users can choose from three processing modes that balance between memory consumption and parallel processing. We’ve also made Inscopix CNMF-E available in a few formats to accommodate different types of usage: as a pip-installable Python package for integration into Python workflows, a self-contained Docker image for robust reproducibility and simple cloud deployment, or as source C++ code for those wanting to modify and improve the algorithm itself.

CNMF-E is a clever, powerful algorithm and it was a lot of fun to deconstruct, design, and develop our own version. We’re proud of the result, and we also recognize how important it is for data analysis methods like this to stay open and accessible. Scientific discovery is best done together, with insightful analysis methods that the community can transparently scrutinize and collaboratively improve. A big thanks goes to the creators of CNMF-E in the Paninski lab and the open-source efforts of the FlatIron Institute for their creativity and openness in developing CNMF-E. We hope our implementation adds another valuable option for miniscope users, and we look forward to continued feedback and contributions from the neuroscience community.

Shay Neufeld, PhD is the Director of Data Products and Analytics at Inscopix, where he oversees a team of computational scientists, data engineers, and software engineers that work together to create software products for managing, processing, analyzing, and visualizing neuroscience and preclinical research data.

Leave a Reply

Scroll to Top