Skip to content

Example Workflow

MicheleBortol edited this page Nov 14, 2021 · 14 revisions

SIMPLI's example workflow and dataset

Each installation of SIMPLI includes a self-containe example/test dataset and all the metadata and configuration files required for its analysis.

SIMPLI's example data and configuration

The example dataset provided with SIMPLI consists of two Imaging Mass Cytometry derived images of normal colon mucosa. The images are derived from the ablation of two ROIs from two different FFPE blocks from two individuals who underwent surgery for the removal of colorectal cancers.

Imaging mass citometry antibody panel

The two example images contain the channels, with the intensities associated to this panel of metal conjugated antibodies.

Metal Marker Target Cells / Features
Ir191 DNA1 All nucleated cells
Sm152 CD45 All leukocytes
Yb173 CD45RO T cells
Er166 CD45RA T cells
Er170 CD3 T cells
Dy162 CD8a T cells
Ho165 PD1 T cells
Gd156 CD4 T cells, Macrophages
Gd155 FoxP3 T cells
Yb171 CD27 B cells, T cells
Dy161 CD20 B cells
Pr141 IgA B cells
Tm169 IgM B cells
Tb159 CD68 Macrophages
Nd146 CD16 Macrophages
Lu175 CD11c Macrophages, Dendritic cells
Nd150 PDL1 Macrophages, Dendritic Cells
Nd148 PanKeratin Epithelial Cells
Gd158 eCadherin Epithelial Cells
Er168 Ki67 Proliferating cells
Nd143 Vimentin Stromal cells
Dy164 CD34 Endothelial cells
Nd142 SMA Smooth muscle
Yb176 CollagenIV Basement membrane cells
Yb174 CAMK4 Various
Sm154 VEGFc Various
Sm147 IFNA5 Various

Raw image files

The raw images files used in SIMPLI's example workflow are two .txt IMC acquisition files with one Region Of Interest (ROI) each. These files are available in SIMPLI's repository and in your local SIMPLI installation folder: SIMPLI/test/raw_data/.

Example Metadata and Configuration

The metadata and configuration files required for running an analysis of the example dataset are stored at SIMPLI/test/ and include:

Running the example analysis

The most recent version of SIMPLI be downloaded and run from directly from this repository with:

nextflow run https://github.com/ciccalab/SIMPLI -profile test

In alternative the example analysis can be run from an existing installation of SIMPLI with:

nextflow main.nf -profile test

Analysis of two normal colon mucosa samples with SIMPLI.

SIMPLI Analysis Steps

A) Raw image processing

The first step in the example analysis workflow is the preprocessing of raw images and it consists of 3 processes:

A.1) Image Extraction

In this process tiff files are extracted from the raw acquisition data from imaging mass cytometry:

Inputs and parameters:

Outputs:

  • Images: Uncompressed single channel 16 bit tiff files (one for each of the 27 selected channels) ($test_output/Images/Raw/sample_name/sample_name-label-raw.tiff)
  • Metadata:
    • Metadata for all images from both samples: $test_output/Images/Raw/raw_tiff_metadata.csv
    • By sample metadata for the raw images is also output at at:
      $test_output/Images/Raw/sample_name/sample_name-raw_tiff_metadata.csv

A.2) Image normalisation

This process performs 99th percentile normalisation of the raw tiff images generated in the Image extraction process.

Inputs and parameters:

Outputs:

  • Normalised Images: Images (uncompressed 16 bit tiff) can be output in two different formats:
    • single channel tiff files (one for each of the selected channels) ($output_folder/Images/Normalized/sample_name/sample_name-label-normalized.tiff)
    • .ome.tiff files (one per sample, the order of channels is the same as in the the channel_metadata file). (output_folder/Images/Normalized/sample_name/sample_name-ALL-normalized.ome.tiff)
  • Metadata:
    • Metadata for all images from all samples: $output_folder/Images/Normalized/normalized_tiff_metadata.csv
    • By sample metadata for the normalised images is also output at at:
      • test_output/Images/Normalized/sample_name/sample_name-normalized_tiff_metadata.csv in long format.
      • test_output/Images/Normalized/sample_name/sample_name-cp4_normalized_tiff_metadata.csv in CellProfiler4 compatible wide format.

