For the complete documentation index, see llms.txt. This page is also available as Markdown.

Embeddings & scatter plots

Position observations by two numeric coordinates and encode a third dimension — metadata, an expression level, or a signature score — in the points' appearance; or assess the agreement of two parallel

Position observations by two numeric coordinates and encode a third dimension — metadata, an expression level, or a signature score — in the points' appearance; or assess the agreement of two parallel measurements of the same observations.

Embedding coloured by categorical metadata

Description

Analysis summary

Places each cell or sample at its 2-D embedding coordinates and colours the points by a categorical metadata column, quantifying per category how cleanly it separates from the rest of the space.

Computation

Each observation is drawn at its (first, second) embedding coordinates. Two geometry statistics are computed per category, in the embedding space itself: the silhouette coefficient — how close each point sits to its own category versus the nearest other one, in [-1, 1], higher meaning better-separated globally — and the nearest-neighbour purity — the share of each point's 15 nearest neighbours sharing its label, higher meaning more locally homogeneous. Silhouette is estimated on a deterministic stratified subsample (capped at 5000 points; the per-category row reports how many points were actually used); nearest-neighbour purity uses all points. Both are NaN when fewer than two categories are present. No statistical tests are computed.

When to use

Use to check how categories occupy an embedding — whether cell types form separate regions, or a condition splits the space. The geometry stats tell you whether the visual separation is real or an artefact of the projection: embeddings do not conserve original distances, so treat the statistics as descriptive of the embedding, not of the underlying data.

Caveats

Both metrics are computed in the 2-D embedding, which distorts original distances; a low silhouette may reflect the projection, not the biology. Rare categories with few points give unstable metrics.

Example questions

example questions
  • Bulk RNA-seq UMAP colored by metadata variable

  • Single-cell UMAP colored by a metadata variable (e.g. cell type, indication, cohort)

  • Proteomics UMAP colored by metadata variable

Input columns

input columns
column
type
required
description

index

any

required

Sample/cell identifier (hover, dedup key). Required in every mode.

x_value

numeric

required

X coordinate. MODE 1/2/3: embedding coord (e.g. umap_1). MODE 4: x-axis measurement (e.g. bulk log2(TPM+1)).

y_value

numeric

required

Y coordinate. MODE 1/2/3: embedding coord (e.g. umap_2). MODE 4: y-axis measurement (e.g. % cells expressing).

x_group

categorical

required

Categorical column. MODE 1: the metadata each point's appearance encodes. MODE 3: gene names to aggregate via the signatures parameter.

patient_id

categorical

required

Patient identifier required for population summary statistics.

Visualizations

  • scatter How to read: One dot per observation at its embedding coordinates, coloured by the category it belongs to (legend). Categories whose dots occupy distinct regions separate well; interleaved dots indicate overlap. The accompanying geometry table gives each category its silhouette (global separation, [-1, 1]) and nearest-neighbour purity (local homogeneity, [0, 1]) — higher in both means a cleaner separation.

Example analysis 1

Name — UMAP of TCGA Bladder Patients with Clinical T Stage > 2 by Gender

Analysis parameters

analysis_name, analysis_params, viz_params

Visualization — scatter

UMAP of TCGA Bladder Patients with Clinical T Stage > 2 by Gender

Output table

descriptive_stats (2 rows)
category
n
silhouette_category_mean
nn_purity_category_mean
silhouette_global_mean
silhouette_n_samples
nn_purity_global_mean

female

65

0.002531

0.2985

-0.001413

223

0.5928

male

158

-0.003035

0.7139

-0.001413

223

0.5928

Embedding coloured by single-gene expression

Description

Analysis summary

Places each cell or sample at its 2-D embedding coordinates and colours the points by a single gene's expression level, showing where on the embedding the gene is active.

Computation

Each observation is drawn at its (first, second) embedding coordinates; the scale encoding its expression value spans the observed range. The gene enters the query as a row filter, not a grouping variable. The value column can be transformed first (log2(value + 1) by request). The descriptive stats table carries the expression distribution summary (expressed fraction, mean among expressing observations, and quantiles). No statistical tests are computed.

When to use

Use to localise a single gene's expression on an embedding — which regions of the space (and thus which cell populations) the gene marks. Never pass more than one gene's rows: for several genes use one analysis per gene, and for gene panels use the signature mode of this analysis.

Caveats

Encoding only the level overstates low-level expression on sparse counts — observations with a zero read are typically indistinguishable from unexpressed ones; the expressed fraction in the stats table disambiguates.

Example questions

example questions
  • Bulk RNA-seq UMAP colored by gene expression

  • Single-cell UMAP colored by gene expression

  • Proteomics UMAP colored by protein expression

Input columns

input columns
column
type
required
description

index

any

required

Sample/cell identifier (hover, dedup key). Required in every mode.

x_value

numeric

required

X coordinate. MODE 1/2/3: embedding coord (e.g. umap_1). MODE 4: x-axis measurement (e.g. bulk log2(TPM+1)).

y_value

numeric

required

Y coordinate. MODE 1/2/3: embedding coord (e.g. umap_2). MODE 4: y-axis measurement (e.g. % cells expressing).

value

numeric

required

Numeric measurement encoded in each point's appearance. MODE 2: one gene's expression (e.g. count_lognorm). MODE 3: per-gene expression aggregated into signatu…

patient_id

categorical

required

Patient identifier required for population summary statistics.

Visualizations

  • scatter How to read: One dot per observation at its embedding coordinates, coloured by the gene's expression level on a continuous colour bar: bright colour marks expressing cells, muted/grey dots mark zero or near-zero values. Regions of coherent colour show where the gene is active. Hovering a dot shows the observation and its value.

Example analysis 1

