User guide

This guide explains what the reproducible-signal correlation (RSC) measures, how to calculate RSC on your own data, and which files each part of the site reads and writes.

What RSC measures

The reproducible-signal correlation (RSC) scores a prediction against the signal that two halves of the measured RNA share. Each captured RNA molecule is assigned at random to one of two halves. Given the expression, the two halves are independent Poisson counts with the same expectation, and the halves therefore share the true expression and carry independent sampling noise. RSC estimates the correlation between the prediction and the true expression, which the Methods of the paper call the expected expression.

RSC is computed at each spatial scale, from broad tissue compartments to neighboring spots or cells, and within a tissue region or cell class. Scoring against the shared signal at each scale largely corrects the understatement caused by sampling noise at fine scales. Scoring within a region or class largely avoids the overstatement of whole-section correlation, which mainly credits differences between regions.

Definition

Let A and B be the two halves after the count transform, Ŷ the prediction, and ⟨·,·⟩b the inner product of the scale-b components of two matrices, summed over all genes and all bins, spots or cells of a section. At scale b:

  • C = (⟨Ŷ, A⟩b + ⟨Ŷ, B⟩b)/2, the mean covariance of the prediction with the halves.
  • Vmodel = ⟨Ŷ, Ŷ⟩b, the variance of the prediction.
  • VRNA = ⟨A, B⟩b, the covariance between the halves, which estimates the variance of the reproducible signal.

RSCb = C / √(Vmodel · VRNA)

RSC is estimable when Vmodel and VRNA are both positive, and negative RSC values are kept. The computation has six steps. (1) The counts of the test section are split. (2) The halves are transformed and centered, and the prediction is centered and scaled by gene. (3) The prediction and both halves are projected onto the scales. (4) C, Vmodel and VRNA are summed over genes and locations at each scale. (5) RSC is formed from these sums. (6) The steps are repeated over independent count splits, and RSC is averaged.

The scales come from a two-dimensional Fourier basis on a regular grid of bins, from the eigenvectors of a neighbor-graph Laplacian on spots and from diffusion operators on a cell graph for single cells.

Split-half reliability and Pearson r with measured RNA expression

With VA = ⟨A, A⟩b and VB = ⟨B, B⟩b, the split-half reliability ρb = VRNA/√(VAVB) is the correlation between the two halves at scale b. The true expression correlates with one half at about √ρb. For halves of equal variance, RSC is the mean correlation of the prediction with the two halves divided by √ρb, and the correlation of the prediction with the mean of the two halves is

rb(Ŷ, (A + B)/2) = RSCb · √(2ρb/(1 + ρb))

Pearson r with measured RNA expression is therefore lower than RSC where counts are sparse, and Pearson r approaches RSC as sampling noise decreases and ρb approaches 1. In the colorectal sections of the paper, the split-half reliability implies that the true expression reaches a Pearson r with measured RNA expression of 1.00 at the broadest scale and 0.44 to 0.57 at the finest scale. The same relation links the Fourier shell correlation between two cryo-electron microscopy half-maps to the correlation of the full map with the noise-free structure.

When RSC applies

  • Each count is one captured molecule. Visium and Visium HD counts deduplicated by unique molecular identifiers and decoded Xenium transcripts meet this condition. Normalized, log-transformed or imputed values cannot be split.
  • The counts are split before processing. The site and the toolkit take raw counts, split the counts first and then normalize, transform and decompose the halves.
  • The prediction is independent of the counts of the test section. Models trained or tuned on the evaluated section violate this condition, as do inputs estimated from the RNA of the section, such as cell-type proportions or sequencing depth.

Overdispersion of the counts can raise the split-half reliability and lower RSC. Lateral diffusion and other technical variation shared by the two halves count as reproducible signal.

Reading RSC

An RSC of 1 indicates that the prediction accounts for all reproducible variation at that scale, and an RSC of 0 reflects chance agreement. RSC can fall below 0 or exceed 1 because the reproducible variance is estimated from the halves, and small signals give noisy ratios. Means over genes, splits and sections are more stable than single values, and models should be compared on the same sections and genes.