A.3) Image thresholding and masking

This process is used to perform the image preprocessing that will generate the final images, which then will be used as input for the pixel-based or the cell-based analysis. The input images for this process are derived from the images generated in the Image normalisation process.

Inputs and parameters:

In this example for each marker we:

  1. Generate a mask without background noise by thresholding with the Threshold CellProfiler4 module.
  2. Mask the normalised image with the mask to remove its background noise with theMaskImage CellProfiler4 module.
  3. Save the resulting image as an uncompressed 16 bit single channel tiff file with the SaveImages CellProfiler4 module.

Outputs:

  • Preprocessed Images: (uncompressed 16 bit single-channel tiff)
    test_output/Images/Preprocessed/sample_name/sample_name-label-Preprocessed.tiff
  • Metadata:
    • Metadata for all images from all samples $output_folder/Images/Preprocessed/preprocessed_tiff_metadata.csv
    • By sample metadata for the raw images is also output at at:
      • test_output/Images/Preprocessed/sample_name/sample_name-preprocessed_metadata.csv in long format.
      • test_output/Images/Preprocessed/sample_name-cp4-preprocessed_metadata.csv in CellProfiler4 compatible wide format.

B) Pixel-based analysis

The pixel-based approach implemented in SIMPLI enables the quantification of pixels which are positive for a specific marker or combination of markers. These marker-positive areas can be normalised over the area of the whole image, or the areas of an image mask defined by a the combination of any of the input images with logical operators.

B.1) Measurement of positve-marker areas

This process measures the areas of interest and normalises them on the selected image masks according to the input metadata. The input images for this process is derived from images generated in the image thresholding and masking process.

Inputs and parameters:

  • preprocessed_metadata_file with the tiff image metadata.
  • area_measurements_metadata = /test/metadata/marker_area_metadata.csv Path to the area_measurements_metadata file.

In this example analysis we are measuring the areas of each marker normalised over the areas of the ROI plus the following combinations of markers corresponding to different T cell phenotypes normalised over the area of the T cell population defined by CD3:

  • CD3 & CD45RA,CD3 = Naive T cells.
  • CD3 & CD8a,CD3 = CD8+ T cells.
  • CD3 & CD4 & !CD8a,CD3 = CD4+CD8- T cells. We are also measuring the following normalised areas:
  • CD68 & CD16,CD68 = CD16+ Macrophages (macrophages are defined as CD68+ areas).
  • Vimentin,PanKeratin | eCadherin = Vimentin positive areas overlapping epithelial areas (we expect to see very little to no overlap).

Outputs: The area measurements are saved in test_output/area_measurements.csv. All areas are in pixel2.

B.2) Pixel-based analysis visualisation

Generate boxplots showing the comparisons of the distributions of normalised marker-positive areas between 2 categories of samples. The input data for this process is derived from

Inputs and parameters:

  • sample_metadata_file with the metadata of all samples used in the analysis.
  • area_measurements_file Path to the area_measurements_file.

FDR is calculated using the number of different marker values for each value of main_marker.

Outputs: The area measurements are saved in test_output/Plots/Area_Plots/Boxplots/ a separate folder is created for each main_marker. For each main_marker a pdf file (test_output/Plots/Area_Plots/Boxplots/main_marker/main_marker_area_boxplots.pdf) containing a boxplot for each value of marker associated to that main_marker.
In this example analysis we produce the following boxplots:

  • total_ROI_area/total_ROI_area_boxplots.pdf
  • CD3/CD3_boxplots.pdf
  • CD68/CD68_boxplots.pdf
  • PanKeratin_or_eCadherin/PanKeratin_or_eCadherin_boxplots.pdf

C) Cell-based analysis

The cell-based analysis aims to investigate the qualitative and quantitative cell representation within the imaged tissue through (1) cell segmentation, cell phenotyping by unsupervised clustering and expression thresholding and spatial analysis of cell densities (homotypic spatial analysis) and distances (heterotypic spatial analysis).

C.1A) Cell segmentation with CellProfiler

