Out of Sample Extension

First, create a folder for the extension sample, we’ll call it OoSE folder and prepare the data:

  • Run 1-ImageSegmentationFull > Run_CellSegmentation.m and select the OoSE folder as your Analysis folder
  • Either correct data manually, using Inspect Data for all ImageStacksXXX.mat and run 1-ImageSegmentationFull > MakeBigStructs.m or continue without inspection and run 1-ImageSegmentationFull > MakeBigStructsWithoutManual.m.

Secondly, run 6-OoSE > generate_OoSe_distMatrix_new. Choose Analysis and OoSE folders and click Start OOSE. Choose one of the embedding methods: Nearest Neighbours (K=5) or Laplacian Pyramids.

After correctly finishing, there will be new files in the OOSE folder:

  • Dist_mat.mat
  • OoSE_embedding.mat
  • LP_trained.mat (if the Laplacian Pyramids method was used)

To compare the OOSE sample within the shape parameters and cluster parameters of say the control sample, run 6-OoSE > createBargraphs.m. Before running this step you must have previously run 5-Extended_Affinity_Propagation > Run_Affinity_Propagation.m for the reference sample (Analysis folder)

For clusters, select the best numbers from the reference (Analysis) sample. The new subset will be plotted in shape space using the two most distinctive features for x- and y-axis from the larger sample in Analysis. The sample in the Analysis folder is used as ‘reference’ clusters and compared to the extension sample.

Bar graphs for clusters with absolute numbers

Shape space with reference dots in grey and sample extension in colour

Extension shapes in full circles and reference shapes in empty circles.

Note: All Figures are saved within a Figures folder in the in OoSE folder and the values for the bar graphs are written to CSV files.