This repository contains the notebooks to produce results from the paper "Spatial renal biomarker discovery using multiplexed immunofluorescent and high-dimensional colorimetric staining."
Notebooks in folder 01_image_processing align images of the same tissue across stains:
Notebooks in folder 02_cell_phenotyping segment and phenotype cells based on detected markers and compute the fraction of cell populations within the tissue:
Notebooks in folder 03_pixel_clustering applies pixel clustering to a tissue to integrate information from multiplexed immunofluorescent and histological stains. Computational efficiency of PARC and SOM clustering can be compared for a sample using compare_pixel_clustering_algorithm_run_times.ipynb. Following SOM clustering, the pixel clusters are visualized in regions of interest and the fraction of pixels assigned to each cluster quantified using visualize_cluster_distribution_across_wsi.ipynb. The average intensity and/or hue of fluorescent markers and histological stains for each cluster is visualized through visualize_pixel_clustering_heatmap.ipynb. The likelihood of clusters neighboring each other can be quantified and visualized through compute_probability_cluster_neighbors.ipynb.

Notebooks in folder 04_inflammatory_spatial_niches can be used to barcode each immune cell based on its environment and identify cell subtypes.
Notebooks in folder 05_glomerulosclerosis detection can be used for comparison and classification of globally sclerotic and non-globally sclerotic glomeruli. Glomeruli are barcoded based using create_glomerulus_pixel_barcodes.ipynb. A model is trained and evaluated for glomerulosclerosis detection using predict_globally_sclerotic_glomeruli.ipynb.
PAS and Trichrome features are compared between globally sclerotic and non globally sclerotic glomeruli using compare_cell_density_fibrosis_between_sclerotic_non_sclerotic_glomeruli.ipynb.
Notebooks in folder 06_mapping fibrosis can be used for detecting fibrosis subtypes in a tissue and identifying cell populations involved in fibrosis.
segment_fibrosis_edema_inflammation.ipynb can be used to segment i-IFTA, established fibrosis and diffuse fibrosis in a tissue and produce a fibrosis segmentation map.
compute_fibrosis_distribution_across_wsi.ipynb can be used to compute the proportion of different fibrosis subtypes per tile across the tissue
overlay_cell_type_on_fibrosis_cluster_map.ipynb can be used to overlay the cell segmentation mask color coded by cell phenotype on the fibrosis segmentation map.
project_cell_protein_fibrosis_barcodes.ipynb can be used to create and project cells based on cell-protein barcodes, cell-fibrosis barcodes or cell-protein-fibrosis barcodes.