Generate single-cell data is .csv format and the cell masks in tiff format. The input data for this process can is derived from images generated in the image thresholding and masking process.

Inputs and parameters:

In this example we:

  1. Generate an image corresponding to our cell membranes with the ImageMath CellProfiler4 module, by adding the following channels:
    • CD45
    • Pan-Keratin
    • E-Cadherin
  2. Identify the nuclei with the IdentifyPrimaryObjects CellProfiler4 module.
  3. Expand the nuclei annotations using the membrane image with the IdentifySecondaryObjects CellProfiler4 module to obtain the cells.
  4. Generate the cell masks with the ConvertObjectsToImage CellProfiler4 module.
  5. Measure the intensity of each marker in our panel (from the preprocessed images without background noise) with the MeasureObjectIntensity CellProfiler4 module.
  6. Measure the size/shape parameters of each cell with the MeasureObjectSizeShape CellProfiler4 module.
  7. Save the cell mask images with the with the SaveImages CellProfiler4 module.
  8. Export the single-cell data with all measurements to a .csv file (compatible with Excel) with the ExportToSpreadsheet CellProfiler4 module.

Outputs:

  • Single cell data:
    • Single cell data for all samples: test_output/CellProfiler4_Segmentation/CellProfiler4-unannotated_cells.csv
    • Single cell data for each sample separately: test_output/CellProfiler4_Segmentation/sample_name/sample_name-CellProfiler4-Cells.csv
  • Cell masks:
    Cell masks in uint16 tiff format: test_output/CellProfiler4_Segmentation/sample_name/sample_name-CellProfiler4-Cell_Mask.tiff To each cell is associated a unique identity number from 1 to 216-1. All the pixel belonging to a given cell have their value set to its identity number. Pixels not belonging to any cell are set to 0.
    These images are compatible with several other tools for downstream analysis including:

The results from this cell segmentation are not used in the downstream analyses, the results from the cell segmentation with StarDist are used instead.
To use the results of this cell segmentation instead, set this parameter: params.cell_source = "CellProfiler"

C.1B) Cell segmentation with StarDist

Cell segmentation is also performed with StarDist, see this page for details.

Inputs and parameters:

  • preprocessed_metadata_file with the tiff image metadata.
  • params.sd_labels_to_segment = "DNA1"
  • params.sd_model_name = "2D_versatile_fluo"
  • params.sd_model_path = "default"
  • params.sd_prob_thresh = "0.05"
  • params.sd_nms_thresh = "default"

The default model 2D_versatile_fluo is applied to the DNA channel (DNA1) to identify cells. To increase sensitivity a lower probability threshold. 2D_versatile_fluo is a 2D single channel model trained on on a subset of the DSB 2018 nuclei segmentation challenge dataset. This is described in the StarDist README.

Outputs:

  • Single cell data:
    • Single cell data for all samples: test_output/StarDist_Segmentation/StarDist-unannotated_cells.csv
    • Single cell data for each sample separately: test_output/StarDist_Segmentation/sample_name/sample_name-StarDist-Cells.csv
  • Cell masks:
    Cell masks in uint16 tiff format: test_output/StarDist_Segmentation/sample_name/sample_name-StarDist-Cell_Mask.tiff To each cell is associated a unique identity number from 1 to 216-1. All the pixel belonging to a given cell have their value set to its identity number. Pixels not belonging to any cell are set to 0.
    These images are compatible with several other tools for downstream analysis including:

Only the results from this cell segmentation are used in the downstream analyses.

C.2) Cell masking

This process allows to identify cells belonging to different populations or tissue compartments according to the overlap of their areas with those of specific masks. The input images for this process are derived from images generated in the image thresholding and masking process. The input cell masks and single-cell data for this process are derived from the cell segmentation process.

Inputs and parameters:

  • preprocessed_metadata_file with the tiff image metadata.
  • single_cell_masks_metadata.
  • single_cell_data_file.
  • cell_masking_metadata = test/metadata/cell_masking_metadata.csv file.

If a cell is positive for more than one cell type, than it is assigned to the cell type defined first (by row order) in the cell_masking_metadata file. Cells negative for all cell_types are marked as UNASSIGNED.

