Skip to main content

Computational microscopy toolkit for label-free imaging

Project description

recOrder

This package offers a comprehensive pipeline, command line interface, and napari plugin for quantitative label-free microscopy.

In this repo you will find python tools and UI that allow the user to calibrate microscope hardware, acquire multi-modal data, reconstruct density and anisotropy, and visualize the data.

The acquisition, calibration, background correction, reconstruction, and applications of QLIPP are described in the following E-Life Paper:

Syuan-Ming Guo, Li-Hao Yeh, Jenny Folkesson, Ivan E Ivanov, Anitha P Krishnan, Matthew G Keefe, Ezzat Hashemi, David Shin, Bryant B Chhun, Nathan H Cho, Manuel D Leonetti, May H Han, Tomasz J Nowakowski, Shalin B Mehta, "Revealing architectural order with quantitative label-free imaging and deep learning," eLife 2020;9:e55502 DOI: 10.7554/eLife.55502 (2020).

recOrder is to be used alongside the QLIPP module, whose design has been optimized to fit on a conventional widefield microscope (Panel A below). The QLIPP module allows for the collection of label-free information consisting of the intrinsic anisotropy of the sample and its relative phase (density). All of these measurements are collected through compensated, polarization diverse illumination and quantitatively recovered through recOrder's computational reconstruction pipeline. The overall structure of recOrder can be visualized below in Panel B, highlighting the two different usage modes and their features: graphical user interface (GUI) through napari and command line interfact (CLI).

Flow Chart

Dataset

Slides and a dataset shared during a workshop on QLIPP and recOrder can be found on Zenodo.

DOI DOI

Installation

Easy installation:

(Optional but recommended) install anaconda and create a virtual environment

conda create -n recorder python=3.7
conda activate recorder

Install napari:

pip install "napari[all]"

Open napari and use the Plugin > Install/Uninstall Plugins... menu to install recOrder-napari.

Developer installation:

Install git and conda (either anaconda or miniconda).

Create a conda environment dedicated to recOrder:

conda create -n recorder python=3.7
conda activate recorder

Clone this repository:

git clone https://github.com/mehta-lab/recOrder.git

Install recOrder and its dependencies:

cd recOrder
pip install -e ".[dev]"

Optional napari plugin: recOrder includes a napari plugin that can be used to acquire data via MicroManager. To install napari use

pip install "napari[all]"

To run the recOrder plugin use

napari -w recOrder-napari

To acquire data via MicroManager, follow the instructions on the wiki.

Optional GPU: recOrder supports NVIDIA GPU computation with the cupy package. Follow these instructions to install cupy and check its installation with import cupy. To enable gpu processing, set use_gpu: True in the config files.

Command-line usage

Type recOrder.help for instructions on the two command-line modes: recOrder.reconstruct and recOrder.convert.

recOrder.reconstruct

recOrder.reconstruct uses configuration files to select reconstruction parameters. Start with an example configuration file /examples/example_configs/config_example_qlipp.yml and modify the parameters to match your dataset.

Run the reconstruction with

recOrder.reconstruct --config <path/to/config.yml>

The following command-line arguments override parameters specified in the configuration file:

--method (str) method of reconstruction: QLIPP,IPS,UPTI'
--mode (str) mode of reconstruction: 2D, 3D'
--data_dir (str) path to raw data folder'
--save_dir (str) path to folder where reconstructed data will be saved'
--name (str) name under which to save the reconstructed data'
--config (str) path to configuration file (see /examples/example_configs')
--overwrite (bool) True/False whether or not to overwrite data that exists under save_dir/name'

For example, this command uses the QLIPP reconstruction method even if the configuration file specifies a different reconstruction method

recOrder.reconstruct --config /path/to/config.yml --method QLIPP

recOrder.convert

recOrder.convert converts MicroManager tif files to ome-zarr files. For example

recOrder.convert --input <path/to/mm/tifs> --output <path/to/output.zarr>  --data_type ometiff

License

Chan Zuckerberg Biohub Software License

This software license is the 2-clause BSD license plus clause a third clause that prohibits redistribution and use for commercial purposes without further permission.

Copyright © 2019. Chan Zuckerberg Biohub. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Redistributions and use for commercial purposes are not permitted without the Chan Zuckerberg Biohub's written permission. For purposes of this license, commercial purposes are the incorporation of the Chan Zuckerberg Biohub's software into anything for which you will charge fees or other compensation or use of the software to perform a commercial service for a third party. Contact ip@czbiohub.org for commercial licensing opportunities.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

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

recOrder-napari-0.1.0b3.tar.gz (11.6 MB view details)

Uploaded Source

Built Distribution

recOrder_napari-0.1.0b3-py3-none-any.whl (11.6 MB view details)

Uploaded Python 3

File details

Details for the file recOrder-napari-0.1.0b3.tar.gz.

File metadata

  • Download URL: recOrder-napari-0.1.0b3.tar.gz
  • Upload date:
  • Size: 11.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.13

File hashes

Hashes for recOrder-napari-0.1.0b3.tar.gz
Algorithm Hash digest
SHA256 f160167e06e1a3d405670d6a1f0b58bf9d7cb48dc6b26fdbbd7d6a607925baac
MD5 654b92b31635deb4b8f3fb860d9b9b20
BLAKE2b-256 ae30edf0a527ba58d7c0b01fcff63e66989c6d5879c6f0b9063c81e0feac45d0

See more details on using hashes here.

File details

Details for the file recOrder_napari-0.1.0b3-py3-none-any.whl.

File metadata

File hashes

Hashes for recOrder_napari-0.1.0b3-py3-none-any.whl
Algorithm Hash digest
SHA256 0504d0d1a9f0bfb5ebf1130c0212fa1cbda9eb28a5470d3833c931680d7f5a52
MD5 723cebe5e8bd664e189081bdf502b7f3
BLAKE2b-256 5d912f48b58a5a0a76c4b9df0157386493d326813e5398462bd6baa35d0d96f1

See more details on using hashes here.

Supported by

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