CartoCell, a high-content pipeline for accurate 3D image analysis, unveils cell morphology patterns in epithelial cysts.
Description
CartoCell is a deep learning-based image processing pipeline for the high-content segmentation of whole epithelial cysts acquired at low resolution with minimal human intervention. This pipeline enables high-precision cell segmentation that allows a single cell cartography study of major interest for the search of cellular patterns. All the pipeline code, feature extraction, and the various single-cell cartography analysis tools are linked below. The image dataset used can be found in this repository. All directories mentioned in "steps to reproduce" refer to the release from ComplexOrganizationOfLivingMatter repository named: Andrés San-Román et al. NaturalVariation-CartoCell_SingleCellCartographyTools_1.0.0CartoCell https://github.com/ComplexOrganizationOfLivingMatter/NaturalVariation/releases/tag/CartoCell_SingleCellCartographyTools_1.0.0
Files
Steps to reproduce
1. Training dataset generation The training high-resolution dataset arose from the combination of high-resolution raw images and their semi-automatic segmentation (high-resolution label images). This segmentation was performed using the LimeSeg plugin of FIJI (http://imagej.net/LimeSeg/). 1.1. LimeSeg To segment the raw stacks of images and reconstruct (semi-automatically) the shape of cells in three dimensions we used the Fiji (Schindelin et al., 2012) plugin LimeSeg (Machado et al., 2019). Cell outlines were inferred by using surface elements (‘‘Surfels’’) obtained by manually placing single ellipsoidal-like seeds on every cell (see https://imagej.net/LimeSeg for details). Once cell outlines were found, we exported them as point clouds (output). 1.2. Proofreading and segmentation postprocessing We developed a custom-made Matlab code to postprocess the output of LimeSeg in order to correct errors and obtain perfectly segmented cysts. Available at: "/NaturalVariation-CartoCell_SingleCellCartographyTools_1.0.0/Code/src/lib/proofreading/" First, we checked if the cysts have noticeable segmentation errors by running the script "checkingSegmentedCysts". We gave as inputs the path where the images and their segmentations were located. The output was an excel table with the possible segmentation errors. Subsequently, the curation process started by launching the script called "bulkCystProofreading". This code had as inputs the paths to the raw images, to the segmentations, and to the above-mentioned table. Once the code was launched, the GUI instructions must be followed. 2. Downsampling Downsampling was performed in batches using the in-house macro for FIJI called "resample_XYZ" available at: "NaturalVariation-CartoCell_SingleCellCartographyTools_1.0.0/Code/src/lib/macros". 3. Running the CartoCell pipeline The complete CartoCell pipeline (training + inference and post-processing) was run locally using BiaPy (https://github.com/danifranco/BiaPy). Instructions for the local training of models can be found at https://biapy.readthedocs.io Instructions for CartoCell pipeline (both locally and using Google Colab) can be found at https://biapy.readthedocs.io/en/latest/tutorials/cartocell.html 4. Features extraction Feature extraction was performed with the in-house code available at: "/NaturalVariation-CartoCell_SingleCellCartographyTools_1.0.0/Code/src/lib/featuresExtraction_20x" The main code to be executed is "mainFeaturesExtraction_20xCysts". This code has as input the path where the original images and labels are located. The result will be an excel table with the measurements of the different features. 5. Single cell cartography Different single cell cartography tools can be found at "/NaturalVariation-CartoCell_SingleCellCartographyTools_1.0.0/Code/src/lib/cartography". Descriptions of each one of the codes necessary for the realization of the different figures are also available there.