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

Oncoprint

Visualize mutations and copy-number alterations across genes and samples in an oncoprint, revealing cohort-wide alteration patterns and co-occurrences.

Visualize mutations and copy-number alterations across genes and samples in an oncoprint, revealing cohort-wide alteration patterns and co-occurrences.

Alteration matrix (oncoprint)

Description

Analysis summary

A genes × samples heatmap displaying genomic alterations (mutations and copy-number changes) across a cohort, with genes ranked by alteration frequency and samples waterfall-sorted — those hit in the most-altered genes first — to highlight patterns of co-occurrence and mutual exclusivity.

Computation

Builds the ordered alteration matrix from a long table of alterations plus a sample spine, so unaltered samples stay in the cohort denominator. Genes are ordered by their number of altered samples, most-altered first, filtered by the recurrence floor and capped at the row limit. Samples are sorted in the classic oncoprint waterfall order: each alteration type is weighted by its cohort-wide frequency, and samples are ordered by their hits on the top gene, then the second, and so on — samples altered in the most-recurrent gene sit leftmost, unaltered spine samples trail last. When a sample-level subgroup column is present, the analysis computes the share of each subgroup's samples altered per gene and tests whether each gene's alteration rate differs across subgroups (Fisher's exact for two subgroups, chi-square for more, Benjamini-Hochberg-adjusted across genes; samples with no subgroup value go to 'Unknown', shown but excluded from the test), and the display splits into one column of cells per subgroup. The statistical tests always carry a pairwise mutual-exclusivity / co-occurrence table (cBioPortal-style): for every pair of displayed genes, a two-sided Fisher's exact test on the 2x2 alteration-overlap table with a log2 odds ratio, a Benjamini-Hochberg FDR q-value, and a tendency label (co-occurrence vs mutual exclusivity).

When to use

Use whenever the user asks for a cohort-level mutation/CNV landscape across a panel of genes, co-occurrence patterns of alterations, or a 'who's mutated where' summary across samples.

Caveats

The waterfall sort is a display construction: co-altered samples cluster because of the sort, not necessarily because of shared biology. Genes altered in a single sample add rows with little signal — raise the recurrence floor to focus on recurrent alterations. Alteration-overlap p-values are Benjamini-Hochberg-adjusted across the tested gene pairs only; no correction spans the two test families.

Example questions

example questions
  • Oncoprint of mutations and CNV across a driver gene panel

  • Oncoprint of TP53, KRAS, EGFR, STK11, KEAP1 across the LUAD cohort

  • Oncoprint of recurrent alterations only (genes altered in ≥3 samples)

  • Mutations-only oncoprint (no CNV)

  • Oncoprint tagging oncogenic driver mutations (Mosaic datasets)

Input columns

input columns
column
type
required
description

patient_id

categorical

required

Patient identifier required for population summary plots.

sample_id

categorical

required

Sample identifier — one grid column per sample. Include EVERY cohort sample (via a sample-spine LEFT JOIN), not only altered ones, so per-gene '% altered' uses…

gene_name

categorical

required

Gene symbol — one grid row per gene. Null for spine rows of samples that carry no alteration in the queried gene panel (kept only to count the cohort size).

alteration_type

categorical

required

Alteration label that colors the tile — pass the source column through unchanged. For mutations, alias variant_classification (MAF terms like Missense_Mutati…

alteration_class

categorical

optional

Optional layer tag: 'mutation' or 'cnv'. CNV tiles render as a full-cell block, mutations as a smaller block on top, so co-occurring hits both stay visible. Wh…

subgroup

categorical

optional

Optional sample-level grouping (e.g. immune hot/cold, tumor stage, treatment arm): one value per sample, repeated on all of that sample's rows. descriptive_sta…

Visualizations

  • oncoprint How to read: A grid of colored tiles: one column per sample (waterfall-sorted, so co-altered samples cluster and unaltered samples trail on the right), one row per gene (most-altered first). Each cell carries a CNV background block (e.g. Amplification, Deep Deletion) with the mutation type (e.g. Missense, Nonsense) layered as a narrower stripe on top — the cBioPortal convention. Alteration labels follow the MAF (TCGA) or Sequence-Ontology (Mosaic) vocabularies and are colored the same way; unknown terms fall back to the categorical palette (overridable via color_map). With a subgroup column the grid splits into one column of cells per subgroup, sharing the gene rows. Per-gene '% altered' annotations sit on the y-axis, and summary bars on the top and right margins stack alterations per sample and per gene.

Example analysis 1

Name — Oncoprint: mutations + CNV across top recurrently mutated genes (TCGA BRCA cohort)

Analysis parameters

analysis_name, analysis_params, viz_params

Visualization — oncoprint

Oncoprint: mutations + CNV across top recurrently mutated genes (TCGA BRCA cohort)

Output table

descriptive_stats (first 10 of 33 rows)
gene_name
n_altered
pct_altered
n_Missense_Mutation
n_Amplification
n_Duplication
n_Frame_Shift_Del
n_Hetero Deletion
n_Nonsense_Mutation
n_Frame_Shift_Ins
n_Splice_Site
n_Full Deletion
n_In_Frame_Del
n_In_Frame_Ins
n_Intron
n_Translation_Start_Site

PIK3CA

378

31.1

338

81

137

0

4

0

0

0

0

15

0

1

0

TP53

350

28.8

214

9

70

48

87

47

14

25

0

5

0

0

0

GATA3

168

13.8

13

46

54

24

1

4

65

22

0

1

0

0

0

ERBB2

155

12.8

27

133

10

2

2

0

0

0

0

1

0

0

0

CDH1

133

10.9

16

3

5

35

59

31

33

13

0

4

0

0

0

KMT2C

108

8.9

37

13

37

20

4

35

10

3

2

1

0

0

0

MAP3K1

94

7.7

26

12

26

37

3

23

28

4

2

4

0

0

0

PTEN

87

7.2

21

6

10

17

14

13

6

6

24

2

0

0

0

MAP2K4

63

5.2

15

2

7

7

17

9

4

8

18

0

0

0

0

NF1

62

5.1

14

23

3

5

17

11

4

7

1

0

0

0

0

statistical_tests (first 10 of 528 rows)
Contrast
Gene A
Gene B
Neither
A Not B
B Not A
Both
Log2 Odds Ratio
P-value
Adjusted P-value
Tendency

TP53 vs CDH1

TP53

CDH1

743

339

122

11

-2.282

1.764e-09

9.312e-07

Mutual exclusivity

ERBB2 vs NF1

ERBB2

NF1

1021

132

39

23

2.197

4.278e-07

0.0001048

Co-occurrence

TP53 vs ERBB2

TP53

ERBB2

782

278

83

72

1.287

5.954e-07

0.0001048

Co-occurrence

PIK3CA vs MAP2K4

PIK3CA

MAP2K4

811

341

26

37

1.75

4.112e-06

0.0005428

Co-occurrence

TP53 vs AKT2

TP53

AKT2

856

330

9

20

2.483

6.702e-06

0.0007078

Co-occurrence

TP53 vs MYB

TP53

MYB

850

326

15

24

2.042

1.681e-05

0.001479

Co-occurrence

AKT1 vs CTCF

AKT1

CTCF

1162

29

18

6

3.791

3.403e-05

0.002567

Co-occurrence

PIK3CA vs CDH1

PIK3CA

CDH1

767

315

70

63

1.132

3.967e-05

0.002618

Co-occurrence

PIK3CA vs MAP3K1

PIK3CA

MAP3K1

790

331

47

47

1.254

6.982e-05

0.003815

Co-occurrence

TP53 vs MAP3K1

TP53

MAP3K1

782

339

83

11

-1.655

7.225e-05

0.003815

Mutual exclusivity

Last updated

Was this helpful?