Name — CD8A Expression in TCGA Bladder Patients (Age > 40)

Analysis parameters

analysis_name, analysis_params, viz_params

Visualization — scatter

CD8A Expression in TCGA Bladder Patients (Age > 40)

Output table

descriptive_stats (1 rows)
n
n_zeros
mean_all
mean_non_zero
std_non_zero
p50_non_zero
max_non_zero

431

0

2.132

2.132

1.467

1.905

7.123

Embedding coloured by gene signature score

Description

Analysis summary

Places each cell or sample at its 2-D embedding coordinates and colours the points by the mean expression of a named gene set (signature), showing where a multi-gene programme is active.

Computation

Each observation's expression values for the signature's member genes are averaged into one score per point, which colours the point on the embedding. The descriptive stats table carries the signature-score distribution summary. No statistical tests are computed.

When to use

Use to visualise the spatial distribution of a multi-gene programme (e.g. a cytotoxic T-cell signature) across the embedding. Never use this mode with a single gene — use the single-gene mode of this analysis; the two are mutually exclusive.

Caveats

A signature score is a plain mean of member genes, not a tested signature: genes with high baseline levels dominate the score, and the score's scale depends on the panel chosen.

Input columns

input columns
column
type
required
description

index

any

required

Sample/cell identifier (hover, dedup key). Required in every mode.

x_value

numeric

required

X coordinate. MODE 1/2/3: embedding coord (e.g. umap_1). MODE 4: x-axis measurement (e.g. bulk log2(TPM+1)).

y_value

numeric

required

Y coordinate. MODE 1/2/3: embedding coord (e.g. umap_2). MODE 4: y-axis measurement (e.g. % cells expressing).

value

numeric

required

Numeric measurement encoded in each point's appearance. MODE 2: one gene's expression (e.g. count_lognorm). MODE 3: per-gene expression aggregated into signatu…

x_group

categorical

required

Categorical column. MODE 1: the metadata each point's appearance encodes. MODE 3: gene names to aggregate via the signatures parameter.

patient_id

categorical

required

Patient identifier required for population summary statistics.

Visualizations

  • scatter How to read: One dot per observation at its embedding coordinates, coloured by the signature's mean score on a continuous colour bar: bright colour marks cells where the programme is active, muted/grey dots where it is silent. Hovering a dot shows the observation and its score.

Example analysis 1

Name — Cytotoxic T-cell Signature UMAP of Single Cell RNA-seq for Mesothelioma

Analysis parameters

analysis_name, analysis_params, viz_params

Visualization — scatter

Cytotoxic T-cell Signature UMAP of Single Cell RNA-seq for Mesothelioma

Output table

descriptive_stats (1 rows)
x_group
n
n_zeros
mean_all
mean_non_zero
std_non_zero
p50_non_zero
max_non_zero

Cytotoxic T-cell

72988

68611

0.2376

3.962

1.336

3.72

8.937

Concordance of two parallel measurements

Description

Analysis summary

Compares two parallel measurements of the same observations to assess their agreement, with an overall correlation coefficient.

Computation

The two measurements — x and y, observation-aligned — are compared directly. One overall correlation coefficient is computed over the observations where both values are present: Pearson by default, Spearman when requested, reported with its two-sided p-value and the number of contributing pairs (fewer than three pairs yield no coefficient). The descriptive stats table carries the overall mean of each measurement and, when a categorical grouping is provided, one additional row per group with its own means.

When to use

Use to assess agreement between two assays or two computational pipelines measuring the same quantity on the same cohort (e.g. bulk RNA-seq expression versus single-cell-derived expression of a gene). For pairwise correlation matrices between many features, use the correlation analyses instead.

Caveats

One overall coefficient only — it says nothing about group-specific agreement, and a high correlation does not imply identical scales: a systematic offset between the two measurements is invisible to it.

Example questions

example questions
  • Bulk RNA-seq vs single-cell expression concordance for a gene

  • Bulk RNA-seq vs spatial transcriptomics expression concordance for a gene

  • Bulk RNA-seq vs proteomics intensity concordance for a gene

Input columns

input columns
column
type
required
description

index

any

required

Sample/cell identifier (hover, dedup key). Required in every mode.

x_value

numeric

required

X coordinate. MODE 1/2/3: embedding coord (e.g. umap_1). MODE 4: x-axis measurement (e.g. bulk log2(TPM+1)).

y_value

numeric

required

Y coordinate. MODE 1/2/3: embedding coord (e.g. umap_2). MODE 4: y-axis measurement (e.g. % cells expressing).

x_group

categorical

optional

Categorical column. MODE 4: optional grouping of the observations, adding per-group means to the descriptive stats.

patient_id

categorical

required

Patient identifier required for population summary statistics.

Visualizations

  • scatter How to read: One dot per observation at (measurement x, measurement y); the dashed line is the least-squares fit through all points. Dots close to the line agree between the two measurements; systematic departures above or below it signal a scale or offset difference. Points are coloured by the optional grouping column when one is given. The accompanying statistical table reports the overall correlation coefficient with its p-value and the number of contributing pairs.

Example analysis 1

Name — CD8A Bulk vs Single-cell Concordance (Malignant) — MOSAIC Mesothelioma

Analysis parameters

analysis_name, analysis_params, viz_params

Visualization — scatter

CD8A Bulk vs Single-cell Concordance (Malignant) — MOSAIC Mesothelioma

Output table

descriptive_stats (3 rows)
group
n
x_value_mean
y_value_mean

overall

9

3.257

1.495

female

2

2.307

1.664

male

7

3.528

1.446

statistical_tests (1 rows)
method
r
p_value
n

pearson

0.4646

0.2077

9

Last updated

Was this helpful?