Scale labels are relative on spots (Broadest to Finest, defined by the neighbor graph of each sample) and physical on a grid (wavelength windows in µm), and relative scales are therefore not comparable across datasets. High RSC at broad scales and low RSC at fine scales show that a prediction captures broad patterns and misses fine ones. Within a tissue region or cell class, RSC scores the variation that a prediction captures beyond the region or class labels, and a class-mean baseline has no RSC within regions. The paper computes RSC within malignant cells and within TLS, and Calculate RSC computes both with a cell class or region column.

Which analyses a prediction can support

RSC shows which analyses a prediction can support. Score candidate methods on independent test sections with matched RNA, and read RSC at the spatial scales, tissue regions, cell classes and genes that your analysis depends on.

A high whole-section correlation or a high AUROC for locating a structure can overstate how well a method predicts expression within regions and structures. In the paper, a class-mean baseline that predicts one value per region scores above the median published method on whole sections and locates TLS with an AUROC of 0.99 to 1.00 (Figs. 1b and 5e).

Where an analysis yields low RSC, the predictions warrant experimental validation or statistical frameworks that model predictive uncertainty, such as TISSUE (Sun et al., Nature Methods 2024), or that correct estimation bias with an assayed subset, such as prediction-powered inference (Angelopoulos et al., Science 2023).

Each analysis needs its own evaluation, because a change to training can improve one analysis and degrade another. In the paper, the pairwise difference loss raised fine-scale RSC, broad-scale RSC and whole-section correlation on average across 11 models and lowered the RSC of Ridge–Phikon-v2 between regions and within TLS (Figs. 5f and 6).

RSC inherits the limits of the measurement. Lateral diffusion and other technical variation shared by the two halves count as reproducible signal. Overdispersed counts can slightly lower the RSC of the true expression at fine scales. At single-cell resolution, the evaluation depends on nuclear segmentation and cell classification.

Reporting RSC

Report the settings that determine RSC, as the Methods of the paper do for each dataset, so that others can compare and repeat the evaluation.

  • Layout and scales. A Fourier basis with wavelength windows in µm on a regular grid, the eigenvectors of a neighbor-graph Laplacian with five relative scales on spots, or diffusion operators on a cell graph, together with the construction of the graph. Relative scales are defined by the graph of each sample and are not comparable across datasets.
  • Count transform. For example √(Nhalf/(0.5a)) for bins of effective area a, or log(1 + 2Nhalf) for spots and cells.
  • Gene weighting. Weights from the agreement of the two halves in the other samples of the same cancer type, as for the HEST spots, or the two halves of each gene divided by a common factor, as for the colorectal bins and the cells.
  • Count splits. The number of independent splits averaged, which was 5 to 32 in the paper.
  • Split-half reliability at each scale, next to RSC, so that readers see how much reproducible signal each scale holds.
  • Fine-scale and broad-scale RSC. Whether the two values are means of the RSC at two scales or are formed from the summed terms of the two scales. The paper uses both forms.
  • Regions and cell classes. The regions or classes used and how they were assigned. In the paper, malignant cells are the neoplastic class of CellViT, transferred to Xenium cells by nearest-centroid matching within 5 µm.
  • Genes and independence. The genes scored, and how the predictions were kept independent of the counts of the test sections.
  • Toolkit version.

Calculate RSC

Under Calculate RSC, the browser runs the toolkit function strsc.rsc on your counts and one or more predictions. Each result shows the same call for your own computer, which runs the same steps with the same random seeds. The numbers agree except at locations with many molecules of a gene, where numpy draws the count split with floating-point steps that can differ between computers or numpy versions, and the results then differ within the scatter between count splits. For spots, the browser projects onto the scales with the BLAS library of SciPy in single precision, as the toolkit does. The sums then run in a different order, and the last digits can differ. Each layout has a small synthetic test set that runs with one click, and the test files can be copied as templates.

