-
Notifications
You must be signed in to change notification settings - Fork 0
Home
These instructions explain how to go from raw .lsm images of organoids to morphology measurements.
Assumptions made by the code:
- All images you want to analyze are in one folder. The name of that folder has the following structure wellXX_Y, where XX is the well number (01 - 08) and Y is the perturbation (normal, 0.5uMSU6668, day04, etc).
- The images in this folder are all the same type of organoid (all MDCK or all enteroid).
- All the images in this folder have the same order of channels (for example, the first channel is always DAPI, etc).
- The images in the folder are all named posZZZ.lsm where ZZZ is a unique number like 001 or 010.
- There is only 1 organoid to analyze in each image. There can be more than 1 organoid in the image, but only 1 will be analyzed.
- This repository and rajlabimagetools repositories are on MATLAB's path.
First, check to make sure none of the images have any artifacts.
- Open an image in FIJI.
- Go Image -> Stacks -> Orthogonal Views (or Command-Shift-H) to open the orthogonal views.
- Check the image for any artifacts. If there are any artifacts in the image, write down the name of the image. Generally, I only exclude an image if I am confident that there is an artifact. If I am unsure, I keep the image.
- Repeat until you have gone through all the images in the folder.
Common artifacts:
- Organoid is flat on the bottom. I believe this happens when the fixation destroys the Matrigel and the organoid gets flattened against the bottom of the glass. This is the mot common artifact and the trickiest to identify. I usually look for there to be corners in the organoid where it is presumably meeting the glass.
- The upper part of the organoid appears stretched. I believe this happens when part of the organoid was beyond the working distance of the objective and moving the objective upwards doesn't bring the objective closer to the sample, but rather lifts the sample off the stage.
- At least half of the organoid has not been captured. You can tell because the approximate diameter of the organoid never appears to decrease.
Next, we want to make sure none of the images are of duplicate organoids. I wrote an ImageJ macro to make this go faster, though you can also do this manually.
- In FIJI, run the macro through Plugins -> Macros -> run -> open_max_merge_of_all_images.ijm (in the folder containing all the organoids2 code).
- You will be prompted to select the folder that the images are in. The plugin will then open each image as a max merge.
- Repeat steps 1 - 2 for each folder containing data from the same sample (if, for example, the same well was imaged on two different days).
- Compare the images to make sure no two images are the same organoid. Write down the name of any duplicate images.
Next, make a folder in your directory called "excluded". Put any artifact or duplicate images in this folder. The code will ignore these images for the rest of the analysis.
Next, we want to prepare the images to be analyzed by the pipeline. This involves converting the .lsm files to .tif files (one for each channel) and creating a file with image information (pixel size, image size, etc).
- Make the folder MATLAB's working directory.
- Run the image preparation script.
>> organoids2.prepare_images;
- Answer what type of organoids these are (MDCK or Intestine).
- Answer if you want to crop the stacks in z. This is leftover from when the images needed to be sent to Quantius. In the current pipeline you do not need to crop stacks in z, so you can say no.
- Answer what fluorophore each channel corresponds to. The code assumes that all images in this folder have the same order of channels (for example, the first channel is always DAPI, etc).