Giter Club home page Giter Club logo

deepcycle's Introduction

DeepCycle

This README outlines the steps required to reproduce the approach presented in the manuscript Rappez et al. DeepCycle reconstructs a cyclic cell cycle trajectory from unsegmented cell images using convolutional neural networks. Molecular Systems Biology, 2020. These instructions show how to run the model on the data used in the paper and on new unseen data.

Requirements

keras, UMAP, cv2, albumentations, classification_models
Install customized version of SOMPY

How to run

Prepare the DeepCycle paper data
  1. Download data from EBI BioStudies repository and deep learning models from our EMBL hosting
  2. Unzip to data/Timelapse_2019 folder preserving directory structure. You will have:
    root|
        |-data|
        |     |-Timelapse_2019|
        |                     |-BF/
        |                     |-Cy3/
        |                     |-DAPI/
        |                     |-GFP/
        |                     |-curated_tracks.csv
        |                     |- ...
        |-src/
        |...
    
Prepare new timelapse and tracking data

Alternatively, DeepCycle can be run on newly generated data. For that, prepare the data as follows:

  1. Organize the live-imaging microsocpy. Each channel of every timepoint are stored independently as:
    root|
        |-data|
        |     |-New_timelapse_data|
        |                         |-BF/
        |                         |-Cy3/
        |                         |-DAPI/
        |                         |-GFP/
    
  2. Run TrackMate FIJI plugin on the nuclear staining channel (DAPI in our case). The output should be called Spots in tracks statistics.csv.
  3. Run src/TrackMate_filter.py with the correct paths (see comments in file) to manually curate the tracks with one or two divisions.
Run DeepCycle
  1. cd src
  2. Prepare the data:
    python data_prepare.py
    • Cleans and removes unnecessary columns. Stores as statistics_clean.csv in data/Timelapse_2019 dir
    • Aligns the curated tracks based on division events, calculates mean intensities track/frame wise. Stores as intensities.csv
    • Calculates intensity statistics and adds virtual class 1-4 to each tracked cell. Resulting data to be stored in statistics_mean_std.csv
  3. Train the model:
    python model_train.py
    Trains the model on curated tracks (less double division tracks) using double division tracks as validation set. Saves best models in checkpoints dir
  4. Generate cell descriptors with checkpoint.r34.sz48.03-0.73.hdf5 as default model:
    • from validation set (double division tracks) only:
      python encode.py --mode encode_val
    • from all available tracks:
      python encode.py --mode encode_all
      Descriptors are saved in descriptors.r34.sz48.pkl and descriptors_all.r34.sz48.pkl in data/Timelapse_2019 dir.
  5. Generate embeddings for all dataset. Compute intense, consider using supplied embeddings_preds_all_batch<i>.npz instead:
    python all_cells_prediction.py
  6. cd ..
  7. start jupyter notebook and open timelapse_projection2019.ipynb

deepcycle's People

Contributors

alexander-rakhlin avatar lrpz avatar theodev avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.