In this example analysis we are identifying the following cell types:

  1. T Cells by overlap with the CD3 processed image of at least 10%.
  2. B Cells by overlap with the a mask derived from CD20 OR CD27of at least 10%.
  3. Macrophages by overlap with the a mask derived from CD68 AND NOT CD11c of at least 10%.
  4. Dendritic Cells by overlap with a mask derived from CD11c AND NOT CD68 of at least 10%.
  5. Epithelial Cells by overlap with a mask derived from eCadherin OR Pankeratin of at least 10%.

Outputs:
The annotated cell table is a .csv table with the same columns as the input table plus the following annotations:

  • cell_type: Name used to identify the cell type during the analysis.
  • CellName: Unique Cell identity string in the form: Metadata_sample_name_ObjectNumber
    The cell type level table is saved at: test_output/annotated_cells.csv

C.3) Cell masking visualisation

This process allows to plot the results of the cell masking process.

Inputs and parameters:

  • sample_metadata_file with the metadata of all samples used in the analysis.
  • single_cell_masks_metadata.
  • annotated_cell_data_file.
  • cell_masking_metadata = test/metadata/cell_masking_metadata.csv file. `

Outputs:
The cell type level plots are saved in test_output/Plots/Cell_Type_Plots/ and they are divided in:

  • Barplots: test_output/Plots/Cell_Type_Plots/Barplots .pdf files with barplots with the proportions of all cell types + unassigned cells in:

    • Each sample: one bar per sample.
    • Category: one bar per category, If the comparison column in the sample_metadata_file file contains 2 categories. The barplots are divided in the following .pdf files:
      • dodged_barplots.pdf = dodged barplots including "UNASSIGNED" cells.
      • dodged_assigned_ony_barplots.pdf = dodged barplots excluding "UNASSIGNED" cells.
      • stacked_barplots.pdf = stacked barplots including "UNASSIGNED" cells.
      • stacked_assigned_only_barplots.pdf = stacked barplots excluding "UNASSIGNED" cells.
  • Overlays: test_output/Plots/Cell_Type_Plots/Overlays/

    • One overlay-sample_name.tiff image per sample. Each cell is coloured by cell type according to the color specified in the cell types metadata file
    • overlay_legend.pdf: legend mapping each cell type to its color.
  • Boxplots: test_output/Plots/Cell_Type_Plots/Boxplots/
    If the comparison column in the sample_metadata_file file contains 2 categories,two pdf files are porduced each, with a boxplot for each cell type:

    • boxplots.pdf = boxplots including "UNASSIGNED" cells.
    • assigned_ony_boxplots.pdf = boxplots excluding "UNASSIGNED" cells.

The FDR is calculated with the Benjamini-Hochberg procedure.

C.4) Cell Phenotyping

In the example analysis we phenotype cells using both phenotyping methods offered by SIMPLI:

  • A) Unsupervised Clustering
  • B) Expression Thresholding

C.4A.1) Unsupervised clustering

This process allows to perform unsupervised clustering on cells from one or more set of cells. The input cell data for this process is derived from cell data annotated in the cell masking process.

Inputs and parameters:

  • sample_metadata_file with the metadata of all samples used in the analysis. If the value of the comparison column for the sample is "NA"all cells from the sample are excluded from the clustering.
  • annotated_cell_data_file
  • cell_clustering_metadata = test/metadata/cell_thresholding_metadata.csv file specifying the clustering parameters.

In this example analysis we are performing unsupervised clustering on T cells with the following markers:

In the example the clustering is performed at these levels of resolutions:

  • 0.1
  • 0.3
  • 0.5
  • 0.9
  • 1.5

Outputs:
The output files divided by cell type are saved in: test_output/Cell_Clusters/T_Cells. This step outputs:

A collected clustered cells table is saved at: test_output/clustered_cells.csv

C.4A.2) Unsupervised clustering visualization

This process allows to plot the results of the unsupervised clustering process.

Inputs and parameters:

  • sample_metadata_file with the metadata of all samples used in the analysis. If the value of the comparison column for the sample is "NA"all cells from the sample are excluded from the clustering.
  • clustered_cell_data_file
  • cell_clustering_metadata = test/metadata/cell_thresholding_metadata.csv file specifying the clustering parameters.
  • high_color = Color for the max expression value in the heatmap or UMAP = "'#FF0000'"`
  • mid_color = Color for the midpoint of the expression value in the heatmap or UMAP = "'#FFFFFF'"
  • low_color = Color for the minimum expression value in the heatmap or UMAP = "'#0000FF'"

