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

Biomarker feature extraction

Identify small, stable sets of candidate biomarkers that distinguish predefined groups, with selection-stability estimates, cross-validated predictive performance, and interpretable decision trees.

Identify small, stable sets of candidate biomarkers that distinguish predefined groups, with selection-stability estimates, cross-validated predictive performance, and interpretable decision trees.

Per-label feature extraction (heatmap)

Description

Analysis summary

For each value of a categorical label — a cluster, subtype or response group, typically the output of consensus clustering — identifies a minimal set of numeric features that recovers the assignment (one label vs the rest): the candidate features most consistently selected across bootstrap resamples as separating that label from the rest. The result is a small, stable, interpretable candidate marker set per label — a biomarker-development starting point, not a validated deployable signature — mixing any modality the input provides: gene expression, gene-signature scores, clinical numerics, histomics densities. Each label's set comes with its selection stability (how consistently each feature was chosen across resamples), cross-validated predictive metrics, and an interpretable decision tree spelling out the rules behind the label.

Computation

Runs one-vs-rest feature selection per label value. Each draw takes a stratified subsample of the samples, without replacement (the complement serves as held-out validation), z-scores the candidate features, optionally prunes redundant ones — a supervised correlation prune that ranks features by how strongly they separate the label from the rest and drops the weaker feature of any highly correlated pair, recommended when candidates include co-expressed gene programs — and fits the selection model: Orthogonal Matching Pursuit with a fixed sparsity budget, or elastic-net logistic regression swept over several penalty strengths, each fit capped at its strongest coefficients. A feature's selection frequency is the fraction of draws that selected it; each label's final set takes the most frequently selected features up to the sparsity budget. Predictive metrics — ROC-AUC, AUC-PR, accuracy, balanced accuracy, weighted F1 and Cohen's kappa — are computed on the held-out splits for the selection model, and the chosen set is re-evaluated by independent classifiers retrained under a repeated stratified cross-validation (a CatBoost model and a shallow decision tree) to estimate how the set performs beyond the selection procedure itself. For each label, a shallow, interpretable decision tree is also fitted on the whole dataset over that label's selected features and reported as readable text — the rules that separate the label from the rest.

When to use

Use when a cohort already carries a categorical assignment to explain — a cluster (typically from consensus_agglomerative_clustering), a subtype, a response group — and the question is which small, multimodal set of features characterises or predicts each label. To discover the labels themselves, run consensus_agglomerative_clustering first and feed its cluster column in as the label.

Caveats

A selected feature set predicts the label — it is not evidence that the features drive it. Sets are less stable with few samples per label or a large candidate pool, and selection frequency depends on the sparsity budget requested. The analysis needs at least two distinct label values, and each label needs enough samples on both sides of the one-vs-rest split for the cross-validated re-evaluation (it raises with guidance otherwise); feature columns must be complete and numeric — missing values are not imputed, and the analysis raises on the first null or non-numeric feature column.

Example questions

example questions
  • What are the top 5 genes that distinguish each cluster from the rest in the MOSAIC NSCLC consensus clustering ?

  • Use stability selection to find a robust 3-gene feature set for label 2.

  • Extract a minimal feature set per endotype and report cross-validated ROC-AUC.

  • Find a multimodal feature set per label mixing gene expression, H&E histomics densities and clinical numerics.

  • Use stability selection over a wide panel of transcriptomics, histomics and clinical features to characterize each subtype.

Input columns

input columns
column
type
required
description

index

any

required

Sample or patient identifier — one row per sample/patient.

label

categorical

required

Categorical assignment to explain for each sample (string or integer): a cluster, subtype, response group, etc. Typically the cluster column from consensus_a…

patient_id

categorical

required

Patient identifier required for population summary plots.

numeric

required

One column per candidate feature. Anything numeric the SQL SELECT'd besides the reserved columns. All values must be numeric and non-null.

Visualizations

  • heatmap How to read: Rows are candidate features, columns are the label values (each vs the rest), and cell colour encodes the feature's selection frequency for that label — the higher the cell, the more consistently the feature was chosen across the resampling draws (see the colour bar). With sorting enabled, the most selected features gather top-left. A label with no selected feature still appears as a column, at frequency zero.

Example analysis 1

Name — Top-3 Multimodal Features per CD8A-Tertile cluster (Mosaic Bladder: genes + lymphocyte density + age)

Analysis parameters

analysis_name, analysis_params, viz_params

Visualization — heatmap

Top-3 Multimodal Features per CD8A-Tertile cluster (Mosaic Bladder: genes + lymphocyte density + age)

Output table

descriptive_stats (3 rows)
label
n_samples_in_label
n_samples_out
n_features_union
n_features_intersection
n_features_selected
top_feature
top_feature_frequency
top_features
decision_tree_text

1

5

9

10

0

3

cd8a_tpm

0.85

cd8a_tpm, tp53_tpm, ror1_tpm

|--- cd8a_tpm <= 3.12 | |--- class: 1 |--- cd8a_tpm > 3.12 | |--- ror1_tpm…

2

5

9

10

0

3

density_lymphocytes_in_tumor

0.51

density_lymphocytes_in_tumor, mki67_tpm, age

|--- mki67_tpm <= 37.77 | |--- class: 1 |--- mki67_tpm > 37.77 | |--- dens…

3

4

10

8

1

3

cd8a_tpm

1.0

cd8a_tpm, mki67_tpm, tp53_tpm

|--- cd8a_tpm <= 7.96 | |--- class: 0 |--- cd8a_tpm > 7.96 | |--- class: 1

statistical_tests (first 10 of 54 rows)
label
evaluator
metric
mean
std
n_bootstraps_or_n_folds
avg_train_pct
avg_test_pct
avg_n_input_features

1

selector

roc_auc

0.77

0.3116

200

71.43

28.57

7.425

1

selector

aucpr

0.7538

0.3043

200

71.43

28.57

7.425

1

selector

accuracy

0.6362

0.2547

200

71.43

28.57

7.425

1

selector

balanced_accuracy

0.6825

0.2659

200

71.43

28.57

7.425

1

selector

f1_weighted

0.6338

0.2612

200

71.43

28.57

7.425

1

selector

cohen_kappa

0.3085

0.4747

200

71.43

28.57

7.425

1

catboost_reeval

roc_auc

1.0

0.0

8

75.0

25.0

3.0

1

catboost_reeval

aucpr

1.0

0.0

8

75.0

25.0

3.0

1

catboost_reeval

accuracy

1.0

0.0

8

75.0

25.0

3.0

1

catboost_reeval

balanced_accuracy

1.0

0.0

8

75.0

25.0

3.0

Last updated

Was this helpful?