Oct 03, 2025

Public workspaceCosMx Spatial Transcriptomics Protocol

  • Asmita Kishor Lagwankar1,
  • Amanda Knoten2,
  • Stephanie Reinert2,
  • Sanjay Jain3
  • 1Washington University in st Louis;
  • 2Washington University School of Medicine;
  • 3Washington University, Saint Louis
  • Human BioMolecular Atlas Program (HuBMAP) Method Development Community
  • Jain Lab
Icon indicating open access to content
QR code linking to this content
Protocol CitationAsmita Kishor Lagwankar, Amanda Knoten, Stephanie Reinert, Sanjay Jain 2025. CosMx Spatial Transcriptomics Protocol. protocols.io https://dx.doi.org/10.17504/protocols.io.x54v95w7pl3e/v1
Manuscript citation:
HuBMAP U54DK134301
License: This is an open access protocol distributed under the terms of the Creative Commons Attribution License,  which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited
Protocol status: Working
We use this protocol and it's working
Created: September 23, 2025
Last Modified: October 03, 2025
Protocol Integer ID: 228894
Keywords: CosMx Spatial Transcriptomics, Tissue preparation, Slide preparation, AtomX, CosMx Data Quality, Analytical pipelines, Post CosMx H&E staining, cosmx spatial transcriptomics protocol, performing spatial transcriptomic, spatial transcriptomic, post cosmx assay, cosmx technology, using bruker nanostring, bruker nanostring, field microscopy, post imaging, situ imaging, selecting tissue
Funders Acknowledgements:
NIDDK
Grant ID: U54DK134301
Abstract
This is a protocol for performing spatial transcriptomics (ST) using Bruker Nanostring’s CosMx technology. Here we are using their 1K panel where we have substituted 50 custom genes to target cell types in the healthy and disease kidneys and discover their spatial relationships. The protocol has many steps involving selecting tissue, tissue sectioning and mounting on slides, processing to prepare for hybridization with custom panel and in situ imaging. Post imaging, there are several types of analyses that can be performed and these will depend on the biological questions. Note that the ST methods and analytical tools are still evolving and there are several choices. Based on our roles in the HuBMAP and KPMP consortia, we have focused on key QC parameters to evaluate assay performance. Each of the steps from sectioning to data generation have quality assurance and control steps. Post CosMx assay, slides are stained with hematoxylin and eosin for bright-field microscopy and flanking tissue sections are typically also used for light microscopy evaluation or other technologies.
Materials
Reagents:

Prepare Assay Reagents (maintain nuclease-free conditions)

o 1X PBS – 1 L

AB
PBS100 mL
DEPC water900 mL

o 2X SSC – 1 L
AB
20X SSC100 mL
DEPC water900 mL
o 4X SSC – 500 mL
AB
20X SSC100 mL
DEPC water400 mL
o NBF Stop Buffer
AB
Tris Base6.06 g
Glycine3.75 g
DEPC water500 mL
o DEPC water - 1 L | Best to make at least 3 L each time

  • 1 L Milli-Q water
  • 1 mL DEPC
  • Let sit at room temp (swirling occasionally) or on stir plate overnight
  • Autoclave
• Aliquoting NHS-Acetate powder
o Note weight on side of tube
o 2 slide prep – weigh in 15 g aliquots
o 4 slide prep – weigh in 25 g aliquots
• Aliquoting 100% Formamide
o Bring to room temperature before opening (~30min)
o Prepare 40 mL aliquots
o Store at 4C, protected from light

Troubleshooting
Panel design
Prior to starting the assay make sure you have all the reagents for CosMx, here CosMx 1K RNA kit is used. This kit comes in 950+50 genes configuration where 50 genes can be swapped with custom genes of interest.

  • For the human kidney, select these based on cell types not covered in the commercial panel in the human kidney atlas (Lake et al, nature 2023), literature, and validating them against various spatial transcriptomic technologies.
  • Once this list is finalized, follow CosMx guidelines to validate compatibility of probe designs and target genes using vendor recommendations.
Tissue preparation - Tissue selection

Note
Essentially, follow the detailed protocol suggested by Nanostring including tissue mounting on CosMx slides, which can be accessed here.

