Interactive Tools for Reliable Omics Visualization

Kris Sankaran
University of Wisconsin-Madison
CGSI 2026
2026-07-10

How many times larger is the circle on the right?

Design choices make a big difference in the accuracy of our interpretations.


How many times taller is the bar on the right?

Design choices make a big difference in the accuracy of our interpretations.


Encoding and Efficiency

Different ways of encoding information are perceived with different accuracies. This means that any visualization implicitly prioritizes some comparisons over others.


Figure from [1].

Visualizing High Dimensions

Effective visualization becomes even more difficult when we measure many features.

There’s only so much we can show in a single view.

phylobar








Kuo, M., Lê Cao, K.-A., Kodikara, S., Mao, J., & Sankaran, K. (2026). phylobar: an R package for multiresolution compositional barplots in omics studies. Bioinformatics (Oxford, England), 42(4). doi:10.1093/bioinformatics/btag151

Motivation

Stacked bar plots are used in microbiome research to compare composition across groups or over time.

  • \(x\)-axis position encodes samples
  • Color encodes taxonomy

Figure from the Qiime2 paper [2].

Challenges

The basic limitation is that they can only show so many colors at a time. This makes it difficult to study rarer taxa.

Figure from the microbiomeViz documentation [3].

Challenges

The basic limitation is that they can only show so many colors at a time. This makes it difficult to study rarer taxa.

Figure from the Qiime2 documentation [2].

Approach

The basic idea of phylobar is to use this tree structure (context) to interactively paint (focus) the stacked bar plot.

Figure from the phylobar documentation [4].

Interactions

We can press the control or number keys to cycle across a color palette.

Interactions

We can press the control or number keys to cycle across a color palette.

Interactions

We can collapse and expand the tree and the barplot rectangles merge or split accordingly.

Pseudobulk Data

This idea works whenever you cared about hierarchically organized compositions, like this COVID-19 immunology data from [5].

Notebooks

We can embed these visualizations into quarto documents.

Distortion Visualization








Sankaran, K., Zhang, S., Chenab, & Meilă, M. (2026). Interactive visualization of metric distortion in nonlinear data embeddings using the distortions package. Briefings in Bioinformatics, 27(2). doi:10.1093/bib/bbag136

Distortions in \(t\)-SNE and UMAP

Both \(t\)-SNE and UMAP introduce distortions. For example, they may not preserve density within different regions of the plot.

DensMAP is designed to address density distortion [6].

Distortions in \(t\)-SNE and UMAP

They can also fail to preserve the topology of the underlying data…

Example from [7].

Consequences

These distortions are not mere technical curiosities – they significantly impact scientific interpretation [79]. For example, they create misleading differences between cell types that are actually similar.

scDEED tunes hyperparameters to improve embedding reliability [10].

Approach

Rather than abandoning nonlinear dimensionality reduction, we augment the embeddings to characterize distortion.

  • Local distortion: How does the data manifold get warped by the embedding?
  • Fragmented neighborhoods: How do distances in the original and embedding spaces compare?

Precedent

Our approach is similar to Tissot’s indicatrix [11] except the embedding map doesn’t have an analytical formula.

Local Distortion

The RMetric method [12,13] estimates an embedding’s effect on a unit circle in the original space.

Fragmented Neighborhoods

For a more global summary of distortion, we fit a running median to true vs. embedding neighbor distances, flag outliers above \(\sigma \times \text{IQR}\), and mark points with many outlier links as “fragmented.”

Variable Density Swiss Roll

This is the classic Swiss Roll data, but with higher density near the endpoints.

Variable Density Swiss Roll

\(t\)-SNE (perplexity = 100) breaks the roll in the low-density region and artificially spreads the high density area.

Fragmented Neighborhoods

Fragmented Neighborhoods

Poorly Preserved Distances

Hydra Cell Atlas

Hydra Cell Atlas

Hydra Cell Atlas

Hydra Cell Atlas

Hydra Cell Atlas

Hydra Cell Atlas

DensMap vs. UMAP

Both variation in ellipses and fragmented neighborhood statistics can be used to compare competing algorithms, similarly to [10,14].

DensMap vs. UMAP

Both variation in ellipses and fragmented neighborhood statistics can be used to compare competing algorithms, similarly to [10,14].

Online App

You can experiment with this method in the browser at this link:

https://distortionwebapp.streamlit.app/

Focus-plus-context

  • The thread in both these projects is the focus-plus-context principle from data visualization [15].

  • We allowed the viewer to query for details relevant to the overall interpretation while maintaining relevant context.

