Visualisation capabilities

This section provides comprehensive overview of MultiOmics patient data analysesarrow-up-right available in K Pro, organized by data modality.

How it works

When you submit a query that would benefit from visual representation, K Pro automatically:

  1. Selects the appropriate visualization type based on your question and the data involved

  2. Applies statistical analyses relevant to your query (e.g., survival statistics, significance tests)

  3. Optimizes visual parameters for clarity and scientific accuracy

  4. Provides context to help you interpret the visualization correctly

  5. Enables follow-up analyses based on patterns observed in the visualization

All visualizations are generated with proper statistical rigor and include relevant metrics such as p-values, confidence intervals, and sample sizes to ensure scientific validity.

The plots support various parameters for customization including patient grouping or filtering, and visualization options.

Overview

  • Clinical: 3 plots

  • Bulk RNA-Seq: 6 plots

  • Single-Cell RNA-Seq: 7 plots

  • Spatial Transcriptomics: 12 plots

  • Histomics: 1 plot

  • Multi-Modal: 3 plot

Clinical Plots

1. Clinical Endpoint Plot

Modality: Clinical

Description: The clinical endpoint plot can be used to answer questions about the distribution of a clinical variable across patient groups or perform survival analysis when the variable is a survival endpoint. It can be used in two different settings:

  1. Survival Analysis: If the variable is a survival endpoint (death or progression), it uses a Kaplan-Meier plot displaying survival probability over time

  2. Variable Description: If the variable is not a survival endpoint, it displays the distribution of the variable across patient groups