Perform the assay on FFPE sections (5 microns). To ensure proper preservation of tissue ensure warm ischemia time is <4h and preserve the tissue in fixative as soon as possible (preferably within less than an hour from retrieval. For KPMP consortia, this is not a concern as most biopsies are preserved in less than 15 min.
Although the assay can work on a few mm width of tissue, ideally the tissue should be 20 mm X 15 mm in dimension to ensure it will fit in the designated area on CosMx slide (QC). However, to economize, mount several sections in the region specified as long as they are not overlapping. It is worthwhile to spend some time looking at the available tissue blocks and planning how they will be sectioned and placed on the slide.
Tissue preparation - Tissue Sectioning
10h 25m 15s
Cut the samples at 5 µM and center the sections in the green scan area. Bake the slides DurationOvernight at Temperature37 °C and store them at Temperature4 °C until you use them. [Use within 2 weeks for best results].



Slide prep follows the guidelines given by Nanostring : CosMx SMI Manual Slide Preparation for RNA Assays.
Overnight
Temperature
Day 1: Slide Preparation (Overnight)

Bake the slides DurationOvernight at Temperature60 °C . Alternatively, if time is limited, bake the slides for at least Duration02:00:00 at Temperature60 °C before proceeding with deparaffinization.
2h
Overnight
Temperature
Day 2: Slide Preparation

Hybridization Tray Preparation 

Prepare the hybridization tray by lining it with Kimwipes and dampening them with DEPC water. Preheat the tray to Temperature40 °C .
Temperature
Preparation of 1X Target Retrieval Buffer

Prepare fresh by mixing Amount5 mL of 10X Target Retrieval Buffer with Amount45 mL of DEPC water.

Pipetting
Mix
Pressure Cooker/Steamer Setup

Place Coplin jars in a rice cooker and bring to a boil. Preheat both the 1X Target Retrieval Solution and DEPC water.
Paraffin Removal (~20 min)
19m
Wash slides with Xylene for Duration00:05:00 .
Wash
Repeat the Xylene wash for another Duration00:05:00 .
Wash
Wash slides with 100% Ethanol for Duration00:02:00 .
Wash
Repeat the 100% Ethanol wash for another Duration00:02:00 .
Wash
Dry slides for Duration00:05:00 at Temperature60 °C in a metal staining rack.
Temperature
Target Retrieval (~50 min)
48m 15s
Incubate slides at Temperature100 °C for Duration00:15:00 .
Incubation
Temperature
Rinse in DEPC water by dipping slides for Duration00:00:15 .
Wash in 100% Ethanol for Duration00:03:00 .
Wash
Wipe the bench with RNase AWAY.
Dry slides horizontally on a Kimwipe at TemperatureRoom temperature for Duration00:30:00 to Duration01:00:00 .
Temperature
Digestion Buffer Preparation (Fresh, Store TemperatureOn ice )
Temperature
Step 1: Mix Amount2 µL of Proteinase K with Amount198 µL of 1X PBS.
Pipetting
Step 2: Add Amount30 µL of Step 1 solution to 1970 μL of 1X PBS in a 5 mL tube. (Do not vortex; mix by inverting the tube.)
Pipetting
Protease Digestion (~40 min)
30m
Apply the incubation frame to the slide, ensuring the outer area is dry by swiping with a Kimwipe. Remove the thin polyester sheet from the frame (center square remains open). Do not peel off the adhesive from the top of the incubation frame. Center the tissue within the frame and lightly press along the borders to ensure adherence. Trim any excess frame hanging off the edge of the slide using a straight razor.
Apply warm digestion buffer by hand for about 3 minutes to bring it to TemperatureRoom temperature . Place slides on the preheated hybridization tray and add Amount400 µL of digestion buffer to ensure full tissue coverage.
Pipetting
Temperature
Incubate slides at Temperature40 °C for Duration00:30:00 . Ten minutes before incubation ends, remove fiducials (protect from light) and 2X SSC-T from Temperature4 °C and bring to TemperatureRoom temperature .
Incubation
Temperature
DEPC Water Rinse Tap slides to remove excess digestion buffer. Dip slides 3-5 times in DEPC water. Limit time here to minimize the risk of target loss. Lower the oven temperature to Temperature37 °C .
Temperature
Fiducial Preparation and Application (~20 min) (Light-Sensitive Step)
9m
Incubation
Pipetting
Temperature
Prepare fiducials by vortexing for Duration00:01:00 , sonicating for Duration00:02:00 , and repeating the process three times.
Prepare fiducial solution by diluting Amount6 µL fiducial stock in Amount1194 µL of 2X SSC-T (1:200 dilution).
Pipetting
Remove excess DEPC water from the slide by tapping it on a Kimwipe.
Lay slides in the tray and vortex the fiducial tube immediately before applying.
Apply Amount250 µL fiducial solution, ensuring full coverage of the glass and tissue within the frame for proper imaging.
Pipetting
Incubate for Duration00:05:00 at TemperatureRoom temperature .
Incubation
Temperature
Tap slides on a Kimwipe to remove excess solution.
Rinse with 1X PBS for Duration00:01:00 .
Post-Fixation (~20 min)
16m
Incubate slides in 10% NBF for Duration00:01:00 at TemperatureRoom temperature .
Incubation
Temperature
Wash with NBF stop buffer for Duration00:05:00 .
Wash
Repeat the NBF stop buffer wash for another Duration00:05:00 .
Wash
Wash with 1X PBS for Duration00:05:00 .
Wash
Slides can remain in this buffer while NHS-Acetate is prepared.
NHS-Acetate Blocking (~25 min)

  • Reconstitute NHS-Acetate immediately before use by adding NHS-Acetate Buffer directly to a pre-aliquoted tube of NHS-Acetate.
  • Mix:
  1. Amount25 mg NHS-Acetate powder.
  2. Amount962.5 µL NHS-Acetate buffer.
  • Gently pipette up and down to mix (avoid bubbles).
20m
Pipetting
Blocking

  • Apply NHS-Acetate mix (200-250 μL per slide), ensuring full tissue coverage.
  • Incubate in a covered tray for Duration00:15:00 at TemperatureRoom temperature .
  • Tap off excess solution.
  • Wash twice with 2X SSC for Duration00:05:00 each.
Incubation
Wash
Temperature
Hybridization (Overnight)

Note
Ensure hybridization starts within 16-18 hours of the next day's planned start time.

  • If timing is off, store slides in 2X SSC wash for Duration01:00:00 at TemperatureRoom temperature or up to Duration06:00:00 at Temperature4 °C . Ensure Buffer R is at TemperatureRoom temperature before opening.
  • Prepare a 1:10 dilution of the probe (~15μL/slide) and mix by pipetting 3-5 times (Do not vortex).
  • Preheat the thermal cycler and lid to Temperature95 °C . Remove the incubation frame cover and clean it with ethanol. Lay it on a Kimwipe until ready for use.
  • Flick probes and use a mini centrifuge before applying.
6h 3m
Pipetting
Overnight
Temperature
Denature RNA Probe Mixes:

  • Tube 1: Amount32 µL Core Probe Mix.
  • Tube 2: Amount28 µL Add-on Probe Mix.
  • Heat at Temperature95 °C for Duration00:02:00 , then immediately cool TemperatureOn ice for Duration00:01:00 .
Pipetting
Temperature
Prepare Hybridization Solution:

AB
Denatured Core Mix32 μL
Add-on Probe Mix28 μL
RNase Inhibitor3.2 μL
Buffer R256 μL
DEPC Water0.8 μL
Total Volume: 320 μL

  • Clean the bench with RNase AWAY and allow it to dry.
  • Arrange fresh Kimwipes in the hybridization tray and dampen with DEPC water.
  • Change gloves and work on one slide at a time to prevent tissue from drying.
  • Remove frame backing to expose the adhesive layer.
  • Lay the slide flat and add ~Amount140 µL hybridization solution directly to the tissue (avoid bubbles).
  • Apply the frame cover (tab should face slide label), ensuring it adheres naturally to the frame.
  • Place the slide in the incubation tray and incubate at Temperature37 °C DurationOvernight .
  • Clean the workspace with RNase AWAY and set the water bath to Temperature37 °C .
Pipetting
Overnight
Temperature
Tissue preparation - Process Slides on CosMx SMI
Follow this step according to the guidelines presented by Nanostring: CosMx SMI Instrument User Manual (software v1.5).

  • Complete assay and assemble the flow cells. Load assembled flow cells into the CosMx SMI instrument and enter flow cell/study information. Scan the tissue to capture RNA or Protein readout and morphology imaging within user-designated fields of view (FOVs).
Tissue preparation - Interactive Data Analysis using AtomX
This step is followed according to the guidelines presented by Nanostring: CosMx SMI Data Analysis User Manual.

Flow Cell Creation and Data Upload

A flow cell record is created in AtoMx SIP and awaits data upload from the CosMx SMI instrument. Once initiated, the data upload and ingestion process begins.
Image Processing

Image stitching starts for different display layers, including the preview scan, morphology image, and protein images (if applicable).
Target Decoding

The system processes target decoding.
Study Creation Readiness

Once all prior steps are complete, mark the flow cell as Ready for Study Creation and analyze.
Resegmentation (if required)

Segmentation of the flow cell begins. The flow cell cannot be used for analysis until segmentation is complete. If segmentation encounters an error, the flow cell remains ready for analysis with previous segmentation results. Retrying segmentation may resolve the issue.
Study Creation in AtoMx SIP

Studies can only be created from data that has completed upload and is not undergoing resegmentation. In the AtoMx SIP gallery, locate the flow cell with the Ready for Study Creation status. Click the checkbox on the corresponding flow cell card. Click the Create Study button in the top-right corner to open the study creation window. Enter the Study Name, Description, and relevant Tags to annotate the study. Click Create to finalize the study setup.
Viewing the Study

Click the menu icon in the top-left to open the Image Viewer Menu.
The menu provides access to the following tabs:
  • Flow Cell Information: Displays metadata related to the flow cell.
  • FOVs (Field of Views): Provides options to hide outlines or labels.
  • Image Layers: Allows toggling different image layers on or off.
  • Render Settings: Adjusts intensity color scaling and on-screen color mapping.
  • Export Images: Offers options to export either the full image or the current screen view. Users can customize appearance, format, and quality.
Running a Pipeline on the Study

  • The Pipeline Run Panel displays the status of a pipeline which can have multiple modules.
  • Can monitor execution progress, download logs, and rerun steps if needed.
  • The Pipeline Structure Panel presents a visual workflow of the analysis, showing completed, pending, and failed steps.
  • Can run both basic and custom pipelines to process data into the correct format with preliminary QC checks.
Exporting Images and Data

Download the exported images directly to the user's device. A notification with the download link appears in the AtoMx SIP Notifications Panel.
Tissue preparation - CosMx Data Quality
There are several levels of checking the quality of the CosMx in situ experiment. Some of these features should be directly visualized on AtomX:
1. Study Statistics

The pipeline generates key study statistics at both FOV (Field of View) and flow cell levels:
  • Mean transcript per cell: Average of all transcript-per-cell values for an FOV or flow cell.
  • 10th percentile transcript per cell: The 10th percentile of transcript-per-cell values for an FOV or flow cell.
  • 90th percentile transcript per cell: The 90th percentile of transcript-per-cell values for an FOV or flow cell.
  • Mean negative probe counts per cell: Sum of negative probe counts divided by the total number of cells in an FOV, then averaged across the flow cell.
2. Quality Control Flags

The pipeline flags unreliable negative probes, cells, FOVs, and target genes for review but does not remove them from downstream analysis.
Negative Probe QC

  • Identifies negative control probes behaving as outliers using Grubb's test.
Cell QC

Flags cells with low or spurious signal based on multiple metrics:

o Minimal counts per cell: Default values:
  • 50 or 100 for 6K panel
  • 20 for 1000-plex panel
  • 5 for 100-plex panel
  • Must be greater than 1; increasing the threshold makes QC more conservative.
o Proportion of negative counts (default: 0.1, range 0-1): Flags cells where >10% of counts are negative probes.
o Count distribution (default: 1, range 1-200): Flags cells where (total counts) / (number of detected genes) ≤1.
o Area outlier (default: 0.01, range 0-1): Uses Grubb's test to flag outlier cells based on area size.
FOV QC

Identifies FOVs with generally low expression using two approaches:

o Mean method (default): Flags FOVs where total count per cell is below a set threshold.
  • FOV count cutoff (default: 100; range: ≥0).
o Quantile method: Flags FOVs where high signal (e.g., 90th percentile gene count) is below background.
  • FOV QC quantile (default: 0.9, range 0-1).
  • FOV quantile to negative cutoff (default: 0, must be ≥0).
Target-Level QC

Flags genes with expression levels potentially below background.

o Negative control probe quantile cutoff (default: 0.5, range 0-1): Flags probes with lower counts than the median of negative control probes.
o Detection p-value (default: 0.01, range 0-1): Determines whether a target gene is above background.
  • Lower p-value = More stringent filtering.
  • Higher p-value = More relaxed filtering.
Tissue preparation - Analytical pipelines
Perform the additional QC for rigor and reproducibility using custom analytical pipelines.

We use a combination of SquidPy(1.9.5) (PallaG. Et al Nature Methods 2022 Paper), TACCO (1.0.0) (TACCO)( Mages S et al Nature 2022 Paper) and scvi-tools (1.3.0) (Can Ergen et al Paper) for pre and post QC analysis, integration, batch correction and clustering. Use a variety of other tools for neighborhood analysis including SquidPy, Banksy (banksy-py 0.07) (Singhal V. et al Nature Genetics 2023 Paper). For cell annotation, use KPMP-HuBMAP kidney atlas at different levels of annotation. We usually avoid using the degenerative tubular states for initial annotations as they show mismapping due to reduced expression of mature markers and common injury markers. Check these individually after subsetting the main clusters.
Pre-processing

o Starts with Instrument Output, converts into Initial Data and then Flat Files.
o Use the tools like Squidpy to ensure data quality.

Quality Control

  • Filters cells and genes to create a Final QC Object. Remove cells with Genes < 20 count.  Remove genes not expressed in any cell.     
Dimensionality Reduction and Integration
o Perform the Natural log Normalization, PCA, neighbors, highly variable genes and UMAP clustering using Squidpy .
o Use reSOLVI (scvi-tools (1.3.0) for integration or batch correction if the goal is to perform global analysis.
o Annotation is supported by organ-specific atlases (e.g., TACCO). This can be done at level 1 with main cell types or deeper levels 2 and 3 for more granular subtypes.  
Knowledge-Based Downstream Analysis (can be done at specific region of a sample, whole sample of an individual sample or a group of samples)

o   Focuses on: 
  • Spatial Clustering to identify niches.
  • Neighborhood Analysis to assess cell interactions. Neighborhood analysis in spatially resolved ST will depend on parameters chosen such as distance and this may depend on biological goals of how expansive microenvironment is desired. When more granular cell type levels are chosen, due to overlap in closely related cells, one may see cell neighbors that may not be physically plausible based on their regional location in the tissue. These should be easy to point to detect in the output and considered. 
  • Discovery of Spatially Variable Genes.
o   Tools like Squidpy and BANKSY support this step. 
Tissue preparation - Post CosMx H&E staining
6m 40s
Follow CosMx instructions to remove the cassette and reagents and perform routine H&E staining.   

  • Remove Cassette by submerging in Xyline and then rehydrating to begin H&E staining protocol in the next step.
H&E Staining

  • Milli-Q water – Duration00:02:00
  • Hematoxylin – Duration00:03:30
  • Rinse until clear with running water.
  • 0.5% HCl/70% EtOH (differentiation step) – 10-15 dips
  • Rinse with running water.
  • 1% Ammonia water (bluing step) – 10-15 dips
  • Rinse with running water.
  • 70% Ethanol – 20 dips
  • Eosin (Add ~Amount2 mL acetic acid to new eosin after it has been changed) – Duration00:00:10 .
  • 95% Ethanol – 20 dips
  • 95% Ethanol – 20 dips
  • 100% Ethanol – Duration00:00:30
  • 100% Ethanol – Duration00:00:30
  • Xylene – 20 dips
  • Xylene – 20 dips
  • Xylene – store while cover slipping.
6m 40s
Pipetting
Wash
Coverslip.