10x Genomics Support/Space Ranger/Analysis/

Visium HD Analysis with spaceranger count

Space Ranger v3.0 and later can analyze Visium HD Spatial Gene Expression datasets generated from formalin fixed paraffin embedded (FFPE) human or mouse samples and the Visium CytAssist instrument. The spaceranger count pipeline is necessary to analyze these data.

Before running the pipeline, check that you have the following inputs prepared:

  • The corresponding CytAssist image in TIFF format (--cytaimage)
  • Microscope image (optional) in either TIFF, QPTIFF, BTF, or JPEG format:
    • --image for a brightfield microscope image
    • --darkimage for a dark background fluorescence microscope image
    • --colorizedimage for a composite colored fluorescence microscope image
  • Slide parameters specified by:
    • --slide & --area if spaceranger has access to internet (optional with CytAssist metadata)
    • --slidefile, --slide & --area if spaceranger has no access to the internet (the slide layout file must be directly downloaded
    • --unknown-slide if Visium slide details are unknown
  • The reference transcriptome (--transcriptome). Human and mouse references are available for download, or build a custom reference
  • The probe set CSV (--probe-set). These files can be found in the probe_sets directory in the Space Ranger software package or downloaded here
  • In most cases Space Ranger will perform automatic image to fiducial alignment and tissue detection. When automatic alignment fails, you must also run manual alignment in Loupe Browser and specify the alignment JSON file with the --loupe-alignment option.

The following command assumes all inputs are in the current working directory; change paths as needed. Run a separate instance of the spaceranger count pipeline on each capture area.

spaceranger count --id=hd_count \ --transcriptome=/path/to/refdata-gex-GRCh38-2020-A \ --fastqs=/path/to/fastq \ --probe-set=/path/to/Visium_Human_Transcriptome_Probe_Set_v2.0_GRCh38-2020-A.csv \ --slide=H1-YD7CDZK \ --area=A1 \ --cytaimage=/path/to/CAVG10539_2023-11-16_14-56-24_APPS115_H1-YD7CDZK_A1_S11088.tif \ --image=/path/to/APPS115_11088_rescan_01.btf \ --create-bam=false

Space Ranger v3.0 and later requires the --create-bam argument to be set to true or false. Here, we set it to false to save disk space and computation time. BAM files can be useful for long term data archiving, troubleshooting (especially mapping), and other reasons.

Space Ranger v3.0 and later no longer requires the --slide and --area options if these metadata can be obtained from the CytAssist image.

For a complete list of arguments and options, see the Command Line Argument Reference, or run spaceranger count --help.

A successful spaceranger count run concludes with a message similar to this:

Outputs: - Run summary HTML: /outs/web_summary.html - Outputs of spatial pipeline: Slide image annotated with fiducial alignment: /outs/spatial/aligned_fiducials.jpg Slide image annotated with detected tissue: /outs/spatial/detected_tissue_image.jpg ... 2024-02-26 18:00:10 [perform] Serializing pipestance performance data. Waiting 6 seconds for UI to do final refresh. Pipestance completed successfully!

To continue, see Understanding Space Ranger Outputs. It is recommended to check the web_summary.html file first to check quality control metrics.