Parameters:

  • title: Plot title

  • group: Grouping criterion (default: indication)

  • variable_name: The name of the variable to plot (must be “death” or “progression” for Kaplan-Meier)

  • use_kaplan_meier: Whether to use the Kaplan-Meier plot (must be True for survival endpoints

Use Cases (Survival Analysis):

  • How does survival differ between MOSAIC patients with and without KRAS mutations in Non-Small Cell Lung Cancer?

  • How does survival differ between patients with and without KRAS mutations in colorectal cancer?

  • What is the progression-free survival for patients with different tumor stages in ovarian cancer?

  • How does age at diagnosis affect survival outcomes in lung cancer patients?

  • What is the survival probability for patients with different molecular subtypes of breast cancer?

  • How does treatment response impact overall survival in patients with advanced melanoma?

Use Cases (Variable Description):

  • What is the patient age distribution across MOSAIC indications?

  • What is the mutation status of KRAS across MOSAIC indications?

  • Are there more smokers among Bladder or in Ovarian MOSAIC patients?

  • How are the tumor stages distributed across different indications?

  • How well do lung cancer patients respond to chemotherapy based on KRAS mutation status?


2. Gantt Plot

Modality: Clinical

Description: Gantt chart for patient treatment timeline visualization at the patient level. This displays horizontal bars representing treatment periods for each patient, with markers indicating when samples were collected during treatment. It utilizes treatment data, clinical data, and sample metadata to provide a comprehensive view of each patient’s treatment journey.

Parameters:

  • title: Plot title

  • nb_patients: Number of patients to display (default: 8)

Use Cases:

  • Show the treatment timelines of KRAS mutated MOSAIC ovarian cancer patients with sample collection points

  • What are the treatment durations across all patients in the cohort?

  • Display the treatment timeline for patients in the responder group

  • When were samples collected relative to treatment start and end dates?

  • Show the temporal relationship between treatment periods and sampling events for each patient


3. Sankey Plot

Modality: Clinical

Description: The Sankey diagram summarizes treatment sequences at the cohort level. Each node represents a treatment type at a given treatment line. Each link shows how many patients moved from one treatment to another between successive lines of therapy. Links are colored according to the patients’ group, allowing you to see which treatment paths are most common and how they differ across categories.

Parameters:

  • title: Plot title

  • group: Optional group to color the Sankey links by (e.g., gender, mutation status, response status)

Use Cases:

  • Visualize the treatment flow of MOSAIC Ovarian cancer patients grouped by M Stage status

  • Show treatment flow for MOSAIC patients stratified by TP53 mutation status

  • Color the Sankey plot by EGFR status for MOSAIC lung cancer patients

  • Create a Sankey diagram grouped by best response for MOSAIC patients

  • Show MOSAIC treatment transitions split by lymphocyte density


Bulk RNA-Seq Plots

1. Bulk Violin Plot

Modality: Bulk RNA-Seq (BKRNASEQ)

Description: The violin plot displays variations in gene expression through violin plots. It can be used in two configurations:

  1. Compare one gene or gene signature expression across groups

  2. Compare several genes or gene signatures expression without another grouping criterion

The plot supports both regular grouping and stratified grouping. Each violin plot represents either the distribution of a gene or the distribution of signature scores.

Parameters:

  • title: Plot title

  • gene_input_list: List of gene inputs (single genes or gene signatures)

  • group: Grouping criterion (required if gene_input_list length is 1, must be None if length > 1)

  • stratify_by: Optional stratification criterion (e.g., gender, mutation status)

Important Rules:

  1. When several genes/gene signatures are requested, group MUST be None

  2. When a single gene or gene signature is requested, group MUST be filled

  3. Stratification can be applied to compare expression across groups while stratifying by another variable

Use Cases:

  • What's the expression of Nectin4 across MOSAIC indications?

  • How is the expression of TP53 across smoking status?

  • Is IL21 more highly expressed in patients with lung cancer than in patients with breast cancer?

  • Can you compare the expression of IL21 across tumor stages for patients with gastric cancer?

  • How is the expression of the Cytotoxic_T_Cell_Signature [CD8A, GZMB, PRF1, CXCL9] varying across smoking status?

  • How is the expression of TP53 across smoking status for patients with or without KRAS mutation?

  • Is IL21 more highly expressed for male or female patients across indications?


2. Bulk Heatmap Plot

Modality: Bulk RNA-Seq (BKRNASEQ)

Description: This tool displays a heatmap of bulk RNA-Seq data to compare the expression of multiple genes across different groups. This is equivalent to the bulk violin plot but for simultaneously displaying multiple genes and/or gene signatures across multiple groups.

Parameters:

  • title: Plot title

  • gene_input_list: List of single genes and gene signatures (required, max 20 items)

  • group: Grouping criterion (default: indication)

Use Cases:

  • How does the expression of genes ROR1, ERBB2 and CDK4 vary across MOSAIC indications?

  • What tumor stages express WNT1 but not TP53?

  • What is the expression of gene CDK4 and gene signature [ERBB2, ROR1] across indications?

  • How does the expression of gene signature [ERBB2, ROR1] vary across different indications?


3. Bulk UMAP Gene Expression Plot

Modality: Bulk RNA-Seq (BKRNASEQ)

Description: The Bulk UMAP plots bulk RNA-Seq data in reduced dimension space (2D UMAP). Each dot matches a sample, and the color is determined by gene expression of selected genes. This plot is relevant for viewing gene expression across one group of patients or bulk RNA-Seq samples, not for comparing across groups.

Parameters:

  • title: Plot title

  • gene_input: The gene or gene signature to plot

Requirements:

  • Requires a single indication

Use Cases:

  • Display IL6 expression on a UMAP of MOSAIC bladder indication BulkRNAseq data

  • How is TP53 expressed in the bulk RNA-Seq data?

  • How is YAP1 expressed for this one group of patients?

  • Is SOX2 expressed in breast cancer?

  • How is TNFa expressed in MOSAIC?

  • What is the expression of IL6 in TCGA?

  • What is the expression of gene signature CD8A, GZMB, PRF1, CXCL9 in TCGA?


4. Bulk UMAP Metadata Plot

Modality: Bulk RNA-Seq (BKRNASEQ)

Description: The Bulk UMAP plots bulk RNA-Seq data in reduced dimension space (2D UMAP). Each dot matches a sample, and the color is determined by the group parameters (clinical data or bulk RNA-Seq metadata, by default indication).

Parameters:

  • title: Plot title

  • group: Grouping criterion (default: patient_id)

Requirements:

  • Requires a single indication

Use Cases:

  • Show me a UMAP of the bulk RNA-Seq data for MOSAIC patients with bladder cancer grouped by smoking status

  • Show me a UMAP of the bulk RNA-Seq data for patients over 60 years old with breast cancer

  • Show me a UMAP of the bulk RNA-Seq data for dataset TCGA

  • What is the transcriptomic profile of patients in MOSAIC with ovarian cancer?


5. Bulk Pairwise Correlation Plot

Modality: Bulk RNA-Seq (BKRNASEQ)

Description: The pairwise correlation plot displays correlations between gene expression levels in a heatmap format. It shows pairwise correlations between genes or gene signatures, with correlation coefficients displayed in each cell and p-values available on hover.

Parameters:

  • title: Plot title

  • gene_input_list: List of genes or gene signatures to correlate (required, max 15 items)

  • correlation_method: Method for correlation calculation (“pearson” or “spearman”, default: “pearson”)

Use Cases:

  • What is the correlation between ERBB2 and ESR1 expression in MOSAIC NSCLC?

  • Show me the pairwise correlations between TP53, BRCA1, and BRCA2 in TCGA breast cancer

  • What is the correlation between an immune checkpoint signature [PDCD1, CTLA4, LAG3] and a DNA repair signature [BRCA1, BRCA2, ATM]?

  • How correlated are the expression levels of HER2, ESR1, and PGR in MOSAIC breast cancer?

  • Show correlations between oncogenes MYC, KRAS, and PIK3CA in MOSAIC ovarian cancer


6. Bulk DEA Plot (Differential Expression Analysis)

Modality: Bulk RNA-Seq (BKRNASEQ)

Description: This tool performs bulk differential expression analysis (DEA) on bulk RNA-Seq data. It compares gene expression between different groups to identify differentially expressed genes. This analysis identifies genes that are significantly up- or down-regulated between conditions, and can be used to identify top differential genes between two groups of patients. It can be adjusted for available covariates and can include user-specified genes in the results.

Parameters:

  • title: Plot title

  • group: Grouping criterion for differential expression analysis (e.g., gender, condition)

  • gene_input_list: Optional list of single genes or gene signatures to include in results

  • covar_adj_variable: Optional variables to adjust for in the analysis

Use Cases:

  • In MOSAIC glioblastoma patients who received chemotherapy, which genes are differentially expressed between complete responders and patient with progressive disease based on BulkRNAseq data?

  • What are the top 10 most up-regulated genes in condition A compared to condition B?

  • Are gene X and Y differentially expressed between condition A and B?

  • Perform differential expression analysis comparing tumor stages

  • Which genes show significant expression differences across treatment groups?

  • Find differentially expressed genes between responders and non-responders

  • What genes are upregulated in high-risk patients compared to low-risk patients?


Single-Cell RNA-Seq Plots

1. Single-Cell Cell Type Proportion Plot

Modality: Single-Cell RNA-Seq (SCRNASEQ)

Description: This plot displays variations in cell-type proportions for each cell type at the sample level. Each violin plot represents a cell type, and if a grouping parameter is requested, each violin is colored according to the group parameter.

Parameters:

  • title: Plot title

  • group: Optional grouping criterion

  • cell_group: Cell type level (“cell_type_level_1_major” or “cell_type_level_2_mid”, default: “cell_type_level_2_mid”)

Use Cases:

  • What is the cell type composition of patients with lung versus bladder cancer?

  • Do smokers have more T cells than non-smokers in gastric cancer?

  • Do we see more immune cells in later stages of MESO?

  • Do patients with KRAS mutation have more stromal cells than patients without?


2. Single-Cell Patient Cell Expressing Plot

Modality: Single-Cell RNA-Seq (SCRNASEQ)

Description: This plot shows the percentage of cells expressing a gene across different groups (such as indications, tumor stages, or patients) for each cell type. Results per patient are shown by hovering over the scatter points.

Parameters:

  • title: Plot title

  • gene_input: Single gene to filter on

  • group: Grouping criterion (default: indication)

  • cell_type: Cell type level (“cell_type_level_1_major” or “cell_type_level_2_mid”, default: “cell_type_level_2_mid”)

Use Cases:

  • How often is TP53 expressed across MOSAIC indications for each cell type?

  • How often is TP53 expressed across tumor stages for each cell type?

  • How often is TP53 expressed across indications for each cell type, restricting to patients older than 65?


3. Single-Cell Dot Plot

Modality: Single-Cell RNA-Seq (SCRNASEQ)

Description: This plot is equivalent to a signature heatmap plot but for single-cell data, incorporating both average expression and the proportion of cells expressing the gene. It can be used in two main configurations:

  1. Multiple genes/signatures on x-axis, groups on y-axis: Compare expression of MULTIPLE genes across different groupings

  2. Single gene/signature with patient groups on x-axis, cell groups on y-axis: Display expression of EXACTLY ONE gene across different patient and cell groupings

Parameters:

  • title: Plot title

  • xgroup: Either a list of genes/signatures OR a GroupRequest for patient groupings

  • ygroup: GroupRequest for grouping data (default: cell_type_level_2_mid)

  • gene_input: Optional single gene or gene signature for metadata dot plot case

Use Cases:

  • How are YAP1 and TGFB1 expressed in different cell types of MOSAIC patients?

  • Do T cells express more ERBB2 or TNFa than B cells?

  • Compare the expression of CD4, CD8 and CD19 in different indications in single-cell data

  • How is WNT1 expressed in different cell types across different indications?

  • Show the expression of ERBB2 gene across different cell types and indications

  • Do T cells express more TP53 than B cells across all tumor stages?


4. Single-Cell Coexpression Dot Plot

Modality: Single-Cell RNA-Seq (SCRNASEQ)

Description: This plot visualizes the co-expression patterns of two gene or gene signature inputs across different cell groups. It shows the proportion of cells co-expressing both inputs and compares it to the proportion expressing each one individually. The comparison is done through the Jaccard index between the two inputs.

Parameters:

  • title: Plot title

  • gene_input_list: List of exactly 2 single genes or gene signatures

  • group: Grouping criterion for the y-axis (default: cell_type_level_2_mid)

Use Cases:

  • How are EGFR and ERBB2 co-expressed in different cell types in MOSAIC bladder patients?

  • In which cell type is the gene pair (ERBB2,EGFR) most co-expressed?

  • Investigate the gene association patterns of the target pair ERBB2 and EGFR

  • How are gene signatures [CD4, CD8, CD19] and [TGFB1, TGFB2, TGFB3] co-expressed in different cell types?

  • What are the synergies between gene signatures in different cell types?


5. Single-Cell UMAP Gene Expression Plot

Modality: Single-Cell RNA-Seq

Description: This plot displays single-cell RNA-Seq data in a 2D UMAP where each dot represents a cell. The color of the dots is determined by gene expression of the selected genes. If more than one gene is selected, the color will be a gradient of the mean expression. This plot automatically includes a corresponding UMAP showing cell type annotations for context.

Parameters:

  • title: Plot title

  • gene_input: Gene or gene signature to plot

Requirements:

  • Requires a single indication

Use Cases:

  • Display IL6 expression on a UMAP of MOSAIC bladder indication ScRNAseq data

  • How is TP53 expressed in the single-cell RNA-Seq data?

  • How is TP53 expressed across all cells?

  • Is SOX2 expressed in all cells in breast cancer?

  • How is gene signature CD8A, GZMB, PRF1, CXCL9 expressed across all cells?


6. Single-Cell UMAP Metadata Plot

Modality: Single-Cell RNA-Seq

Description: This plot displays single-cell RNA-Seq data in a 2D UMAP where each dot represents a cell. The color of the dots is determined by the group parameters (clinical data or single-cell metadata, by default indication).

Parameters:

  • title: Plot title

  • group: Grouping criterion (default: cell_type_level_3_granular)

Requirements:

  • Requires a single indication

Use Cases:

  • Show me a UMAP of MOSAIC patients with bladder cancer grouped by cell types

  • Show me a UMAP of the single-cell RNA-Seq data for patients with lung cancer

  • Show me a UMAP of the single-cell RNA-Seq data for patients over 60 years old

  • Show me a UMAP of the single-cell RNA-Seq data for dataset MOSAIC

  • Do patients with lung cancer have a different overall gene expression profile than patients with breast cancer?

  • What is the transcriptomic profile of patients in MOSAIC?


7. Single-Cell Correlation Heatmap Plot

Modality: Single-Cell RNA-Seq

Description: Creates a correlation dot matrix showing pairwise correlations between genes or gene signatures in single-cell RNA-seq data, filtered by a specific cell type. The dot matrix displays correlation coefficients (color), percentage of cells co-expressing both genes (size), and statistical significance.

Parameters:

  • title: Plot title

  • gene_input_list: List of genes or gene signatures to analyze (max 20 items)

  • correlation_method: Correlation method (“pearson” or “spearman”, default: “pearson”)

  • cell_level: Cell type level column (default: “cell_type_level_2_mid”)

Use Cases:

  • Create a correlation dot matrix for genes ERBB2, ROR1, and TGFB1 in T cells of MOSAIC patients

  • Show me the correlation and co-expression between CD4, CD8, and CD19 genes in B cells

  • What are the gene expression correlations and co-expression patterns in T cells for genes CD4, CD8 and CD19?

  • Compare correlations and co-expression between genes and gene signatures in different cell types

  • Generate a correlation dot matrix for the ERBB2_ROR1 signature in macrophages


Spatial Transcriptomics Plots

1. Spatial Transcriptomics Dot Plot

Modality: Spatial Transcriptomics

Description: This plot is equivalent to a signature heatmap plot or single-cell dot plot but for spatial transcriptomics data. It can be used to compare the expression of MULTIPLE genes or signatures when grouping spots by cell types or patient-derived groups.

Parameters:

  • title: Plot title

  • gene_input_list: List of genes or gene signatures (required, max 20 items)

  • group: Grouping criterion for the y-axis (default: DominantCellType_cohort_level_2)

Important: This plot handles MULTIPLE genes or signatures. For ONE gene or signature, use SptMetadataDotPlot instead.

Use Cases:

  • How are SYPL1 and TGFB1 expressed in different cell types of MOSAIC ovarian cancer patients measured by Visium?

  • Compare the expression of CD4, CD8 and CD19 across different cell types in Visium data

  • How are KLRC1 and CD8A expressed in different cell types measured by Visium?

  • How spatially heterogeneous is the expression of CD8A in female patients?

  • How are gene YAP1 and gene signature [TGFB1, TGFB2] expressed in different cell types in Visium data?


2. Spatial Transcriptomics Metadata Dot Plot

Modality: Spatial Transcriptomics

Description: This function displays the gene expression of exactly ONE gene or gene signature across different groupings of spots (by default cell-type). This plot is equivalent to a bulk violin (stratified) plot but for spatial transcriptomics data, incorporating both average information and the proportion of spots expressing the gene.

Parameters:

  • title: Plot title

  • gene_input: Single gene or gene signature to filter on

  • group: Grouping criterion (default: indication)

  • spot_group: Metadata column to group on at spot level (“DominantCellType_cohort_level_2” or “tumor_region”, default: “DominantCellType_cohort_level_2”)

Important: This plot handles ONLY ONE gene or gene signature. For multiple genes or signatures, use SptDotPlot instead. It shows expression across TWO groups: one for patients and one for cell types.

Use Cases:

  • How is SYPL1 expressed in different cell types across different MOSAIC indications for Visium data?

  • Do T cells express more TP53 than B cells across all tumor stages in spatial transcriptomics data?

  • Compare the expression of CD4 for KRAS positive and negative patients in meso across cell types for Visium data

  • How is gene signature PDCD1, PDCD1LG2 expressed in MESO patients across cell types for Visium data?

  • How is gene signature PDCD1, PDCD1LG2 expressed in MESO patients across tumor regions for Visium data?


3. Spatial Transcriptomics Slide Display Gene Expression Plot

Modality: Spatial Transcriptomics

Description: This plot displays gene expression of spots on a spatial representation of the tissue. Spots are colored according to selected gene expression. The plot can include the H&E image as a background to visualize tissue morphology alongside gene expression. This plot automatically includes a corresponding plot showing dominant cell type distribution.

Parameters:

  • title: Plot title

  • gene_input: Gene or gene signature to filter on

  • patient_id: Optional patient ID to filter on (if not provided, one will be selected automatically)

Requirements:

  • Requires filtering to select a single patient_id

Use Cases:

  • How is CD4 spatially distributed in the tissue of the oldest patient in MOSAIC mesothelioma indication?

  • How is CD8A spatially distributed in the tissue of patient xxx?

  • Is WNT1 expressed in specific regions of the tissue of patient xxx?

  • How is ROR1, ERBB2 signature spatially distributed in the tissue of the oldest patient in MESO?


4. Spatial Transcriptomics Slide Display Cell Types Level 2 Plot

Modality: Spatial Transcriptomics

Description: This plot displays the cell type deconvolution of spots on a spatial representation of the tissue. Each spot is represented by a pie chart drawn according to the fraction of each cell type. The plot can include the H&E image as a background to visualize tissue morphology alongside cell type information.

Parameters:

  • title: Plot title

  • patient_id: Optional patient ID to filter on (if not provided, one will be selected automatically)

Requirements:

  • Requires filtering to select a single patient_id

Use Cases:

  • How are the cell types distributed in the tissue for the oldest patient in MOSAIC mesothelioma indication?

  • Are there signs of immune infiltration in the tissue of patient xxx?

  • Are T cells and tumor cells colocalized in the tissue of patient xxx?

  • Can you show me the cell type deconvolution in the tissue for a patient in BRCA?


5. Spatial Transcriptomics Slide Display Colocalization Plot

Modality: Spatial Transcriptomics

Description: This plot displays the co-expression of two genes or the colocalization of a gene and a cell type at every spot on a spatial representation of the tissue. It can display:

  1. Spatial similarity between expressions of two genes

  2. Spatial similarity between expression of one gene and proportion of a particular cell type

Every spot is colored according to the co-expression/colocalization. Permutation-based p-values are calculated and can be viewed by hovering over spots.

Parameters:

  • title: Plot title

  • gene_input_list: List of 1 or 2 single genes (depending on use case)

  • patient_id: Optional patient ID to filter on

  • cell_type: Optional cell type level for gene-cell type colocalization (must be None when gene_input_list has 2 items)

Requirements:

  • Requires filtering to select a single patient_id

Use Cases:

  • How is the co-expression of ERBB2 and CD4 spatially distributed in the tissue of the oldest patient in MOSAIC mesothelioma indication?

  • Show the spatial co-expression of ERBB2 and CD8A in patient xxx

  • How are ERBB2 and WNT1 spatially co-expressed on slide xxx?

  • Show me the spatial association of ERBB2 and CD4 in the spatial representation of tissue of patient xxx

  • How is the expression of ERBB2 spatially correlated to the proportion of T_NK cells in tissue of the oldest patient?

  • Show the spatial association of ERBB2 and Malignant cells in tissue of patient xxx

  • How are ERBB2 and B_cells colocalized on slide xxx?

  • Is gene ROR1 spatially associated with the presence of MoMac cells in tissue of patient xxx?


6. Spatial Transcriptomics Slide Display Metadata Plot

Modality: Spatial Transcriptomics

Description: This plot displays metadata information (categorical variables) of spots on a spatial representation of the tissue. Spots are colored according to the selected grouping variable (by default tumor region). The plot can include the H&E image as a background to visualize tissue morphology.

Parameters:

  • title: Plot title

  • patient_id: Optional patient ID to filter on (if not provided, one will be selected automatically)

  • spot_group: Grouping criterion for spots (default: tumor_region)

Requirements:

  • Requires filtering to select a single patient_id

Use Cases:

  • Can you show me the tumor region annotation for the oldest patient in MOSAIC mesothelioma indication?

  • How are the dominant cell types distributed in the tissue for the oldest patient in MESO?

  • What are the different tumor regions in the tissue of patient xxx?

  • Show me the spatial distribution of tumor regions for a patient in BRCA?


7. Spatial Transcriptomics Coexpression Dot Plot

Modality: Spatial Transcriptomics

Description: This plot visualizes the spatial co-expression patterns of two genes or gene signatures across different groups. It shows the proportion of spatial spots (and their nearest neighbors) co-expressing both genes. The comparison is done through the Jaccard index, and is particularly useful for identifying groups where genes are spatially co-expressed.

Parameters:

  • title: Plot title

  • gene_input_list: List of exactly 2 single genes or gene signatures

  • group: Grouping criterion for the y-axis (default: DominantCellType_cohort_level_2)

Use Cases:

  • How are EGFR and ERBB2 spatially co-expressed in different dominant cell types of MOSAIC bladder cancer patients?

  • In which cell type is the gene pair (ERBB2,EGFR) most co-expressed spatially?

  • Investigate the gene association patterns of the target pair ERBB2 and EGFR

  • Assess the spatial coexpression of CD19 and MS4A1 in ovarian cancer patients

  • Show the spatial co-expression for TP53 and MDM2 expression in GBM female patients older than 65 years


8. Spatial Transcriptomics Cell Type Proportion Plot

Modality: Spatial Transcriptomics

Description: Displays variations in cell-type deconvolution fractions for each cell type at the sample level using box plots. One box per cell type. The optional color_group parameter colors boxes by any clinical or spatial metadata variable. Includes statistical testing between groups when a grouping is provided. Analogous to the documented Single-Cell Cell Type Proportion Plot, but derived from spatial deconvolution rather than scRNA-seq.

Parameters:

  • color_group_display_name: Optional display name for a color grouping variable (e.g., indication, gender)

  • title: Optional custom title

Use Cases:

  • What is the cell type composition of patients with lung versus bladder cancer in spatial transcriptomics?

  • Do smokers have more T cells than non-smokers in gastric cancer based on spatial transcriptomics?

  • Do we see more immune cells in later stages of mesothelioma in spatial transcriptomics data?

  • Do patients with KRAS mutation have more stromal cells than patients without in spatial transcriptomics?


9. Spatial Transcriptomics Patient-Level Cell Type Co-occurrence Plot (Jaccard Index)

Modality: Spatial Transcriptomics

Description: Summarises spatial co-localisation between two selected cell types across patients using violin plots. For each sample, a Jaccard index is computed from spot-level deconvolution fractions (using the 30th percentile as a presence threshold). Per-sample Jaccard scores are displayed as violins per patient group (e.g., indication), with individual sample points overlaid. A gene-stratified variant further splits the violins by gene expression strata (gene+/gene−).

Parameters:

  • cell_type_1: First cell type (default: Malignant)

  • cell_type_2: Second cell type (default: B_cell; must differ from cell_type_1)

  • x_group_display_name: Display name for the grouping variable

  • gene_input (stratified variant only): Gene or gene signature to derive strata from (default: ERBB2)

  • title: Optional custom title

Use Cases:

  • Compare colocalization of Malignant and B cells across MOSAIC indications

  • How does Malignant vs T_NK colocalization vary between lung and breast?

  • Show colocalization of DC and MoMac by tumor stage

  • Do ERBB2-high samples show more Malignant/B_cell co-occurrence than ERBB2-low samples?


10. Spatial Transcriptomics Patient-Level Moran’s I Plot

Modality: Spatial Transcriptomics

Description: Summarises the spatial autocorrelation (Moran’s I) of a gene or gene signature across patients using violin plots. Within each sample, Moran’s I is computed on spot-level log-normalised counts using spatial coordinates. The per-sample Moran’s I scores are displayed as violins per patient group (e.g., indication), with individual sample points overlaid. A high Moran’s I indicates the gene tends to be expressed in spatially clustered regions within the tissue.

Parameters:

  • gene_input: Single gene or gene signature (required; default: ERBB2)

  • x_group_display_name: Display name for the grouping variable

  • title: Optional custom title

Use Cases:

  • Compare Moran’s I of ERBB2 across MOSAIC indications

  • Is TP53 spatially autocorrelated in lung vs breast cancer?

  • Show Moran’s I for the Cytotoxic_T signature across tumor stages


11. Spatial Transcriptomics Cell Type Proportion Stacked Bar Chart

Modality: Spatial Transcriptomics

Description: Displays proportions of all detected cell types as a stacked bar chart, with each bar representing a clinical group (e.g., indication, cancer stage). Proportions are first averaged across spots per patient, then averaged across patients per group. A minimum proportion threshold collapses low-abundance cell types into an “Other” category. Cell types are ordered by biological hierarchy (Immune, Malignant, Stromal, Epithelial, Other). Includes statistical testing.

Parameters:

  • x_group_display_name: Display name for the grouping variable

  • include_cell_types: Optional list of specific cell types to include (default: all detected)

  • min_proportion_threshold: Minimum mean proportion threshold to show a cell type separately (default: 0.01); cell types below this are grouped as “Other”

  • show_all_cell_types: Set to true to override the threshold and show all cell types

  • proportion_method: deconvolution_mean (default, average deconvolution fraction across spots) or dominant_fraction (fraction of spots where the cell type is dominant)

  • title: Optional custom title

Use Cases:

  • What cell types are detected in the spatial transcriptomics data for this group of patients?

  • How is the spatial transcriptomics-derived cell type composition distributed across indications?

  • Show in a stacked bar chart ho the spatial transcriptomics-derived cell type composition are distributed across MOSIAC breast and lung indications


12. Spatial Transcriptomics Cell Type Proportion Groups Plot

Modality: Spatial Transcriptomics

Description: Shows the deconvolution fraction for a single selected cell type across patient groups (x-axis), with samples split into two gene-expression strata (gene+/gene−). The stratification is derived from a gene or gene signature using either a median split or a spot-presence method. Two grouped box plots are shown side-by-side within each x-axis group. This plot is for cell type composition questions, not gene expression questions.

Parameters:

  • cell_type: Cell type to plot (e.g., malignant, T_NK, B_cell; must match a spatial deconvolution level 2 column)

  • x_group_display_name: Display name for the grouping variable

  • gene_input: Gene or gene signature used to split samples into two strata (default: PTGES)

  • stratification_method: median_split (default) or presence_any_spot

  • title: Optional custom title

Use Cases:

  • Compare malignant deconvolution scores across cohorts, stratified by PTGES expression

  • Do Malignant proportions differ by cohort code for ERBB2-high vs ERBB2-low samples?

  • Within each cohort, are fibroblast proportions different for a cytotoxic T-cell signature high vs low?

  • Compare T_NK deconvolution fractions across indications, split by PDCD1 expression (+/-)


Histomics Plots

1. Histomics Cell Type Proportion Plot

Modality: Histomics

Description: Given the selected filters, the histomics cell type proportion plot displays the proportions of different cell types in tumor samples as a stacked bar chart. Each bar represents a slide or a group of slides. This plot is relevant to answer questions about the cell type composition of samples based on H&E slides.

Parameters:

  • title: Plot title

  • group: Grouping criterion (default: indication)

  • min_proportion_threshold: Minimum proportion threshold for cell types to be displayed individually (default: 0.01)

  • show_all_cell_types: Whether to show all cell types or group low-proportion ones into ‘Other’ (default: False)

  • max_slides: Maximum number of slides to display (default: 20)

  • sort_by: Optional column to sort cell types by

  • include_cell_types: Optional list of cell types to include in the plot

  • legend_title: Title of the legend (default: “Cell Types”)

Use Cases:

  • How is the H&E-derived cell type composition distributed across MOSAIC indications?

  • What cell types are detected in the H&E slides for this group of patients?

  • What is the cell type composition based on histology for this group of patients?

  • Based on the H&E slide, do patients with lung cancer have a different cell type composition than patients with breast cancer?

  • Based on the H&E slide, do patients with lung cancer have more tumor cells than patients with breast cancer?


Multi-Modal Plots

1. Bulk RNA-Seq vs Single-Cell Expression Concordance Plot

Modality: Multi-Modal (Bulk RNA-Seq + Single-Cell RNA-Seq)

Description: Scatter plot combining bulk RNA-seq and single-cell RNA-seq data. Each point represents a sample. The x-axis shows bulk expression log2(TPM+1) and the y-axis shows the percentage of cells of a selected cell type expressing the gene. A dropdown allows switching between cell type granularity levels. Points are optionally colored by a patient grouping variable. Accepts a single gene only.

Parameters:

  • gene_input: Single gene to display (required)

  • color_group_display_name: Display name for the optional color grouping variable (default: indication)

  • cell_type: Cell type granularity level — cell_type_level_1_major, cell_type_level_2_mid (default), or cell_type_level_3_granular

  • title: Optional custom title

Use Cases:

  • Compare bulk versus single-cell expression of CD274 in B cells across MOSAIC indications

  • How does bulk expression of ERBB2 relate to the percentage of T cells expressing it?

  • Show the relationship between bulk TP53 expression and malignant cell expression percentage

  • How does bulk TP53 expression correlate with malignant cell expression percentage in lung vs breast cancer?

  • Bulk tissue expression compared to single cell malignant expression for CD274


2. Bulk RNA-Seq vs Spatial Transcriptomics Expression Concordance Plot

Modality: Multi-Modal (Bulk RNA-Seq + Spatial Transcriptomics)

Description: Scatter plot combining bulk RNA-seq and spatial transcriptomics data. Each point represents a sample. The x-axis shows bulk expression log2(TPM+1) and the y-axis shows the percentage of spots expressing the gene for a selected tumor region. A dropdown allows switching between tumor regions (e.g., Tumor, Stroma, Interface). Points are optionally colored by a patient grouping variable. Accepts a single gene only.

Parameters:

  • gene_input: Single gene to display (required)

  • color_group_display_name: Display name for the optional color grouping variable (default: indication)

  • title: Optional custom title

Use Cases:

  • Compare bulk versus spatial transcriptomics expression of CD274 across indications

  • Show the relationship between bulk TP53 expression and spatial spot expression percentage

  • How does bulk TP53 expression correlate with spatial spot expression percentage in lung vs breast cancer?

  • Bulk tissue expression compared to spatial transcriptomics expression for CD274

  • How does bulk expression of ERBB2 relate to the percentage of spots expressing it in MOSAIC breast cancer patients?


3. Bulk Expression vs Spatial Moran’s I Plot

Modality: Multi-Modal (Bulk RNA-Seq + Spatial Transcriptomics)

Description: Scatter plot showing the relationship between bulk gene expression (log2 TPM+1, x-axis) and spatial autocorrelation (Moran’s I, y-axis) for a selected gene or gene signature. Moran’s I is computed per sample from spot-level log-normalised counts using spatial coordinates. Each point represents a sample, colored by a patient grouping variable (e.g., indication). Useful for identifying genes that are highly expressed at the bulk level and also spatially organised within the tissue.

Parameters:

  • gene_input: Single gene or gene signature (required)

  • color_group_display_name: Display name for the color grouping variable (default: indication)

  • title: Optional custom title

Use Cases:

  • Show the relationship between bulk TP53 expression and spatial autocorrelation

  • Concordance between bulk expression and spatial Moran’s I for a gene signature

  • Show the relationship between bulk expression and spatial Moran’s I for ERBB2 in MOSAIC breast cancer patients

Last updated

Was this helpful?