Outputs:
The plots illustrating the results of the unsupervised clustering are saved in test_output/Plots/Cell_Cluster_Plots/ In this example analysis we produce the following UMAPs: test_output/Plots/Cell_Cluster_Plots/T_Cells/UMAPs:

  • UMAPs-res_0.1_ids.pdf
  • UMAPs-res_0.3_ids.pdf
  • UMAPs-res_0.5_ids.pdf
  • UMAPs-res_0.9_ids.pdf
  • UMAPs-res_1.5_ids.pdf

In this example analysis we produce the following boxplots and heatmaps: test_output/Plots/Cell_Cluster_Plots/T_Cells/Cluster_Comparisons:

  • res_0.1_ids-plots.pdf
  • res_0.3_ids-plots.pdf
  • res_0.5_ids-plots.pdf
  • res_0.9_ids-plots.pdf
  • res_1.5_ids-plots.pdf

C.4B.1) Expression thresholding

This process allows to phenotype cells from one or more set by expression thresholding. The input cell data for this process is derived from cell data annotated in the cell masking process.

Inputs and parameters:

  • annotated_cell_data_file
  • cell_thresholding_metadata = test/metadata/cell_thresholding_metadata.csv file.

In this example analysis we are phenotyping the following cell types:

  • T Cells:
    1. CD8+ T Cells CD8a > 0.1
    2. Ki67+ CD8+ T Cells CD8a > 0.15 & Ki67 > 0.15
    3. CD4+ T Cells CD4 > 0.1
    4. Ki67+ CD4+ T Cells CD4 > 0.1 & Ki67 > 0.15
    5. T Regs CD4 > 0.1 & FoxP3
  • Macrophages:
    1. CD16+ Macrophages CD16 > 0.1
  • Dendritic Cells:
    1. CD16+ Dendritic Cells CD16 > 0.1
  • Epithelial_Cells:
    1. Proliferating Epithelium Ki67 > 0.1

Outputs:
The thresholded cell table is saved at: test_output/thresholded_cells.csv

C.4B.2) Expression thresholding visualisation

This process allows to plot the results of the cell phenotyping by the expression thresholding process. The input cell masks for this process are derived from the cell segmentation process.

Inputs and parameters:

  • sample_metadata_file with the metadata of all samples used in the analysis. If the value of the comparison column for the sample is "NA", then the sample is excluded from the plotting.
  • cell_thresholding_metadata
  • single_cell_masks_metadata
  • high_color = Color for the max expression value in the heatmap or UMAP = "'#FF0000'"
  • mid_color = Color for the midpoint of the expression value in the heatmap or UMAP = "'#FFFFFF'"
  • low_color = Color for the minimum expression value in the heatmap or UMAP = "'#0000FF'"