Summary

The focus-plus-context principle lets us create more reliable visualizations by overlaying important details onto initial views.

Papers:

Packages: phylobar is on Bioconductor and distortions is on pypi

Acknowledgments

  • Contact: ksankaran@wisc.edu
  • Lab Members: Megan Kuo, Yuliang Peng, Langtian Ma, Cameron Jones, Jiaxin Ye, Helena Huang
  • Collaborators: Jiadong Mao, Saritha Kodikara, Kim-Anh Le Cao, Chenab, Shuzhen Zhang, Taiqian Zhang, Marina Meila
  • Funding: NIGMS R01GM152744, NIAID R01AI184095, Gates INV-072185, NIH R01HG014687

Appendix

RMetric Motivation

The RMetric algorithm [12,13] quantifies distortion geometrically. To motivate the algorithm, consider the distortion induced by mapping the sphere into latitude/longitude coordinates.

Half-Sphere Parameterization

Parameterize points on \(\mathcal{M}\) using spherical coordinates:

\[\begin{align*} \mathbf{x}\left(p\right) = \left(\cos\varphi\cos\theta, \cos\varphi \sin\theta, \sin\varphi\right) \end{align*}\]

The associated (latitude, longitude) embedding is

\[\begin{align*} \mathbf{z}\left(p\right) = \left(\theta\left(p\right), \varphi\left(p\right)\right). \end{align*}\]

Pushforward Metric

What does a small step in the embedding space correspond to in \(\mathcal{M}\)? The pushforward metric answers this,

\[\begin{align*} g_{ij} = \left\langle \frac{\partial\mathbf{x}}{\partial z^i}, \frac{\partial\mathbf{x}}{\partial z^j}\right\rangle_{\mathbb{R}^3} \end{align*}\]

This varies across \(p \in \mathcal{M}\) but we suppress it from the notation.

Pushforward Metric

In the sphere example, these derivatives can be directly computed and to obtain,

\[\begin{align*} G = \begin{pmatrix} \cos^2\varphi & 0 \\ 0 & 1 \end{pmatrix} \end{align*}\] Near the equator (\(\varphi \approx 0\)), a small step in \(\theta\) covers more distance than near the north pole (\(\varphi \approx \frac{\pi}{2}\)).

Dual Pushforward Metric

Alternatively, the gradients \(\nabla z^i\) of the embedding dimensions also reflect distortion.

Since the level sets of \(z^\theta\) become more compressed near the poles, the gradients \(\nabla z^\theta\) become larger there.

Dual Pushforward Metric

Alternatively, the gradients \(\nabla z^i\) of the embedding dimensions also reflect distortion.

In contrast, the gradients \(\nabla z^{\varphi}\) don’t depend on \(\varphi\).

Dual Pushforward Metric

This gradient information can be stored in the matrix \(H\) with elements,

\[\begin{align*} h^{ij} = \langle \nabla z^i, \nabla z^j \rangle_{g_{0}} \end{align*}\] where \(g_{0}\) is the metric on \(\mathcal{M}\) inherited from the ambient space.



\(H\) is computable from data while \(G\) requires an explicit manifold parameterization.

Dual Pushforward Metric

In our running example,

\[\begin{align*} H = \begin{pmatrix} 1/\cos^2\varphi & 0 \\ 0 & 1 \end{pmatrix} \end{align*}\]

We can see that \(H = G^{-1}\) and that is actually true more generally.

Product Rule for Laplacians

For any \(f\) and \(g\), the Laplacian \(\Delta\) satisfies, \[\begin{align*} \Delta(fg) = f\,\Delta g + g\,\Delta f + 2\langle \nabla f, \nabla g \rangle_{g_{0}} \end{align*}\]

Setting \(f = z^i\), \(g = z^j\) and rearranging, \[\begin{align*} h^{ij} = \langle \nabla z^i, \nabla z^j \rangle_{g_0} = \frac{1}{2}\left[\Delta(z^i z^j) - z^i\Delta z^j - z^j\Delta z^i\right] \end{align*}\]

Since there are methods for estimating \(\Delta\) from data [16,17], we also have a practical method for approximating local distortions \(H\)!

Graph Laplacian

To compute \(L\), we use the estimator from [17].

  1. Build the kernel matrix \(W_{kl} = \exp(-\|X_k - X_l\|^2 / h)\), where \(h\) is a bandwidth hyperparameter.

  2. Normalize both columns and rows. \[\begin{align*} D &= \text{diag}(W\mathbf{1}) \qquad \tilde{W} = D^{-1}WD^{-1} \\ \tilde{D} &= \text{diag}(\tilde{W}\mathbf{1}) \qquad L = \tilde{D}^{-1}\tilde{W} \end{align*}\] Column normalization accounts for differences in sampling density.

