Xenium End-to-End Pipeline¶
Overview¶
This tutorial walks through end‑to‑end processing of 10x Xenium data with CartLoader: converting inputs, running FICTURE, importing cell results and histology, packaging assets, and uploading to AWS for sharing.
Input Data¶
Data Structure and Format
See details of the Xenium Ranger output at Xenium Ranger Official Documents
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | |
Naming Convention: transcripts.csv.gz or transcripts.parquet
1 2 3 4 | |
- "
transcript_id": Unique identifier for each detected transcript molecule. - "
cell_id": ID of the segmented cell associated with the transcript. - "
overlaps_nucleus": 1 if the transcript overlaps the nucleus mask, 0 otherwise. - "
feature_name": Feature name corresponding to the transcript (typically a gene). - "
x_location": X coordinate of the transcript. - "
y_location": Y coordinate of the transcript. - "
z_location": Z coordinate (depth) of the transcript. - "
qv": Quality value indicating confidence in transcript detection.
Cells
Naming Convention: cells.csv.gz
1 2 3 | |
Cell Boundaries
Naming Convention: cell_boundaries.csv.gz
1 2 3 | |
Clusters
Naming Convention: clusters.csv
1 2 3 | |
Differentially Expressed Genes
Naming Convention: differential_expression.csv
1 2 3 | |
Xenium output comes with tissue morphology images in OME‑TIFF, either nuclei‑only (DAPI) or multimodal (DAPI with cell boundary and interior stains). Each file uses a tiled, pyramidal layout (JPEG‑2000, 16‑bit grayscale) with levels from full resolution down to 256×256 for efficient interactive viewing.
morphology.ome.tif: A 3D Z-stack of the DAPI image.morphology_focus_0000.ome.tif: DAPI imagemorphology_focus_0001.ome.tif: Boundary (ATP1A1/E‑Cadherin/CD45)morphology_focus_0002.ome.tif: Interior — RNA (18S)morphology_focus_0003.ome.tif: Interior — protein (alphaSMA/Vimentin)morphology_mip.ome.tif: DAPI maximum intensity projection (MIP) of the Z‑stack.
Data Access
Downloaded the ST data from 10x Genomics Dataset portal.
Set Up the Environment¶
Pre-installed tools
Please ensure you have installed all required tools (See Installation).
Define paths to all required binaries and resources. Optionally, specify a fixed color map for consistent rendering.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | |
Define data ID and analysis parameters:
1 2 3 4 5 6 7 8 9 10 | |
How to Define Scaling Factors for Xenium?
The Xenium example data currently used here provides SGE in µm. Define scaling factor from coordinate to micrometer as 1.
Run Pipelines¶
Below is an example of showing running all modules together. You can customize the actions by flags.
In the following example, we only deployed OME_DAPI image. Alternatively, CartLoader supports a --all-images to deploy all detected image.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | |
Action Flags to Enable Modules
Actions
run_xenium runs multiple CartLoader modules together; enable and combine actions with flags.
CartLoader Modules |
Flags in run_xenium |
Actions | Prerequisites |
|---|---|---|---|
load_xenium_ranger |
--load-xenium-ranger |
Summarize Xenium Ranger outputs into JSON | Xenium Output files |
sge_convert |
--sge-convert |
Convert SGE to CartLoader format; optional density filter and visuals |
Xenium assets JSON (from load_xenium_ranger) or transcript CSV/Parquet |
run_ficture2 |
--run-ficture2 |
FICTURE analysis | SGE (from sge_convert); FICTURE parameters (--width, --n-factor) |
import_xenium_cell |
--import-cells |
Import cell points, boundaries, cluster, de; | Xenium assets JSON or manual CSVs; also --cell-id |
import_image |
--import-images |
Import background images (OME‑TIFF) → PNG/PMTiles; | Xenium assets JSON or --ome-tifs; also --image-ids or --all-images |
run_cartload2 |
--run-cartload2 |
Package SGE, optional FICTURE/cells/images into PMTiles; write catalog.yaml |
SGE, optional FICTURE assets or any imported cell/image assets; --id |
upload_aws |
--upload-aws |
Upload catalog and PMTiles to S3 | catalog.yaml (from run_cartload2); --s3-bucket, --id |
upload_zenodo |
--upload-zenodo |
Upload catalog and PMTiles to Zenodo | catalog.yaml (from run_cartload2); --zenodo-token |
Parameter Requirements by Action Flag
Below are explanations of the parameters used in the example. For the full list, see the run_xenium reference page.
| Parameter | Required when flags | Description |
|---|---|---|
--xenium-ranger-dir |
--load-xenium-ranger |
Xenium Ranger output directory to scan. |
--xenium-ranger-assets |
optional --load-xenium-ranger |
Output JSON manifest path (defaults under --out-dir). |
--width |
--run-ficture2 |
Hexagon width(s) in µm for training/projection. |
--n-factor |
--run-ficture2 |
Factor count(s) for FICTURE training. |
--cell-id |
--import-cells |
Asset ID/prefix for cell outputs. |
--image-ids or --all-images |
--import-images |
Choose specific image IDs or import all detected. |
--id |
--run-cartload2 |
Catalog ID (used in catalog.yaml and outputs). |
--s3-dir |
--upload-aws |
Destination S3 path (e.g., s3://bucket/prefix). |
--out-dir |
any action | Output root directory for generated artifacts. |
--dry-run, --restart |
optional (any) | Control execution (preview or rerun ignoring existing outputs). |
--n-jobs, --threads |
optional (any) | Parallelism for Make/GDAL/tippecanoe steps. |
Outputs¶
-

View/Explore¶
The output are available in both CartoScope.
See more details of output at the Reference pages for run_ficture2 and run_cartload2.