Files

  • Counts: whole-number molecule counts before normalization, as a CSV or TSV table with sample_id, unit_id, x, y and one column per gene, as an AnnData .h5ad file with raw counts in layers['counts'] or X and coordinates in obsm['spatial'] (HEST-1k samples open directly), as a Space Ranger filtered_feature_bc_matrix.h5 or filtered_feature_bc_matrix folder (matrix.mtx.gz, features.tsv.gz and barcodes.tsv.gz) with tissue_positions and scalefactors_json.json, or as a Xenium cell_feature_matrix.h5 with cells.csv.gz or cells.parquet. A whole outs folder, a Visium HD bin folder or a Xenium output folder can be chosen at once, and the site reads the counts and positions from the folder. Xenium control probes are left out.
  • Predictions: one file per model, a table with unit_id (and sample_id when there are several sections) and one column per gene, or an .h5ad file whose observation names are the unit IDs. For the spatial scales, predictions can be in any units because each gene is centered and scaled before scoring. Between and within regions, predictions should be values of log(1 + 10,000 N/total), as in the paper. Genes and locations missing from a prediction are left out, and the page reports how many.
  • Regions or cell classes (optional): a region or cell_class column in the counts, or a separate table with unit_id and that column.

Layouts

Each layout follows the Methods of the paper (“Scales and count transforms”).

  • Spots, such as Visium or HEST: five relative scales from the eigenvectors of the neighbor-graph Laplacian, log(1 + 2Nhalf) and twenty count splits, the steps of strsc hest. With two or more sections, each gene is weighted by the agreement of the two halves in the other sections, as for the HEST samples. With one section, the two halves of each gene are divided by a common factor, as for the colorectal bins and the cells of the paper. The two weightings give different values, and the page reports which one was used. Each section can have up to 5,000 connected spots. Fine-scale and broad-scale RSC are the means at the two finest and the two broadest scales.
  • Regular grid, such as Visium HD bins: seven physical scales of a two-dimensional Fourier basis, from below 128 µm to 4,096 µm and above, √(Nhalf/(0.5a)) and five count splits, the steps of strsc.fourier.score. The spacing is read from Visium HD files or given by hand, and an optional area column marks bins at the edge of the tissue. Windows below twice the spacing are resolved in part and are drawn as open markers.
  • Cells, such as Xenium: five relative scales from lazy diffusion on the graph of the eight nearest neighbors within 40 µm, log(1 + 2Nhalf) and five count splits, as for the breast cancer cells of the paper. Naming a cell class scores the cells of that class on their own graph, as for the malignant cells of Figure 4a,b, and all cells can be scored as well. Fine-scale RSC is formed from the summed terms of the two finest scales. Each graph can have up to 120,000 cells.

Between and within regions, for spots or bins with a region column. Each prediction and each RNA half is decomposed into the mean of the region and the residual from the mean, as for the TLS sections of Figure 5f. RSC is reported for the whole section, between regions and within regions. When one region such as TLS is named, RSC is also reported within that region, between its structures (connected groups of its spots) and within one structure. Measured expression is log(1 + 10,000 N/total), each half with its own total, with twenty count splits. In each part, each gene of the RNA halves and of the prediction is divided by the standard deviation of the unsplit expression of the gene over the spots of that part, and predictions should therefore be values of log(1 + 10,000 N/total) as well. Intervals are 95% percentile intervals from 2,000 resamples of the structures of the named region for the parts within it and of blocks of 10 × 10 spots for the other parts. A part is scored in a section when the lower limit of the interval of its reproducible variance is above zero, and over several sections the sections in which a part is scored are averaged, in each resample as well. The site runs the computation of the paper. On the TLS section KC1, the site reproduces the Vmodel of the paper to 13 significant digits for each part in which the prediction varies, the same decision on which parts can be scored, and RSC and intervals within the scatter of count splits and resamples. A class-mean baseline has no RSC within regions because the baseline is constant within each region.

