Skip to content

Track single cells and profile the cell cycle with PCNA fluorescence images

License

Notifications You must be signed in to change notification settings

chan-labsite/PCNAdeep

Repository files navigation

pcnaDeep: a deep-learning based single-cell cycle profiler with PCNA signal

Welcome! pcnaDeep integrates cutting-edge detection techniques with tracking and cell cycle resolving models. Using the Mask R-CNN model under FAIR's Detectron2 framework, pcnaDeep is able to detect and resolve very dense cell tracks with PCNA fluorescence.

overview

Installation

  1. PyTorch (torch >= 1.7.1) installation and CUDA GPU support are essential. Visit PyTorch homepage for specific installation schedule.
  • Check the GPU and PyTorch are available:
    import torch
    print(torch.cuda.is_available())
    
  1. Install modified Detectron2 v0.4 in this directory (original package homepage)

       cd detectron2-04_mod
       pip install .
    
    Building detectron2 on Windows? Click here.
    • Before building detectron2, you must install Microsoft Visual C++ (please use the standard installation). After installation, please restart your system.

    • If your torch version is old, the following changes of the torch package may be required. Reference (Chinese).

         In torch\include\torch\csrc\jit\argument_spec.h,
         static constexpr size_t DEPTH_LIMIT = 128;
            change to -->
         static const size_t DEPTH_LIMIT = 128;
      

    In pcnaDeep, the detectron2 v0.4 dependency has been modified in two ways:

    1. To generate confidence score output of the instance classification, the method detectron2.modeling.roi_heads.fast_rcnn.fast_rcnn_inference_single_image has been modified.
    2. A customized dataset mapper function has been implemented as detectron2.data.dataset_mapper.read_PCNA_training.
  2. Install pcnaDeep from source in this directory

    cd bin
    python setup.py install
    
  3. (optional, for training data annotation only) Download VGG Image Annotator 2 software.

  4. (optional, for visualisation only) Install Fiji (ImageJ) with TrackMate CSV Importer plugin.

Demo data download

All demo data are stored at Zenodo.

Download pre-trained Mask R-CNN weights

The Mask R-CNN is trained on 60X microscopic images sized 1200X1200 square pixels. Download here.

You must download pre-trained weights and save it under ~/models/ for running tutorials.

Download example datasets

You may need to download some example datasets to run tutorials (like the quick-start guide below).

Getting started

See a quick tutorial to get familiar with pcnaDeep.

You may also go through other tutorials for advanced usages.

API Documentation

API documentation is available here.

Reference

Please cite our paper if you found this package useful.

pcnaDeep: A Fast and Robust Single-Cell Tracking Method Using Deep-Learning Mediated Cell Cycle Profiling
Yifan Gui, Shuangshuang Xie, Yanan Wang, Ping Wang, Renzhi Yao, Xukai Gao, Yutian Dong, Gaoang Wang, Kuan Yoow Chan
Bioinformatics, Volume 38, Issue 20, 15 October 2022, Pages 4846–4847; doi: https://doi.org/10.1093/bioinformatics/btac602

Licence

pcnaDeep is released under the Apache 2.0 license.