Outputs:
The output plots are saved at: test_output/Plots/Cell_Threshold_Plots/ : In this example analysis we produce the following plots:

  • Barplots = test_output/Plots/Cell_Threshold_Plots/Barplots:
    • Dendritic_Cells-barplots.pdf
    • Epithelial_Cells-barplots.pdf
    • Macrophages-barplots.pdf
    • T_Cells-barplots.pdf
  • Boxplots = test_output/Plots/Cell_Threshold_Plots/Boxplots:
    • Dendritic_Cells-boxplots.pdf
    • Epithelial_Cells-boxplots.pdf
    • Macrophages-boxplots.pdf
    • T_Cells-boxplots.pdf
  • Density Plots = test_output/Plots/Cell_Threshold_Plots/Density_Plots:
    • CD16_Dendritic_Cells-Intensity_MeanIntensity_CD16-density.pdf
    • Ki67_CD8_T_Cells-Intensity_MeanIntensity_CD8a-density.pdf
    • CD16_Macrophages-Intensity_MeanIntensity_CD16-density.pdf
    • Ki67_CD8_T_Cells-Intensity_MeanIntensity_Ki67-density.pdf
    • `CD4_T_Cells-Intensity_MeanIntensity_CD4-density.pdf
    • Proliferating_Epithelium-Intensity_MeanIntensity_Ki67-density.pdf
    • CD8_T_Cells-Intensity_MeanIntensity_CD8a-density.pdf
    • T_Regs-Intensity_MeanIntensity_CD4-density.pdf
    • Ki67_CD4_T_Cells-Intensity_MeanIntensity_CD4-density.pdf
    • T_Regs-Intensity_MeanIntensity_FoxP3-density.pdf
    • Ki67_CD4_T_Cells-Intensity_MeanIntensity_Ki67-density.pdf
  • Heatmaps = test_output/Plots/Cell_Threshold_Plots/Heatmaps:
    • Dendritic_Cells-heatmap.pdf
    • Epithelial_Cells-heatmap.pdf
    • Macrophages-heatmap.pdf
    • T_Cells-heatmap.pdf

C.5) Spatial Analyses

In the example analysis we perform both types of spatial analyses provided by SIMPLI:

  • A) Homotypic spatial analysis = Analysis of high density clusters of cells of a given phenotypes.
  • B) Heterotypic spatial analysis = Analysis of the minimum distance distribution between different cell phenotypes.

C.5A.1) Homotypic spatial analysis

This process allows to identify high-density aggregations of cells of a given cell type or phenotype using the DBSCAN: Density-Based Spatial Clustering and Application with Noise algorithm as implemented in the fpc R Package. The input annotated cell data for this process are derived from:

Inputs and parameters:

  • homotypic_interactions_metadata: file
  • File/s with the cell data

In this example analysis we analyse the homotypic interactions of the following cell phenotypes:

  • Proliferating Epithelium (identified by phenotyping by expression thresholding)
  • Macrophages (identified by cell masking) For both phenotypes a minimum density of 5 cells/um2 is required to identify a cluster.

Outputs:
The output of this process is stored at: test_output/Homotypic_interactions

  • Files for individual cell_types are stored at:
    • test_output/Homotypic_interactions/Macrophages/Macrophages-homotypic_clusters.csv
    • test_output/Homotypic_interactions/Proliferating_Epithelium/Proliferating_Epithelium-homotypic_clusters.csv
  • A total file collecting the annotations for both cell_types are stored at: test_output/Homotypic_interactions/homotypic_interactions.csv

C.5A.2) Homotypic spatial analysis visualisation

This process allows to plot the results of the homotypic spatial analysis process. The input annotated cell data for this process is derived from the homotypic spatial analysis process, while the input cell masks for this process are derived from the cell segmentation process.

Inputs and parameters:

  • homotypic_interactions_metadata
  • single_cell_masks_metadata

Outputs:
The output of this process is stored at: test_output/Plots/Homotypic_interactions_Plots: Position maps: Map of the image showing dots representing the position of the centroid of each cell in the image. Cells are colored in:

  • black: cells not belonging to a DBSCAN cluster.
  • color from the thresholded_cell_data_file: cells belonging to a DBSCAN cluster. One file for each cell type / phenotype for each sample named: test_output/Plots/Homotypic_Interaction_Plots/cell_type/cell_type-CRC_1-homotypic.pdf.

For this analysis the produced plots are:

  • test_output/Plots/Homotypic_Interaction_Plots/Macrophages:
    • Macrophages-CRC_1-homotypic.pdf
    • Macrophages-CRC_2-homotypic.pdf
  • test_output/Plots/Homotypic_Interaction_Plots/Proliferating_Epithelium:
    • Proliferating_Epithelium-CRC_1-homotypic.pdf
    • Proliferating_Epithelium-CRC_2-homotypic.pdf

C.5B.1) Heterotypic spatial analysis

This process allows to measure the distribution of the minimum distances between cells of two user defined cell types or phenotypes. This process measueres the distances between all cells of the 1st cell type or phenotype and all cells of the 2nd cell or phenotype, and for each cell of the first cell type or phenotype it returns the minimum distance to a cell of the 2nd cell type or phenotype. The input annotated cell data for this process can be derived from:

Inputs and parameters:

  • heterotypic_interactions_metadata: test/metadata/heterotypic_interactions_metadata.csv file.
  • cell_files:

Outputs:
The output of this process is saved at: $output_folder/Heterotypic_interactions/

  • Files for individual combinations cell type or phenotype are stored at: `$output_folder/Heterotypic_interactions/:
    • test_output/Heterotypic_interactions/T_Cells-Macrophages/T_Cells-Macrophages-distances.csv
    • test_output/Heterotypic_interactions/Proliferating_Epithelium-Macrophages/Proliferating_Epithelium-Macrophages-distances.csv
  • A total file collecting the annotations for all cell_types is stored at: $output_folder/Heterotypic_interactions/heterotypic_interactions.csv