Only these genes restricts the scoring to a list, for example the eight TLS genes of Figure 5.

Results

  • A table lists fine-scale and broad-scale RSC (on a grid, the broadest and finest scales), the broadest-to-finest decline and the whole-section Pearson r of each model and section, with the mean over sections.
  • A figure shows RSC, Pearson r with the mean of the two RNA halves and the split-half reliability at each scale, with the range of RSC over the count splits. Where the split-half reliability is low, sampling noise lowers Pearson r well below RSC.
  • A gene table gives the RSC of each gene at each scale for sorting, searching and download. The paper pools all genes before forming RSC, and single genes are noisier.
  • Checks list the three conditions under which RSC applies, the median number of molecules per location and the split-half reliability at the finest scale. On request, the checks also run the test of the paper with the true expression as the prediction (Methods, “Expected expression as a prediction”). Your counts serve as Poisson rates, new counts are drawn, and the true expression should score near 1 at all scales (0.956 to 1.000 in the paper).
  • The same run is given as Python code and as a command for your own computer.

Download results saves a file that opens again under Computed results, and Download tables holds the scales, the summary, all genes and the settings. The page loads Python and the toolkit into the tab once (about 40 MB), plus 2 to 12 MB for .h5ad, .h5 or Parquet files.

Pairwise accuracy

Under Pairwise accuracy, the browser runs strsc her2 on your counts and computes normalized pairwise accuracy for unmatched spot pairs, pairs matched for total transcript count and expression profile, and matched pairs in the same region, as in Figure 2. The test cohort can be copied as a template.

The tables are laid out as for Calculate RSC, and the counts file can also hold patient_id and region. The analysis takes one section per patient and at least two patients, because the baseline for each patient is learned from the other patients. Predictions can be in any units, because a pair is scored on which of its two spots is predicted higher.

Pairwise difference loss

Under Pairwise difference loss, the input is the counts and a table of image features, one vector per spot, for two or more sections. Each section is predicted by ridge regression models trained on the other sections, with ρ = 0 (standard training) and ρ = 0.5 (with the pairwise difference loss) and the settings of the paper (256 principal components, α = 100/(256 × genes)). Both predictions are scored with RSC at relative scales. Fine-scale and broad-scale RSC are the means over the two finest and the two broadest scales, as in Figure 6. The predictions of both trainings are in the download. Deep models are trained with the toolkit.

Computed results

Score tables and bundles written by the Python toolkit open under Computed results.

Score tables

A score table compares the same predictions under two conditions, with one row per model, task and sample or patient. The example under Computed results is the table behind Figure 6c,d.

ColumnContent
modelModel name
taskCohort or tissue group. Figure columns are grouped by task
unit_idSample or patient ID. A column named specimen or patient is also accepted
unit_typespecimen for samples or patient for patients, one type per file
fine_baseline, fine_interventionFine-scale RSC under the two conditions
coarse_baseline, coarse_interventionBroad-scale RSC under the two conditions
pcc_baseline, pcc_interventionWhole-section Pearson r under the two conditions
score_definitionOptional. band_mean for the mean RSC at the two scales, combined_components for RSC from the summed terms of the two scales
baseline_condition, intervention_conditionOptional names of the two conditions
experiment_id, source_tableOptional provenance. Keep separate experiments in separate files

All models must cover the same tasks and IDs. Scores of an ID that appears in several tasks are averaged first, and each model and each ID then carries equal weight. Pearson r stays between −1 and 1, whereas RSC is corrected for sampling noise and can exceed 1.

Fine-scale and broad-scale RSC come in two forms, the mean RSC at the two scales and RSC from the summed terms of the two scales, which strsc hest writes. Name the form in the file or when opening the file.

Intervals in the browser come from 20,000 fixed-seed resamples of IDs within tasks and need at least five IDs. The intervals of the paper were computed differently and are in the Source Data of the paper.

Analysis bundles