Derivation of \(G\)

First note that, \[\begin{align*} \frac{\partial\mathbf{x}}{\partial \theta} = \left(-\cos\varphi\sin\theta, \cos\varphi\cos\theta, 0\right). \end{align*}\] Therefore, \[\begin{align*} g_{11} &= \left\langle \frac{\partial\mathbf{x}}{\partial \theta}, \frac{\partial\mathbf{x}}{\partial \theta}\right\rangle_{\mathbb{R}^3} \\ &= \cos^2\varphi\sin^2\theta + \cos^2\varphi\cos^2\theta \\ &= \cos^2\varphi \end{align*}\]

Derivation of \(H\) from \(\Delta\left(fg\right)\)

By the product formula with \(z^1 = \theta\): \[\begin{align*} h^{11} = \langle \nabla \theta, \nabla \theta \rangle_{g_0} = \frac{1}{2}\left[\Delta(\theta^2) - 2\theta\Delta\theta\right] \end{align*}\]

Derivation of \(H\) from \(\Delta\left(fg\right)\)

The general formula for the Laplace-Beltrami operator is \[\Delta f = \frac{1}{\sqrt{\det G}}\sum_{i,j}\frac{\partial}{\partial z^i}\left(\sqrt{\det G}\, g^{ij}\frac{\partial f}{\partial z^j}\right).\]

Since \(\det(G) = \cos^2\varphi\) and the off-diagonal \(g^{ij}\) are zero, \[\begin{align*} \Delta f = \frac{1}{\cos^2\varphi}\frac{\partial^2 f}{\partial\theta^2} + \frac{1}{\cos\varphi}\frac{\partial}{\partial\varphi}\left(\cos\varphi\frac{\partial f}{\partial\varphi}\right) \end{align*}\]

Derivation of \(H\) from \(\Delta\left(fg\right)\)

We can plug in the choices of \(f\) that we care about, \[\begin{align*} \Delta\theta &= 0\\ \Delta(\theta^2) &= \frac{1}{\cos^2\varphi}\frac{\partial^2(\theta^2)}{\partial\theta^2} = \frac{2}{\cos^2\varphi} \end{align*}\]

and then substitute into the formula from 2 slides ago, \[\begin{align*} h^{11} = \frac{1}{2}\left[\frac{2}{\cos^2\varphi} - 2\theta \cdot 0\right] = \frac{1}{\cos^2\varphi}. \end{align*}\]

RMetric Implementation

Let \(z_{k} \in \mathbb{R}^{N}\) be the \(k^{th}\) embedding dimension. Let \(L\) be the doubly-normalized graph Laplacian [17]. Compute

\[\begin{align*} H_{kk'}^{(\cdot)} := \frac{1}{2}\left[L\left(z_{k} \circ z_{k'}\right) - z_{k} \circ \left(L z_{k'}\right) - z_{k'} \circ \left(L z_{k}\right) \right] \in \mathbb{R}^{N} \end{align*}\]

The embedding distortion for sample \(n\) is given by \(H^{(n)} \in \mathbb{R}^{K \times K}\)

Interpretation

For a \(K\)-dimensional embedding map, it returns a collection of matrices \(H_{n} \in \mathbb{R}^{K \times K}\) showing how each dimension is dilated or compressed.

Interpretation

For a \(K\)-dimensional embedding map, it returns a collection of matrices \(H_{n} \in \mathbb{R}^{K \times K}\) showing how each dimension is dilated or compressed.

In this neighborhood, \(H_{n} \approx \begin{pmatrix} 0.5 & 0 \\ 0 & 0.5 \end{pmatrix}\).

Interpretation

For a \(K\)-dimensional embedding map, it returns a collection of matrices \(H_{n} \in \mathbb{R}^{K \times K}\) showing how each dimension is dilated or compressed.

In this neighborhood \(H_{n} \approx \begin{pmatrix} 2 & 0 \\ 0 & 0.5 \end{pmatrix}\).

Interpretation

For a \(K\)-dimensional embedding map, it returns a collection of matrices \(H_{n} \in \mathbb{R}^{K \times K}\) showing how each dimension is dilated or compressed.

