TissuePlex User Manual
TissuePlex is a web-based viewer for spatial transcriptomics data. It layers cell positions, gene expression, cell-to-cell signaling, and custom analysis results on top of a tissue morphology image, running in a browser on your local machine.
No programming experience is required. This guide covers installation, data setup, and every control in the interface.
Six platforms are supported — Xenium, Visium, Visium HD, MERSCOPE, CosMx and seqFISH — and TissuePlex works out which one it is looking at from the files in the folder. The examples below use Xenium; everything transfers, and the platform-specific differences are called out where they matter.
By the end of this guide you will have: TissuePlex installed and running, your dataset loaded, cell-cell communication edges from NICHESv2 visible, and custom analysis results available as cell color overlays.
What You'll Need
A Mac or Windows computer
TissuePlex runs in the browser. No special graphics card is needed.
Your platform's output folder
Whatever your instrument or pipeline produced, unmodified. For Xenium that
is the folder containing experiment.xenium,
morphology.ome.tif and transcripts.parquet; for the
Visium platforms it is the contents of Space Ranger's outs/. See
the platform table in step 5.
An internet connection
Required for the initial download steps only. After setup, TissuePlex runs on your local machine.
About 30–45 minutes
For initial setup. Subsequent launches take seconds.
Getting TissuePlex Running
Install two programs (Git and Docker), download TissuePlex, and run it for the first time. These are one-time steps; after setup, launching TissuePlex takes a single command.
Install Git
Git downloads and manages software repositories. It lets you pull TissuePlex updates with a single command.
On a Mac
Open Terminal (Applications → Utilities, or
⌘ Space and type "Terminal") and run:
git --version
If you see git version 2.x.x, Git is already installed;
skip to Step 2. If a pop-up offers to install "Command Line Developer Tools"
or "Xcode Command Line Tools", click Install and follow the
prompts.
On Windows
Go to git-scm.com, download the Windows installer, and run it. Accept the default settings. When it finishes, you will have a program called Git Bash. Use Git Bash wherever this guide says "Terminal".
git --version in Terminal or Git Bash. A version number should
appear.
Install Docker Desktop
Docker runs TissuePlex in an isolated container that bundles all required software (Python, databases, web server). Install Docker once; no other dependencies are needed on your machine.
Go to docker.com/products/docker-desktop and download Docker Desktop for your operating system. Install it as you would any other application.
Recommended: increase Docker's memory limit
In Docker Desktop, go to Settings (gear icon) → Resources. If your machine has 16 GB of RAM or more, set the memory limit to at least 8 GB, then click Apply & Restart.
Download TissuePlex
Open Terminal (Mac) or Git Bash (Windows). Navigate to the folder where you want to keep TissuePlex, for example:
cd ~/Documents
Then clone the repository:
git clone https://github.com/RaredonLab/TissuePlex.git
cd TissuePlex
This creates a TissuePlex folder and downloads all the code
into it. The second command moves your terminal into that folder.
cd ~/Documents/TissuePlex), run
git pull, then docker compose up --build.
git pull,
Docker Desktop sometimes reuses a stale build cache and serves an outdated
version of the app, resulting in a black screen with an error about a wrong
MIME type in the browser console. If this happens, force a clean rebuild:
docker compose build --no-cache
docker compose up
First Launch
TissuePlex includes a small sample dataset for verifying the installation. With Docker Desktop running, run the following from inside the TissuePlex folder:
docker compose up --build
The first run downloads and builds all container images, which takes
5–15 minutes depending on internet speed. A large amount of
build output will scroll by. When you see messages containing
uvicorn running and nginx, TissuePlex is ready.
Open Chrome or Firefox and go to:
http://localhost:3000
The TissuePlex viewer should load with the sample dataset.
Stopping TissuePlex
Press Ctrl + C in the terminal to stop the process, then run:
docker compose down
docker compose up (without --build) is faster.
Add --build after a git pull to rebuild with
the latest changes.
Load Your Dataset
TissuePlex reads from a parent folder containing one or more dataset subfolders. The expected layout:
Set DATA_PATH to the parent folder. Multiple dataset folders
are supported; TissuePlex lists them all in the interface.
Mac or Linux
DATA_PATH="/Users/yourname/xenium-data" docker compose up --build
Windows (Git Bash)
DATA_PATH="C:/Users/yourname/xenium-data" docker compose up --build
/).
TissuePlex detects the platform from the files present in each subfolder:
| Platform | Required file in the dataset folder | Unit |
|---|---|---|
| Xenium (10x Genomics) | experiment.xenium | cell |
| Visium HD (10x Genomics) | binned_outputs/square_*um/ | bin |
| Visium (10x Genomics) | spatial/scalefactors_json.json plus a tissue_positions file | spot |
| MERSCOPE (Vizgen) | cell_by_gene.csv or cell_metadata.csv | cell |
| CosMx (Nanostring) | a file ending in _tx_file.csv | cell |
| seqFISH (Spatial Genomics) | a file matching *_CellCoordinates*.csv | cell |
Folders without a matching sentinel file are silently skipped.
outs/ directory — the folder that directly contains
spatial/ — not its parent.
The interface adapts to whichever platform is loaded. Panels are relabelled to match the unit — a Visium dataset says Spot Segments, Spot Filter and Spot Info where a Xenium one says Cell, and Visium HD says Bin. Layers a platform cannot serve are hidden entirely: the two Visium platforms measure counts per spot or bin rather than per molecule, so the Transcripts layer does not appear for them.
Enriching Your Data
TissuePlex can display enriched data alongside the standard Xenium output: cell-cell communication edges from the NICHESv2 R pipeline, and custom cell metadata such as clustering labels or pseudotime scores. Both are optional; the core viewer works without them.
The NICHESv2 Edge Layer
TissuePlex can render cell-cell communication as a spatial graph overlaid on the tissue. Each line represents a pair of neighboring cells; lines are colored and filtered by ligand-receptor mechanisms (LRMs): the molecular signals passing from one cell to another.
This data comes from NICHESv2, a Raredon Lab R pipeline that scores every spatially neighboring cell pair for every ligand-receptor interaction in the dataset.
The output TissuePlex reads is a single file, edges.parquet,
placed in the dataset folder alongside experiment.xenium. When
present, the edge layers appear in the Layer Panel. When absent, those layers
are hidden and all other features work as normal.
Install R and RStudio
R is a programming language widely used in biology and statistics. RStudio is a graphical interface for writing and running R code.
Install R
Go to cran.r-project.org and download the latest version of R for your operating system.
Install RStudio
Go to posit.co/download/rstudio-desktop and download the free RStudio Desktop version. Install it after R.
Install required R packages
Open RStudio. In the Console panel, paste the following and press Enter:
install.packages(c("Seurat", "arrow", "dplyr", "devtools"))
Installation may take several minutes. Then install the NICHESv2 package; ask a lab member for the current installation command.
Run NICHESv2 and Export Edge Data
The workflow has three steps: load your Xenium data into R, run NICHESv2 to score cell-cell communication, and export the result for TissuePlex.
library(Seurat)
library(NICHESv2)
# 1. Load your Xenium data into R
xenium_obj <- LoadXenium("/path/to/your/xenium-dataset")
# 2. Run NICHESv2 (ask a lab member for recommended parameters)
niches_result <- RunNICHES(xenium_obj, ...)
# 3. Export for TissuePlex (writes edges.parquet to the dataset folder)
export_to_TissuePlex(
niches_result,
output_dir = "/path/to/your/xenium-dataset"
)
export_to_TissuePlex() writes edges.parquet
to your dataset folder. The resulting structure:
RunNICHES() depend on your dataset and the current version of
NICHESv2. Ask a lab member for guidance on your first run.
This step can take significant time for large datasets.
Verify the result
Restart TissuePlex. The Tissue Graph and
Directed Edges sections should appear in the Layer
Panel. If they do not, confirm that edges.parquet is directly
inside the dataset folder at the same level as
experiment.xenium.
Add Custom Cell Metadata
TissuePlex can color cells by any metadata you generate: clustering labels,
cell type annotations, pseudotime scores, or gene module scores. Place a CSV
in a subfolder named cell-metadata inside the dataset directory.
Every column is automatically available in the color-by dropdown.
A typical R workflow
library(Seurat)
# Load your Xenium data
xenium_obj <- LoadXenium("/path/to/your/xenium-dataset")
# --- Run your analysis here ---
# For example, cluster the cells:
xenium_obj <- NormalizeData(xenium_obj)
xenium_obj <- FindVariableFeatures(xenium_obj)
xenium_obj <- ScaleData(xenium_obj)
xenium_obj <- RunPCA(xenium_obj)
xenium_obj <- FindNeighbors(xenium_obj)
xenium_obj <- FindClusters(xenium_obj, resolution = 0.5)
# Extract the columns you want to export
metadata_to_export <- xenium_obj@meta.data[, c("seurat_clusters")]
# Add as many columns as you like; they all appear in TissuePlex.
# Create the cell-metadata folder if it does not already exist
dir.create(
file.path("/path/to/your/xenium-dataset", "cell-metadata"),
showWarnings = FALSE
)
# Save the file (cell barcodes become the row names automatically)
write.csv(
metadata_to_export,
file.path("/path/to/your/xenium-dataset", "cell-metadata", "my_clusters.csv")
)
LoadXenium() ensures
the barcodes in xenium_obj@meta.data are already correct. Ask
a lab member for guidance on clustering parameters appropriate for your
dataset.
Resulting folder structure:
After adding the file, restart TissuePlex. Metadata columns appear automatically under Cell Segments → Color by → Cell metadata.
cell-metadata/. TissuePlex merges them on the barcode key;
each file can contain different columns.
Using TissuePlex
This section covers every control in the TissuePlex interface.
Interface Overview
TissuePlex has four main areas:
- The Viewer. The large central area showing the tissue image and all data layers. Pan by clicking and dragging; zoom with the scroll wheel or pinch gesture.
- The Layer Panel. The right-hand panel for controlling layer visibility, color mappings, gene filters, and LRM selections.
- The Annotation Toolbar. A compact bar at the top of the viewer with tools for drawing regions, measuring distances, toggling split-screen mode, and saving images.
- Info Panels. Floating panels that appear when you click on a cell or edge, showing metadata and scores for that object.
Dataset & Image Picker
At the top of the Layer Panel are two dropdowns:
- Dataset: lists all datasets found in your
DATA_PATHfolder. - Image: lists the available OME-TIFF files in the dataset. Most Xenium datasets have one.
Switching datasets reloads all layers automatically. The first time each image is viewed, TissuePlex builds a tile pyramid (10–30 seconds); if the canvas looks blank, wait and refresh.
Morphology Image
The morphology image is the tissue photograph that forms the base of the viewer. In the Layer Panel, the Morphology row lets you toggle it on or off and adjust its opacity. Reducing opacity can help other data layers stand out more clearly on a dark background.
The image is streamed as a tile pyramid, so it renders sharply at every zoom level without loading the entire file into memory at once.
Cell Segments
The Cell Segments section controls how individual cells are drawn. Each detected cell is shown as a polygon matching its actual measured boundary.
Visibility and Opacity
Separate opacity sliders control the cell fill (solid interior) and outline (border line):
- Use the checkbox next to Cell Segments to show or hide boundaries entirely.
- The fill slider adjusts interior opacity.
- The outline slider adjusts the border line weight.
The sample slider controls what fraction of cell boundaries are loaded. At low zoom it adjusts automatically; raise it when zoomed in to load more cells.
Color By
The Color by dropdown colors each cell by a data value.
Off (default)
Cells shown in a neutral color. Use this to view cell positions without a data overlay.
Gene Set
Colors each cell by the combined expression of a selected set of genes. High-expressing cells appear at the hot end of the color scale; low-expressing cells at the cold end.
- The gene set is defined by the selection in the Transcripts gene filter.
- Choose a color palette: viridis (yellow→purple), plasma (yellow→magenta), magma (yellow→black), or inferno. Viridis is recommended for colorblind accessibility.
- A color legend shows the data range. Use the clamp sliders to restrict the color range to a specific window, useful when outliers at the high end compress the variation across the rest of the dataset.
Cell Metadata
Colors each cell by any metadata column, including supplemental columns
added to the cell-metadata/ folder.
- Use the field dropdown to select the column.
- Continuous columns (pseudotime, module scores, etc.) use a gradient palette with clamp controls.
- Categorical columns (cluster labels, cell type names, etc.) are assigned distinct colors automatically, one per category, with a legend of editable color swatches.
Treat as Categorical
When you pick a numeric column, a treat as categorical checkbox appears beneath the dropdown. This is the control you want for integer-coded categories.
Cluster IDs are the usual case: fwrite on a Seurat
@meta.data writes seurat_clusters as plain integers,
so nothing in the file distinguishes "cluster 7" from a measurement. TissuePlex
guesses — an integer column with 30 or fewer distinct values is treated as
categorical — and the checkbox overrides that guess in either direction:
- Checked — one distinct, editable color per value, with the legend in numeric order, so cluster 10 comes after cluster 2 rather than between 1 and 2.
- Unchecked — a continuous gradient with clamp sliders. Useful for a coded column with few levels that you would rather read as a scale.
- An auto button returns the column to automatic detection.
The choice is remembered per column for the session. It applies to edge metadata too, in the Edge Data section.
Filtering by Metadata
The Cell Filter section restricts the whole view to a subset of your data — one sample, a few cell types, a range of values. Everything outside the subset is simply not drawn.
How to use it
- Pick a column from the dropdown. Any cell metadata column works, including supplemental ones.
- Categorical columns give you a checkbox per value. Tick the ones you want; all and none buttons are provided. With nothing ticked, everything is shown — an empty selection means "no restriction", not "hide everything".
- Continuous columns give you min and max boxes, both optional and both inclusive. The placeholder text shows the column's actual range.
- clear filter removes the restriction.
What the filter affects
- Cell segments — only matching cells are drawn, and only they can be clicked or captured by a region selection.
- Edges and the tissue graph — an edge is drawn only when both of its endpoints match. The point of narrowing to two or three cell types is the signalling within that subset, and an edge with one endpoint outside would run off to a cell that is not on screen.
- Transcripts are not filtered. Several platforms ship no transcript-to-cell assignment at all, so there is nothing to match on.
Filtering edges
The Edge Filter inside Edge
Data works the same way but on columns of the edge table itself, including
annotations from an edge-metadata/ folder — a curation call, a
confidence score, a review flag. It composes with the cell filter: set both and
you see only the annotated edges among your chosen cells.
This is distinct from the LRM Mechanisms checklist below it. The checklist chooses which mechanisms are scored on every edge; the edge filter chooses which cell pairs are drawn at all.
Transcripts
The Transcripts layer renders individual detected RNA molecules as colored dots, each colored by gene identity.
Gene Filter
By default, transcripts from all detected genes are shown, each in its own color. To restrict the display to specific genes:
- The current status reads either all N genes or M / N genes selected.
- Click select ▼ (or edit ▼ if a filter is active) to open the gene picker.
- Search by gene name and check or uncheck any gene.
- Click all to remove the filter, or none to start a fresh selection.
- Selected genes have an ✕ button for individual removal.
- Click clear to reset to all genes.
Gene-color assignments can be imported and exported as CSV using the corresponding buttons, useful for reproducing a color scheme across sessions.
Connectivity Layers
These layers require edges.parquet in the dataset folder (see
Step 8). They visualize cell-cell communication as a spatial graph overlaid
on the tissue.
Edge Density
The density slider controls what fraction of available edges are rendered. The default is 10%.
- At low density (1–10%): a sparse graph useful for viewing overall connectivity patterns.
- At high density (50–100%): many more edges, revealing densely connected hubs. Rendering may slow for large datasets.
Tissue Graph
The Tissue Graph is a structural background layer showing which cells are spatial neighbors, independent of any LRM information. Each line indicates spatial adjacency between two cells. Use the checkbox to toggle it and the opacity slider to adjust its visual weight.
Directed Edges
The Directed Edges layer is the quantitative counterpart to the Tissue Graph. Each arrow represents a directed signal from a sending cell to a receiving cell, with appearance determined by the active ligand-receptor mechanisms (LRMs).
When two cells communicate in both directions (A → B and B → A), both arrows are offset from each other, keeping bidirectional signals visually distinct.
Style Controls
Directional
The Directional checkbox renders A → B and B → A as two offset parallel lines. On by default.
Arrowheads
The Arrowheads checkbox adds directional tips at the receiving end of each edge (available only when Directional is on). Two additional controls appear when arrowheads are active:
- arrow scale: adjusts arrowhead size.
- Full / Harpoon: solid triangle or single-sided chevron. Harpoon style mimics the chemistry ⇌ notation and is often cleaner for dense graphs.
Autocrine
The Autocrine checkbox draws autocrine signalling — a cell signalling to itself — as a ring around that cell. NICHESv2 emits one autocrine edge per cell, so on real output expect a ring on every cell that has any self-signal.
Autocrine rings behave exactly like directed edges in every other respect:
- They are colored by the same control and the same scale. Set edge color to LRM Set and the rings are shaded by signal strength alongside the lines; set it to a metadata column and they take that column's colors. One legend describes everything on screen.
- They obey the LRM Mechanisms checklist. Narrow to one mechanism and only the cells with autocrine signal through that mechanism keep their ring.
- They obey the cell and edge metadata filters, and the density slider.
- Clicking a ring opens the same edge detail panel, listing the mechanisms scored for that self-edge.
Two sliders appear when the checkbox is on:
- ring r: ring radius, in image pixels. Increase it on large tissues where the default is small relative to the field of view.
- ring w: ring line width.
Width and Offset
- width: thickness of all edge lines.
- offset (visible when Directional is on): perpendicular separation between the A → B and B → A lines.
Minimum Strength Filter
The min strength slider hides edges below a total interaction score threshold. Raising it restricts the view to stronger interactions and reduces visual clutter.
Edge Color
The edge color dropdown has three modes:
- Default (uniform): all edges in a single neutral color.
- LRM Set (selected mechanisms): edges colored by total communication score across active LRMs. The color scale adapts to the current viewport. A palette picker and clamp controls appear below.
- Metadata column: color edges by a metadata field such as sending or receiving cell type. Continuous fields use a gradient palette; categorical fields use distinct colors with a legend.
LRM Mechanisms Checklist
The LRM Mechanisms list shows every ligand-receptor
mechanism in your edges.parquet data. Toggle individual mechanisms
on or off to focus the visualization.
- A counter shows how many are active (e.g. 488 / 488 active).
- The all and none buttons select or deselect everything.
- Use the search box to filter by gene name (e.g. type "Tgfb" to find all TGF-β mechanisms).
- Hiding an LRM reduces each edge's visible score by that mechanism's contribution; edges whose score reaches zero are hidden.
Clicking to Explore
Clicking on cells or edges opens floating info panels with detailed information.
Clicking on a Cell
Click inside a cell to open the Cell Info Panel, which shows the barcode ID, all metadata values for that cell, and the current color-by value highlighted. Click on empty canvas to dismiss.
Clicking on an Edge or Tissue Graph Line
Click on any line in the Tissue Graph or Directed Edges layer to open the Edge Info Panel, showing the sending and receiving cell barcodes and the top-scoring LRMs for that edge.
Split-Screen Mode
Split-screen mode divides the viewer into two independent side-by-side panels, each with its own pan and zoom position. Use it to compare two tissue regions or to view the same region with different filter settings.
- Click ⊞ Split in the annotation toolbar to enter split-screen mode.
- Click □ Single to return to a single panel.
- Both panels share all layer settings (visibility, color-by, LRM filter, etc.) but have independent pan and zoom positions.
Matching Zoom Between Panels
The ⇔ Match button sets the other panel to your current panel's zoom level while each panel remains centered on its own region.
Annotation Tools
The annotation toolbar offers three interaction modes:
- Pan: the default mode. Click and drag to pan.
- ⬡ Region: draw a polygon on the tissue. Click to place vertices; double-click to close. Regions are colored and labeled, and remain visible on top of all data layers.
- ⟷ Measure: click two points to measure the distance between them in micrometers.
The Clear button removes all regions and measurements at once.
Exporting Cells Within a Region
Each drawn region appears in the Layer Panel's Regions list. The export button saves a CSV of the barcodes of all enclosed cells, for downstream analysis in R.
Saving Images
TissuePlex has a built-in image export that composites the morphology image and all visible data layers into a single PNG file.
Click Save PNG in the annotation toolbar. The file
is saved to your Downloads folder as tissueplex_[timestamp].png
(or tissueplex_panel1_[timestamp].png in split-screen mode).
Tips for high-quality output
- Zoom in before saving: the export captures the viewer at its current resolution, so a more zoomed-in view contains finer detail.
- Maximize the browser window to increase canvas size.
- Draw annotation regions or measurements before exporting to mark up the area of interest for a figure.
- Reduce opacity on background layers to make the featured layer stand out.
- For higher-resolution output, use Chrome's built-in screenshot: open
DevTools (
⌘ Option Ion Mac,F12on Windows), press⌘ Shift P(Mac) orCtrl Shift P(Windows), type "screenshot", and select Capture screenshot.
Troubleshooting
| Problem | What to do |
|---|---|
| Blank or grey canvas after the dataset loads | TissuePlex is still processing the morphology image. Wait 15–30 seconds and refresh the page. |
| Black screen after updating (especially on Windows) | Docker reused a stale build cache. Force a clean rebuild:docker compose build --no-cache && docker compose up |
| My dataset doesn't appear in the dropdown | Check that DATA_PATH points to the parent folder and that
the dataset folder contains the platform sentinel file (e.g.
experiment.xenium). |
| Tissue Graph and Directed Edges don't appear in the panel | edges.parquet is missing or in the wrong place. It must be
directly inside the dataset folder, alongside
experiment.xenium. |
| My metadata columns don't appear in the Color-by dropdown | Check that the CSV is in a folder named exactly
cell-metadata inside the dataset folder, with barcodes as
the first column. R's default write.csv() writes barcodes
there automatically. |
| Transcripts are not showing | Transcripts only appear when zoomed in close enough to see individual cells. Try zooming in more. Also confirm the Transcripts toggle is on in the Layer Panel. |
| TissuePlex is running slowly or edges lag | Reduce the density slider to 5% or lower. Also check that Docker Desktop has at least 8 GB of memory allocated (Settings → Resources). |
| Error: port 3000 is already in use | Another application is using that port. Stop the other application, or
edit docker-compose.yml and change the host port (e.g.
3001:80), then restart. |
| Something else is wrong | Ask a lab member, or open an issue at github.com/RaredonLab/TissuePlex/issues. |