Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 0 additions & 68 deletions README.es.md

This file was deleted.

87 changes: 58 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,65 +1,94 @@
# CIPipeline / CI_Pipe
# CIPipeline

## English
## 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.

### Short description
CIPipeline (imported as `ci_pipe`) is a Python library for building and running calcium-imaging processing pipelines used by the CGK Laboratory. 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.

### Development team
The project was developed as a final project by students from Facultad de Ingeniería, Universidad de Buenos Aires, under the supervision of a tutor, in collaboration with the CGK Laboratory.

Contributors:
- Gonzalez Agustín
## Authors
- González Agustín
- Loyarte Iván
- Rueda Nazarena
- Singer Joaquín
- Fernando Chaure (Tutor)

### Installation tutorial
## Installation

1) Install the library from PyPI
1. Install the library from PyPI

```bash
pip install cipipeline
```

2) Optional: Install Inscopix `isx` (required for the `isx` module)

- Repository: https://github.com/Inscopix/isx
- Inscopix: https://www.inscopix.com
2. Optional: Install Inscopix `isx` (required for the `isx` module)

Follow the `isx` repository documentation for installation details (some Inscopix packages may require credentials or vendor-specific installers).
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.

3) Optional: Install CaImAn (required for the `caiman` module)
3. Optional: Install CaImAn (required for the `caiman` module)

- Project: https://github.com/flatironinstitute/CaImAn
- Docs: https://caiman.readthedocs.io

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

4) Jupyter (recommended for opening example notebooks)
4. Jupyter (recommended for opening example notebooks)

```bash
pip install jupyterlab
# or
pip install notebook
```

### Useful links
## Quick Start

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

```python
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
- PyPI package: https://pypi.org/project/cipipeline
- Inscopix / isx: https://github.com/Inscopix/isx and https://www.inscopix.com
- CGK Lab: https://cgk-laboratory.github.io
- Inscopix: https://www.inscopix.com
- CaImAn: https://github.com/flatironinstitute/CaImAn and https://caiman.readthedocs.io
- Jupyter starter guide: https://jupyter.org/install

### CGK Laboratory page
- CGK Lab: https://cgk-lab.example # replace with the real lab page URL

### Example guide
Example Jupyter notebooks live in `docs/examples`. To run them locally:
## Examples
Example Jupyter notebooks are available in `docs/examples`. To run them locally:

```bash
git clone <repo>
cd <repo>
git clone https://github.com/CGK-Laboratory/ci_pipe
cd ci_pipe
pip install -e .
# install optional dependencies if needed (isx, caiman)
jupyter lab
Expand All @@ -68,4 +97,4 @@ jupyter lab

---

Read the Spanish translation in `README.es.md` (or view both sections in the repository).
Read the Spanish version in `README_es.md`
97 changes: 97 additions & 0 deletions README_es.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# CIPipeline

## Descripción
CIPipeline (referido en imports como `ci_pipe`) es una biblioteca Python para construir y ejecutar pipelines de procesamiento de imágenes de calcio. Provee primitivas de pipeline, adaptadores opcionales para Inscopix (`isx`) y CaImAn (`caiman`), utilidades y notebooks de ejemplo.

Este proyecto fue desarrollado como trabajo final por estudiantes de la Facultad de Ingeniería, Universidad de Buenos Aires, bajo la supervisión del Dr. Fernando Chaure, en colaboración con el Laboratorio CGK.

## Autores
- González Agustín
- Loyarte Iván
- Rueda Nazarena
- Singer Joaquín

## Instalación

1. Instalar la librería desde PyPI

```bash
pip install cipipeline
```

2. Opcional: Instalar Inscopix `isx` (requerido para el módulo de `isx`)

El software y las instrucciones de instalación pueden descargarse del sitio del fabricante: https://www.inscopix.com

Nota: No confundir con la biblioteca pública `isx` disponible en PyPI o GitHub. Este proyecto requiere el paquete de software propietario de Inscopix.

3. Opcional: Instalar CaImAn (requerido para el modulo de `caiman`)

- Proyecto: https://github.com/flatironinstitute/CaImAn
- Docs: https://caiman.readthedocs.io

CaImAn recomienda usar conda para una instalación completa.

4. Jupyter (recomendado para abrir los notebooks de ejemplo)

```bash
pip install jupyterlab
# o
pip install notebook
```

## Inicio Rápido

Aquí hay un ejemplo simple de cómo crear y ejecutar un pipeline de imágenes de calcio con ISX:

```python
import isx
from ci_pipe.pipeline import CIPipe

# Crear un pipeline desde videos en un directorio
pipeline = CIPipe.with_videos_from_directory(
'input_dir',
outputs_directory='output_dir',
isx=isx
)

# Ejecutar un pipeline completo de procesamiento
(
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')
)
```

Para más ejemplos, incluyendo integración con CaImAn y flujos de trabajo avanzados, consulta los notebooks en `docs/examples`.

## Documentación y Recursos
- Paquete PyPI: https://pypi.org/project/cipipeline
- CGK Lab: https://cgk-laboratory.github.io
- Inscopix: https://www.inscopix.com
- CaImAn: https://github.com/flatironinstitute/CaImAn y https://caiman.readthedocs.io
- Guía de inicio de Jupyter: https://jupyter.org/install

## Ejemplos
Los notebooks de ejemplo están disponibles en `docs/examples`. Para ejecutarlos localmente:

```bash
git clone https://github.com/CGK-Laboratory/ci_pipe
cd ci_pipe
pip install -e .
# instalar dependencias opcionales si es necesario (isx, caiman)
jupyter lab
# abrir los notebooks en docs/examples
```