Skip to main content

CIPipeline is a tool to analyze and process Calcium Imaging data.

Project description

CIPipeline

Description

CIPipeline (imported as ci_pipe) is a Python library for building and running calcium-imaging processing pipelines. It provides core pipeline primitives, optional adapters for Inscopix (isx) and CaImAn (caiman), utilities, plotters and example Jupyter notebooks.

This project was developed as a final project by students from Facultad de Ingeniería, Universidad de Buenos Aires, under the supervision of Dr. Fernando Chaure, in collaboration with the CGK Laboratory.

Authors

  • González Agustín
  • Loyarte Iván
  • Rueda Nazarena
  • Singer Joaquín

Installation

  1. Install the library from PyPI
pip install cipipeline
  1. Install libraries/packages required for specific modules

    Currently, CIPipeline supports the following optional modules:

    • Inscopix isx (required for the isx module): Software and installation instructions can be downloaded from the vendor site: https://www.inscopix.com

      Note: Do not confuse this with the public isx library available on PyPI or GitHub. This project requires the proprietary Inscopix software package.

    • CaImAn (required for the caiman module):

      CaImAn strongly recommends installing via conda for full functionality; follow the CaImAn docs.

  2. Jupyter (recommended for opening example notebooks)

pip install jupyterlab
# or
pip install notebook

Quick Start

Here's a simple example of creating and running a calcium imaging pipeline with ISX:

import isx
from ci_pipe.pipeline import CIPipe

# Create a pipeline from videos in a directory
pipeline = CIPipe.with_videos_from_directory(
    'input_dir', 
    outputs_directory='output_dir', 
    isx=isx
)

# Run a complete processing pipeline
(
    pipeline
    .set_defaults(
        isx_bp_subtract_global_minimum=False, 
        isx_mc_max_translation=25, 
        isx_acr_filters=[('SNR', '>', 3), ('Event Rate', '>', 0), ('# Comps', '=', 1)]
    )
    .isx.preprocess_videos()
    .isx.bandpass_filter_videos()
    .isx.motion_correction_videos(isx_mc_series_name="series1")
    .isx.normalize_dff_videos()
    .isx.extract_neurons_pca_ica()
    .isx.detect_events_in_cells()
    .isx.auto_accept_reject_cells()
    .isx.longitudinal_registration(isx_lr_reference_selection_strategy='by_num_cells_desc')
)

For more examples, including CaImAn integration and advanced workflows, see the notebooks in docs/examples.

Documentation and Resources

Examples

Example Jupyter notebooks are available in docs/examples. To run them locally:

git clone https://github.com/CGK-Laboratory/ci_pipe
cd ci_pipe
pip install -e .
# install optional dependencies if needed (isx, caiman)
jupyter lab
# open notebooks in docs/examples

Read the Spanish version in README_es.md

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cipipeline-0.3.0.tar.gz (26.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cipipeline-0.3.0-py3-none-any.whl (34.3 kB view details)

Uploaded Python 3

File details

Details for the file cipipeline-0.3.0.tar.gz.

File metadata

  • Download URL: cipipeline-0.3.0.tar.gz
  • Upload date:
  • Size: 26.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for cipipeline-0.3.0.tar.gz
Algorithm Hash digest
SHA256 c929011def08571775fedcf24bb92152c04fc6807c3993b02f3b41cbce294d58
MD5 240f6c3f4f38cfb9309c6ea91ca3553b
BLAKE2b-256 cdd0ddb2fa123330b1c115b4fea30275c954c26771e1fd89fe1579b23174c3f0

See more details on using hashes here.

File details

Details for the file cipipeline-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: cipipeline-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 34.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for cipipeline-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 694c363b7195338d5f8879908852dc4faa6fb6d0236eaa40c646234d65b0b63b
MD5 96c4ade113c3c863bef841e851a1c89f
BLAKE2b-256 edef9934dd752b8603e6ad4baf3cf6b98fa0aed2910023fe717b4c7086bdcd8b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page