Study: Visium demo study 3798 cells

Demonstration study with 10x Visium Spatial Gene Expression Dataset 

“Human Breast Cancer (Block A Section 1)” generated by Ranger 1.1.0

Original data files obtained from 10x Genomics at: https://support.10xgenomics.com/spatial-gene-expression/datasets/1.1.0/V1_Breast_Cancer_Block_A_Section_1

Steps to modify 10x output to generate SCP-compatible files:

  • expression matrix (from outs/filtered feature bc matrix) [actual directory name has underscores, underscores removed here due to Markdown auto-italics issue]
    • upload as MM Coordinate Matrix format expression matrix
  • metadata (choose desired clustering from outs/analysis/clustering; for this study, used clusters from “graphclust” directory)
    • create a metadata file following SCP convention metadata format that uses the “Barcode” column for NAME and “Cluster” as unconventional metadata
    • (No EFO ontology entry currently exists for Visium library preparation protocol, used EFO_0008994 “spatial transcriptomics” for this study)
  • spatial (use outs/spatial/tissue positions list.csv) [actual file name has underscores, underscores removed here due to Markdown auto-italics issue]
    • use first column as NAME, remove columns 2-4, use column 5 as X and column 6 as Y
    • follow SCP cluster file format add a TYPE row to indicate data type (numeric for X and Y)
  • cluster (choose desired embedding  from outs/analysis [tsne, umap etc] directory)
    • follow SCP cluster file format 
      • replace Barcode header in projection.csv file with NAME
      • replace embedding dimension headers (eg. TSNE-1 and TSNE-2) in projection.csv file with X and Y
      • add TYPE row

Quirks regarding visualization of 10x Visium data

when prepared as described above:

  • Gene search results at array locations with no sample will be plotted with zero gene expression because all barcodes are included in the expression matrix file and tissue positions list.csv. For a visualization which only plots array locations with sample data, all barcodes that are not in the metadata file should be removed from the spatial file.
  • The spatial plot will be rotated 90 degrees counterclockwise relative to the images from the outs/spatial directory. For the Section 1 data, the SCP spatial visualization corresponds to a brightfield image in the orientation depicted below. Note that the “hourglass” fiducial marker that Visium uses to indicate the upper left corner of captured images is positioned at the lower left corner.

(Dataset is licensed under the Creative Commons Attribution license)