An analysis bundle packs a finished HEST run with the expression data, so that maps can be drawn next to the scores. The toolkit writes the bundle with strsc export, which packs the outputs of the run and checks each saved gene correlation against the packed expression (export notes).

A bundle gives RSC at the five scales and the change in RSC, RNA variance and covariance at each scale, expression maps, gene correlations and prediction errors. The scales are relative to the section and are not distances in micrometers. The schema strsc-analysis-bundle-v1 holds a score_table and a list of specimens, each with genes, spot IDs, coordinates, measured expression and two sets of predictions, and the HEST example shows the full layout.

Evaluation bundles

An evaluation bundle holds the scores of one toolkit workflow with the score definitions and is written by strsc export-results. The schema is strsc-evaluation-bundle-v1 (format). Maps need an analysis bundle, which also carries expression and coordinates.

Conventional metrics

Whole-section correlation and AUROC against annotations are kept under Conventional metrics for comparison with RSC. In the paper, whole-section correlation overstates prediction quality within tissue regions, and Pearson r with measured RNA expression understates prediction quality at fine scales.

Expression tables

Choose one file of measured expression and one file per model, name the scale of the measured expression and press Analyze data. Analyze the example opens HER2ST section B1 the same way, and the example files can be copied as a template.

Each file has one row per location, with the columns sample_id, unit_id and one column per gene. Coordinates x, y and a region label are optional and can be in the measured expression file or in a separate file. patient_id groups the sections of one patient. Rows can be in any order. Genes or locations missing from a file are dropped, and an empty or NA cell stays missing and is not read as zero. Data details lists what was left out.

If the predictions are in the output units of a model, untick Predictions are on the same scale. Each map then gets a separate color scale, and RMSE is left out. Correlations are independent of units.

Each gene is scored on the locations where the measured expression and all compared models have a value, and the models are therefore compared on the same locations. The figure has three views.

  • Whole section and regions shows the correlation over the section and within each region label, or inside a rectangle drawn on a map.
  • Scoring unit averages measured expression and predictions in square bins of 2, 4 and 8 typical spacings, anchored at the smallest x and y, and counts each occupied bin once. This view shows how the correlation in one section changes with bin size and differs from the analysis of Figure 4.
  • Region ranks shows where each region sits in the ranks of the measured expression and of the prediction.

These views use ordinary Pearson r and Spearman ρ of the supplied values, with tied values sharing their mean rank. RSC needs RNA counts and is computed under Calculate RSC.

Scores and annotations

This tool compares a score, such as the expression of a marker gene, with expert annotations. One table holds sample_id, unit_id, a column of labels, a score from measured expression and one column per predicted score, and x, y are optional. For several genes, name the columns score:gene, such as measured:LTB, and AUROC can then be averaged over the genes, as in Figure 5e. Pick the columns after choosing the file, or open the external TLS sections.

AUROC compares locations with the chosen label against locations with the labels ticked beside the chosen label. Unlabeled locations and unticked labels are drawn and are left out of the negatives. Each predicted score is also correlated with the measured score over the whole section. An H&E image can be added, and x, y are then the pixel positions in the image.

Figures

The figures follow the style of the paper, with Arial at 7 pt when printed 180 mm wide, lower-case panel letters and left and bottom axes. Expression runs from slate blue through cream to rust. Changes run from brick (lower) through white to teal (higher).

SVG keeps the text editable. PNG is the same figure at 300 dpi. Source data is a CSV of all values in the figure, including genes or locations left out for space.

Rows of patients or samples have one mark per patient, a box for the 95% t interval of the mean (with three or more patients) and a white diamond at the mean. Paired changes are drawn as in Figure 6.

Data explorers

HER2ST cohort reopens Figure 2a–c and 2g–i for 11 methods in eight patients, with the class-mean baseline in gray. Clicking a method or a patient marks the method or patient in all panels. The cohort values are those of the paper.

