Giter Club home page Giter Club logo

ph3-analysis's Introduction

ph3-analysis

Analyse data for ph3 experiments.

Requirements

You will need to have the cp-utils-hmv toolkit to use the notebook:

pip install cp-utils-hmv

Workflow for doing the entire analysis of PH3 data

  1. This assumes an acquisition of data with 4 channels in the slide scanner at 20x.
  • Make sure the name of the .czi files is 'Animal-X-Y-Z_Experimental-Procedure_slide-X.czi
  • The underscores are very important. Don't have spaces. The last part (e.g. '..._slide-1') is also crucial.
  1. Use https://github.com/HernandoMV/czi-extract-slices in Fiji to export slices. (Using channel 4 and 10um/px)

  2. Register using ABBA and save transformation field and atlas annotations: https://biop.github.io/ijp-imagetoatlas/registration.html#slices-registration

  • Create a folder called 'QuPath' inside the 'Registration' folder just created by the previous script
  • Open QuPath, and drag the folder to create a new project. Add the images created by the script, selecting BioFormats-builder. Close QuPath.
  • Open ABBA in Fiji and import the QuPath project.
  • Flip the axis as the ABBA atlas is the other way around
  • Set slice thickness to 1 micrometer!
  • Register once with affine, using channel 1 of the atlas (autofluorescence). Set the proper background value!
  • Register with spline with 10 landmarks, also correcting background and correct registration
  • Export regions to file, and export atlas coordinates to imageJ.
  • Save inside the same folder as the original images
  1. Use https://github.com/HernandoMV/czi-roisplitter to generate the ROIs, loading the region of interest (e.g. Caudoputamen)

  2. Use 'Group_convert_and_enhace.py' in https://github.com/HernandoMV/Fiji_Custom, which transforms the images into 8-bit and normalizes the intensities by channel and by animal

  3. Use 'ImageSequence_Downsampler.ijm' in the Fiji_Custom repo to make a copy of both the DARPP-32 channels and the tdTomato (d2) channels in different directories (needed for cellpose). Do not downsample as we are acquiring at 20x.

  • Alternatively, just copy both channels to separate folders so you don't have to duplicate data
  1. Run cellpose (https://github.com/MouseLand/cellpose) on both directories: e.g. python -m cellpose --dir /home/hernandom/data/Microscopy_Data/Plasticity/PH3_inmuno/Processed_data/PH308/ROIs--Gce_processed--downsized-1_fileend-2.tif/ --save_tif --no_npy --diameter 38 --pretrained_model cyto --chan 0 --use_gpu

  2. Run Inmuno_4channels_XXXXXX.cpproj (https://github.com/HernandoMV/CellProfiler_AnalysisPipelines) in CellProfiler. Modify saving paths accordingly.

  3. Run the notebook PH3_Analysis.ipynb, for each mouse.

TODO: Create a google colab notebook for testing.

ph3-analysis's People

Contributors

hernandomv avatar

Watchers

 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.