Wiki

Clone wiki

organoids / Combine All Images

This script should be run from within Dropbox (RajLab) --> LEB_Organoids --> Final_Analysis --> (organoid type).

#!matlab

organoids.run_analysis.combine_all_images;

This script can be run with:

  • no inputs - the script will use all organoids in the features.mat file saved in Dropbox (RajLab) --> LEB_Organoids --> Final_Analysis
  • a single input - the script expects that the input will be a structure with the organoids to plot (note that the structure is expected to be formatted the same as features.mat - I use this option if I have subsetted the data in some analysis and want to plot all organoids)

Note that in EITHER case, the script will load the features.mat file because it contains paths to the images.

You'll be prompted to enter:

  • the type of organoid (needed to set the color scheme for creating RGB images)
  • how much to downsize the images by (this is not necessary for the code to run, you can use 1, but it is nice for keeping the images a reasonable size)
  • how you want to sort the images
    • By_Perturbation
    • By_Perturbation_Then_Feature (you'll be prompted to selected which feature)
    • By_Feature (you'll be prompted to selected which feature)
    • Randomly

If you choose to sort the images By_Perturbation or By_Perturbation_Then_Feature the stitched image arranges all organoids from a perturbation (drug) into a single row. If you choose to sort the images By_Feature or Randomly the stitched images arranges the organoids into a square.

The script does take 15 - 20 minutes to run.

The script makes 3 types of stitches:

  • images
  • images_outlines (images with the segmentation outlines plotted on top)
  • outlines (the segmentations plotted on a black background)

Each stitch is saved as a .mp4 and a .tif file, for a total of 6 files. The .mp4 files contain the stitched stack, while the .tif files contain the last slice of the stitched stack.

Updated