HER2ST section B1 and the external TLS sections open in Analyze data, in the same tools as your own files. B1 has measured expression of 785 genes, the saved predictions of Hist2ST, EGNv2 and DeepSpaCE, and the annotated regions. The TLS sections are two kidney and two lung sections with expert annotations and eight TLS genes, measured and predicted, as in Figure 5.

HEST sample TENX118 is one lung cancer sample predicted by Ridge–Phikon-v2, after standard training and with the pairwise difference loss.

Xenium breast cancer cells shows Figure 4, including the proliferation hotspots of Figure 4e, for three single-cell methods in five patients, with the four evaluation conditions of Extended Data Fig. 4.

The original source and license of each dataset are listed on the Data explorers page and in Supplementary Table 7 of the paper. Results shows the figures of the paper with the source data.

Python toolkit

The toolkit runs all analyses of this site on your own computer, without a limit on section size. Install the toolkit with pip install strsc (Python 3.10 or later), and pip install "strsc[io]" adds support for Parquet files. One call scores a prediction.

import strsc
counts = strsc.read_counts("sample.h5ad")        # a table, .h5ad, Space Ranger or Xenium folder
result = strsc.rsc(counts, {"my_model": "predictions.csv"}, layout="spots")
print(result.scales)                             # RSC, Pearson r and split-half reliability per scale
result.save("strsc-output")

The command line runs the same analysis with strsc rsc sample.h5ad -p my_model=predictions.csv --layout spots --out strsc-output. strsc.regions scores between and within regions, and strsc.ideal_check runs the test with the true expression. The toolkit also contains the workflows of the paper, and each workflow writes a file that opens under Computed results.

Limits

  • Calculate RSC accepts 256 MB per file and 512 MB in total, with up to 5,000 connected spots per section, 120,000 cells per graph and 400,000 bins per section. Near these sizes a run takes minutes and up to about 4 GB of memory, and a computer with at least 8 GB is recommended. In Chrome on a two-core 2.1 GHz virtual machine, synthetic data of these sizes took 6 minutes for one section of 5,000 spots with 300 genes, 5 minutes for 120,000 cells with 300 genes, and 1.5 minutes for 400,000 bins with 80 genes, or 4 minutes between and within regions. More genes take longer and need more memory, and a run that exceeds the memory of the browser stops. Larger data run with the toolkit on your own computer. Pairwise accuracy and Pairwise difference loss accept 64 MB per file and 256 MB in total.
  • Score tables: 2 MB and 500 rows.
  • Analysis bundles: 64 MB, 2 million expression values, 20,000 locations and 5,000 genes per sample.
  • Evaluation bundles: 64 MB and 100,000 score rows. Tables show 300 rows, and downloads keep all rows.
  • Expression tables: 32 MB per file, 64 MB in total, 2 million shared expression values.
  • Scores and annotations: 64 MB. Images: PNG, JPEG or WebP.
  • Calculate RSC reads .h5ad and 10x .h5 files, and the other tabs take CSV or TSV tables. RDS files need to be converted first, for example to .h5ad.

RNA molecules are split from raw integer counts, and normalized or log-transformed values cannot be split.

Common questions