In this neighborhood, \(H_{n} \approx \begin{pmatrix} 0.7 & 0.2 \\ 0.2 & 0.6 \end{pmatrix}\).

Interaction Gulfs

There are two classic challenges in interactive interfaces [18],

  • Gulf of Execution: The gap between what you want to do and how you specify it in the system.

These challenges also apply to interactive data analysis.

Interaction Gulfs

There are two classic challenges in interactive interfaces [18],

  • Gulf of Evaluation: The gap between what the system shows you and an understanding of what it represents.

These challenges also apply to interactive data analysis.

Comparison with LOO-map

The stability-based algorithm [8] gives a similar interpretation. But the visual encoding is more subtle, and the leave-one-out approach is time consuming even with approximations.

Interactions

We can use a search bar to look up groups we care about in advance.

References

[1]
Heer J, Bostock M. Crowdsourcing graphical perception: Using mechanical turk to assess visualization design. Proceedings of the SIGCHI conference on human factors in computing systems, 2010, p. 203–12.
[2]
Bolyen E, Rideout JR, Dillon MR, Bokulich NA, Abnet CC, Al-Ghalith GA, et al. Reproducible, interactive, scalable and extensible microbiome data science using QIIME 2. Nature Biotechnology 2019;37:852–7. https://doi.org/10.1038/s41587-019-0209-9.
[3]
Barnett DJM, Arts ICW, Penders J. microViz: An r package for microbiome data visualization and statistics. Journal of Open Source Software 2021;6:3201. https://doi.org/10.21105/joss.03201.
[4]
Kuo M, Lê Cao K-A, Kodikara S, Mao J, Sankaran K. Phylobar: An r package for multiresolution compositional barplots in omics studies 2025. https://doi.org/10.1101/2025.11.05.686662.
[5]
Su Y, Chen D, Yuan D, Lausted C, Choi J, Dai CL, et al. Multi-omics resolves a sharp disease-state shift between mild and moderate COVID-19. Cell 2020;183:1479–1495.e20. https://doi.org/10.1016/j.cell.2020.10.037.
[6]
Narayan A, Berger B, Cho H. Assessing single-cell transcriptomic variability through density-preserving data visualization. Nature Biotechnology 2021;39:765–74.
[7]
Kobak D, Linderman GC. Initialization is critical for preserving global data structure in both t-SNE and UMAP. Nature Biotechnology 2021;39:156–7. https://doi.org/10.1038/s41587-020-00809-z.
[8]
Liu Z, Ma R, Zhong Y. Assessing and improving reliability of neighbor embedding methods: A map-continuity perspective. Nature Communications 2025;16. https://doi.org/10.1038/s41467-025-60434-9.
[9]
Irizarry R. Simply Statistics: Biologists, stop putting UMAP plots in your papers — simplystatistics.org 2024.
[10]
Xia L, Lee C, Li JJ. Statistical method scDEED for detecting dubious 2D single-cell embeddings and optimizing t-SNE and UMAP hyperparameters. Nature Communications 2024;15:1753.
[11]
Laskowski PH. The traditional and modern look at tissot’s indicatrix. The American Cartographer 1989;16:123–33.
[12]
Perrault-Joncas D, Meila M. Metric learning of manifolds. Semisupervised Learn 2006;1:293–306.

References (cont.)

[13]
McQueen J, Meilă M, VanderPlas J, Zhang Z. Megaman: Scalable manifold learning in python. Journal of Machine Learning Research 2016;17:1–5.
[14]
Venna J, Kaski S. Local multidimensional scaling. Neural Networks 2006;19:889–99. https://doi.org/10.1016/j.neunet.2006.05.014.
[15]
Heer J, Card SK. DOITrees revisited: Scalable, space-constrained visualization of hierarchical data. Proceedings of the working conference on advanced visual interfaces, New York, NY, USA: Association for Computing Machinery; 2004, p. 421–4. https://doi.org/10.1145/989863.989941.
[16]
Hein M, Audibert J-Y, Luxburg U von. From graphs to manifolds – weak and strong pointwise consistency of graph laplacians. Learning theory, Springer Berlin Heidelberg; 2005, p. 470–85. https://doi.org/10.1007/11503415_32.
[17]
Coifman RR, Lafon S. Diffusion maps. Applied and Computational Harmonic Analysis 2006;21:5–30. https://doi.org/10.1016/j.acha.2006.04.006.
[18]
Hutchins EL, Hollan JD, Norman DA. Direct manipulation interfaces. Human–Computer Interaction 1985;1:311–38. https://doi.org/10.1207/s15327051hci0104_2.