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.
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 Overnight at 37 °C and store them at 4 °C until you use them. [Use within 2 weeks for best results].
Bake the slides Overnight at 60 °C. Alternatively, if time is limited, bake the slides for at least 02:00:00 at 60 °C before proceeding with deparaffinization.
2h
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 40 °C.
Preparation of 1X Target Retrieval Buffer
Prepare fresh by mixing 5 mL of 10X Target Retrieval Buffer with 45 mL of DEPC water.
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 00:05:00.
Repeat the Xylene wash for another 00:05:00.
Wash slides with 100% Ethanol for 00:02:00.
Repeat the 100% Ethanol wash for another 00:02:00.
Dry slides for 00:05:00 at 60 °C in a metal staining rack.
Target Retrieval (~50 min)
48m 15s
Incubate slides at 100 °C for 00:15:00.
Rinse in DEPC water by dipping slides for 00:00:15.
Wash in 100% Ethanol for 00:03:00.
Wipe the bench with RNase AWAY.
Dry slides horizontally on a Kimwipe at Room temperature for 00:30:00 to 01:00:00.
Digestion Buffer Preparation (Fresh, Store On ice)
Step 1: Mix 2 µL of Proteinase K with 198 µL of 1X PBS.
Step 2: Add 30 µL of Step 1 solution to 1970 μL of 1X PBS in a 5 mL tube. (Do not vortex; mix by inverting the tube.)
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 Room temperature. Place slides on the preheated hybridization tray and add 400 µL of digestion buffer to ensure full tissue coverage.
Incubate slides at 40 °C for 00:30:00. Ten minutes before incubation ends, remove fiducials (protect from light) and 2X SSC-T from 4 °C and bring to Room 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 37 °C.
Fiducial Preparation and Application (~20 min) (Light-Sensitive Step)
9m
Prepare fiducials by vortexing for 00:01:00, sonicating for 00:02:00, and repeating the process three times.
Prepare fiducial solution by diluting 6 µL fiducial stock in 1194 µL of 2X SSC-T (1:200 dilution).
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 250 µL fiducial solution, ensuring full coverage of the glass and tissue within the frame for proper imaging.
Incubate for 00:05:00 at Room temperature.
Tap slides on a Kimwipe to remove excess solution.
Rinse with 1X PBS for 00:01:00.
Post-Fixation (~20 min)
16m
Incubate slides in 10% NBF for 00:01:00 at Room temperature.
Wash with NBF stop buffer for 00:05:00.
Repeat the NBF stop buffer wash for another 00:05:00.
Wash with 1X PBS for 00:05:00.
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:
25 mg NHS-Acetate powder.
962.5 µL NHS-Acetate buffer.
Gently pipette up and down to mix (avoid bubbles).
20m
Blocking
Apply NHS-Acetate mix (200-250 μL per slide), ensuring full tissue coverage.
Incubate in a covered tray for 00:15:00 at Room temperature.
Tap off excess solution.
Wash twice with 2X SSC for 00:05:00 each.
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 01:00:00 at Room temperature or up to 06:00:00 at 4 °C. Ensure Buffer R is at Room 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 95 °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
Denature RNA Probe Mixes:
Tube 1: 32 µL Core Probe Mix.
Tube 2: 28 µL Add-on Probe Mix.
Heat at 95 °C for 00:02:00, then immediately cool On ice for 00:01:00.
Prepare Hybridization Solution:
A
B
Denatured Core Mix
32 μL
Add-on Probe Mix
28 μL
RNase Inhibitor
3.2 μL
Buffer R
256 μL
DEPC Water
0.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 ~140 µ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 37 °COvernight.
Clean the workspace with RNase AWAY and set the water bath to 37 °C.
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
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.