Why is Pearson r with measured RNA expression lower than RSC at fine scales?
Counts are sparse at fine scales, and sampling noise lowers the split-half reliability ρb. Pearson r with measured RNA expression equals RSCb · √(2ρb/(1 + ρb)). The true expression scores near 1 by RSC at all scales, whereas the Pearson r of the true expression with measured RNA expression falls toward fine scales (Fig. 1c and Extended Data Fig. 1c of the paper).
Can I use normalized, log-transformed or imputed values?
The measured RNA has to be whole-number molecule counts, because only counts of molecules can be split into two halves. Predictions can be in any units for the spatial scales, because predictions are centered and scaled by gene. Between and within regions, predictions should be values of log(1 + 10,000 N/total), as in the paper, because each gene is divided by the standard deviation of the measured expression.
Can I score a single section?
Yes, all layouts work with one section. On spots, two or more sections are scored as the HEST samples of the paper, with each gene weighted by the agreement of the two halves in the other sections. A single section is scored with a common factor per gene, as the colorectal bins and the cells of the paper. The two weightings give different values, and models should be compared under the same weighting.
Why can RSC fall below 0 or rise above 1?
RSC falls below 0 when the prediction is anticorrelated with the reproducible signal at that scale. RSC exceeds 1 when the reproducible signal is small, because the variance of the signal is itself estimated from the two halves. Means over genes, count splits and sections are more stable than single values.
How many count splits are enough?
The site uses the numbers of the paper, twenty splits on spots and between regions and five on a grid and on cells. The paper used 5 to 32 splits across the analyses. More splits make the average more precise and leave the expected value unchanged. Each result shows the range over splits.
Can I score a model trained on the section I am scoring?
No. The derivation of RSC assumes that the prediction is independent of the counts of the test section. The same holds for inputs estimated from the RNA of the test section, such as cell-type proportions or sequencing depth.

Definitions

Output resolution
The spot, bin or cell for which a model returns a prediction. Accuracy among cells of the same class or within a neighborhood is measured by RSC within a cell class and at fine scales.
Count splitting
For the count N of each gene in each bin, spot or cell, NA ~ Binomial(N, 0.5) and NB = N − NA. Given the expression, the two halves are independent Poisson counts with equal expectations, and the halves therefore share the true expression and carry independent sampling noise.
Split-half reliability
The correlation between the two RNA halves at a given spatial scale. The square root of the split-half reliability is the correlation of the true expression with one half.
Reproducible-signal correlation, RSC
A correlation corrected for attenuation, computed at one spatial scale as the mean covariance of the prediction with the two halves divided by the square root of the variance of the prediction times the covariance between the halves. For halves of equal variance, RSC is the correlation with one half divided by the square root of the split-half reliability. An RSC of 1 indicates that the prediction accounts for all reproducible variation at that scale, and an RSC of 0 reflects chance agreement. In the bundles written by the toolkit, the metrics are rsc_B1 to rsc_B5, rsc_broad, rsc_fine, physical_rsc and cell_rsc. The raw result tables of each workflow keep their own column names, in which RSC is the column q.
Relative scales
Broadest, Broad, Mid, Fine and Finest, from section-wide gradients to differences between neighboring spots. The scales are defined relative to the neighbor graph of each sample, and scale labels are therefore not comparable across datasets.
Physical scales
Wavelength windows in micrometers on a regular grid, from 4,096 µm and above to below 128 µm in the colorectal sections of the paper.
Fine-scale and broad-scale RSC
For spot models, fine-scale RSC is the mean RSC at the Fine and Finest scales, and broad-scale RSC the mean at the Broadest and Broad scales. For cells, the terms of the two finest scales are summed before the ratio is formed.
Whole-section Pearson r
For each gene, the Pearson correlation between the prediction and measured expression across the spots of a section, averaged over genes and then over the sections of a patient. A gene predicted as constant scores 0.
Class-mean baseline
A baseline that assigns each spot of an annotated region the mean expression of that region class in the training data. The baseline is constant within regions, and the score of the baseline therefore comes from differences between regions.
Normalized pairwise accuracy, G
Pairwise accuracy is the fraction of spot pairs for which a prediction identifies which spot expresses a gene more highly. Normalized pairwise accuracy scales this fraction from 0% for the majority-order baseline to 100% for the split-half agreement, the accuracy with which one RNA half predicts the order in the other half. G can be negative or exceed 100%.
Majority-order baseline
A baseline that gives each spot pair of a gene the direction observed most often across the training patients.
Unmatched pairs, matched pairs, within-region pairs
The three sets of spot pairs in HER2ST. Unmatched pairs are drawn at random across the section. Matched pairs are matched for total transcript count and expression profile. Within-region pairs are matched pairs in the same annotated region.
Pairwise difference loss
A training loss that penalizes errors in the predicted expression differences between neighboring training spots, added to the original loss of a model.