C.5B.2) Heterotypic spatial analysis visualisation

This process allows to plot the results of the heterotypic distance analysis by the heterotypic spatial analysis process. The input annotated cell data for this process are derived from the heterotypic spatial analysis process.

Inputs and parameters:

  • sample_metadata_file with the metadata of all samples used in the analysis. If the value of the comparison column for the sample is "NA", then no plotting is performed for this sample.
  • heterotypic_interactions_metadata: test/metadata/heterotypic_interactions_metadata.csv file.
  • heterotypic_interactions_file

Outputs:
The outputs of this process are stored at: $output_older/Plots/Heterotypic_Interaction_Plots/Distance:

  • test_output/Plots/Heterotypic_Interaction_Plots/Distance/Proliferating_Epithelium-Macrophages:
    • Proliferating_Epithelium-Macrophages-all-heterotypic.pdf
    • Proliferating_Epithelium-Macrophages-by_category-heterotypic.pdf
  • test_output/Plots/Heterotypic_Interaction_Plots/Distance/T_Cells-Macrophages:
    • T_Cells-Macrophages-all-heterotypic.pdf
    • T_Cells-Macrophages-by_category-heterotypic.pdf

C.5B.3) Heterotypic analysis permutation test

This process generates a random distribution of the minimum distances between cells of the populations or phenotypes selected by the user. The distribution is generated by randomly reshuffling the labels of each cell. The input annotated cell data for this process can be derived from:

Inputs and parameters:

  • sample_metadata_file
  • permutations = number of rounds of random shuffling to perform for the pertutrbation test
  • heterotypic_interactions_metadata: test/metadata/heterotypic_interactions_metadata.csv file.
  • heterotypic_interactions_file

Outputs:
The output of this process is saved at: $output_folder/Heterotypic_interactions/

  • A total file collecting the permuted distances for all cell_types is stored at: $output_folder/Heterotypic_interactions/permuted_interactions.csv

C.5B.4) Heterotypic analysis permutation test visualisation

This process allows to plot the results of the heterotypic distance analysis permutation test by the heterotypic analysis permutation test process. The input annotated cell-cell distance data for this process can be derived from:

Inputs and parameters:

  • sample_metadata_file with the metadata of all samples used in the analysis. If the value of the comparison column for the sample is "NA", then no plotting is performed for this sample.
  • heterotypic_interactions_metadata: test/metadata/heterotypic_interactions_metadata.csv file.
  • heterotypic_interactions_file
  • shuffled_interactions_file

Outputs:
The outputs of this process are stored at: $output_older/Plots/Heterotypic_Interaction_Plots/Permutations:

  • test_output/Plots/Heterotypic_Interaction_Plots/Permutations/Proliferating_Epithelium-Macrophages:
    • Proliferating_Epithelium-Macrophages-all-heterotypic_permutations.pdf
    • Proliferating_Epithelium-Macrophages-category-heterotypic_permutations.pdf
    • Proliferating_Epithelium-Macrophages-difference-heterotypic_permutations.pdf
  • test_output/Plots/Heterotypic_Interaction_Plots/Permutations/T_Cells-Macrophages:
    • T_Cells-Macrophages-all-heterotypic_permutations.pdf
    • T_Cells-Macrophages-difference-heterotypic_permutations.pdf
    • T_Cells-Macrophages-category-heterotypic_permutations.pdf