Slide 1

Slide 1 text

@lcolladotor.bsky.social lcolladotor.github.io lcolladotor.github.io/bioc_team_ds Lessons From Working On The Edge Of Human Brain Spatially-Resolved Transcriptomics Leonardo Collado Torres, LIBD Investigator + Asst. Prof. Johns Hopkins Biostatistics Spatial Biology West Coast US 2024 December 5th 2024 Slides available at speakerdeck.com/lcolladotor

Slide 2

Slide 2 text

10.1016/j.biopsych.2020.06.005 Michael Gandal @mikegandal Transcriptomic Insight Into the Polygenic Mechanisms Underlying Psychiatric Disorders

Slide 3

Slide 3 text

Background: Human DLPFC 3 Louise A Huuki-Myers @lahuuki.bsky.social

Slide 4

Slide 4 text

Zoom in: spatial omics Kristen R Maynard @kr_maynard Keri Martinowich @martinowk Stephanie C Hicks @stephaniehicks Andrew E Jaffe @aejaffe Stephanie C Page @cerceopage

Slide 5

Slide 5 text

Visium Platform for Spatial Gene Expression Image from 10x Genomics - A slide contains 4 capture areas, each full of thousands of 55um-wide “spots” (often containing 1-10 cells) - Unique barcodes in each spot bind to particular genes; after sequencing, gene expression can be tied back to exact spots, forming a spatial map Kristen R. Maynard 5

Slide 6

Slide 6 text

#HumanPilot study explainer video youtu.be/HGioWKuI3ek https://lcolladotor.github.io/2024/05/23/humanpilot-first- spatially-resolved-transcriptomics-study-using-visium/

Slide 7

Slide 7 text

2 pairs spatial adjacent replicates x subject = 12 sections 7 Subject 1 Subject 2 Subject 3 Adjacent spatial replicates (0μm) Adjacent spatial replicates (300μm) PCP4 10.1038/s41593-020-00787-0

Slide 8

Slide 8 text

“Pseudo-bulking” collapses data: spot to layer level 8 10.1038/s41593-020-00787-0

Slide 9

Slide 9 text

DOI: 10.1038/s41593-020-00787-0 twitter.com/lcolladotor/status/1233661576433061888 from 2020-02-29 twitter.com/CrowellHL/status/ 1597579271945715717 DOI 10.1093/bioinformatics/btac299 Since Feb 2020 spatialLIBD::fetch_data() provides access to SpatialExperiment R/Bioconductor objects

Slide 10

Slide 10 text

Some challenges ⚠ with Visium 10

Slide 11

Slide 11 text

Some analysis differences ● 10x Genomics CellRanger → SpaceRanger (or other tools) ● DropletUtils::read10xVisium() → spatialLIBD::read10xVisiumWrapper() ● Spot QC ○ Drop high mitochondria % spots? ○ Drop spots with low UMI counts? ■ Biological vs technical reasons ● Spot clustering (spatially-aware) and/or manual annotation ● Choosing a spot clustering resolution ○ Can be guided by spatially cluster registration

Slide 12

Slide 12 text

Some analysis differences ● 10x Genomics CellRanger → SpaceRanger (or other tools)

Slide 13

Slide 13 text

Align your data with spaceranger --count 13 www.10xgenomics.com/support/software/space-ranger/latest

Slide 14

Slide 14 text

Loupe Browser Manually: ● Align fiducial frame ● Select spots “in tissue” lmweber.org/Visium- data-preprocessing/

Slide 15

Slide 15 text

bioconductor.org/packages/spatialLIBD Pardo et al, 2022 DOI 10.1186/s12864-022-08601-w Maynard, Collado-Torres, 2021 DOI 10.1038/s41593-020-00787-0 Brenda Pardo Abby Spangler @PardoBree @abspangler Louise A. Huuki-Myers @lahuuki

Slide 16

Slide 16 text

spatialLIBD::vis_*() functions

Slide 17

Slide 17 text

Some analysis differences ● 10x Genomics CellRanger → SpaceRanger (or other tools) ● DropletUtils::read10xVisium() → spatialLIBD::read10xVisiumWrapper()

Slide 18

Slide 18 text

spatialLIBD::read10xVisiumWrapper() 18 bioconductor.org/packages/spatialLIBD

Slide 19

Slide 19 text

spatialLIBD::run_app() 19 libd.shinyapps.io/Habenula_Visium_raw/ Default non-spatially aware graph based clustering results + K-means (k = 2 to 10)

Slide 20

Slide 20 text

Some analysis differences ● 10x Genomics CellRanger → SpaceRanger (or other tools) ● DropletUtils::read10xVisium() → spatialLIBD::read10xVisiumWrapper() ● Spot QC ○ Drop high mitochondria % spots? ○ Drop spots with low UMI counts?

Slide 21

Slide 21 text

sc/snRNA-seq QC metrics such as # detected genes, # UMI, mitochondria expression % are likely biologically related! https://lcolladotor.github.io/2024/05/23/humanpilot-first- spatially-resolved-transcriptomics-study-using-visium/

Slide 22

Slide 22 text

Some analysis differences ● 10x Genomics CellRanger → SpaceRanger (or other tools) ● DropletUtils::read10xVisium() → spatialLIBD::read10xVisiumWrapper() ● Spot QC ○ Drop high mitochondria % spots? ○ Drop spots with low UMI counts? ■ Biological vs technical reasons

Slide 23

Slide 23 text

scuttle::isOutlier(sce.416b$sum, log=TRUE, type="lower") drive.google.com/drive/folders/1cn5d-Ey7-kkMiex8-74qxvxtCQT6o72h Slide by Peter Hickey

Slide 24

Slide 24 text

10.1089/genbio.2023.0019 Fig S9 Low library size (UMIs, # detected genes): ● Biological: ○ Not all cells / layers are equally active ● Technical: ○ Edge of tissue: should have been called “out of tissue” ○ Truly low quality

Slide 25

Slide 25 text

● Spot-level QC ○ Define a local neighborhood using k-nearest neighbors based on spatial coordinates ○ Use neighborhood to calculate z-score for the QC metric (library size, detected genes, mito rate) ○ Identity outlier spots based on z-score Fig 1: An overview of SpotSweeper SpotSweeper by Totty, Hicks, Guo 10.1101/2024.06.06.597765

Slide 26

Slide 26 text

Fig 3: SpotSweeper detects consistent set of spots with systematically low library size driven by barcode biases. ● 6 barcodes in Visium slides have low library sizes across datasets ● Synthetic barcodes at these spots may be responsible for downstream quality issues ○ Certain k-mers show bias towards larger or smaller library sizes SpotSweeper by Totty, Hicks, Guo 10.1101/2024.06.06.597765

Slide 27

Slide 27 text

Prashanthi Ravichandran @prashanthi-ravichandran (GH) Artifacts in general are normalized away by library size, though there are caveats 10.1126/science.adh1938

Slide 28

Slide 28 text

Diffusion issues: could be related to permeabilization step 10.1126/science.adh1938

Slide 29

Slide 29 text

Having more data is useful to provide context! Here 4 new samples have low sequencing saturation (outliers) but are within range of good samples from other studies

Slide 30

Slide 30 text

Having more data is useful to provide context! Those 4 samples have great median UMI counts per spot ^_^

Slide 31

Slide 31 text

Some analysis differences ● 10x Genomics CellRanger → SpaceRanger (or other tools) ● DropletUtils::read10xVisium() → spatialLIBD::read10xVisiumWrapper() ● Spot QC ○ Drop high mitochondria % spots? ○ Drop spots with low UMI counts? ■ Biological vs technical reasons ● Spot clustering (spatially-aware) and/or manual annotation

Slide 32

Slide 32 text

Visualize known marker genes

Slide 33

Slide 33 text

Visualize known marker genes: manually annotate

Slide 34

Slide 34 text

34 bioconductor.org/packages/spatialLIBD Visualizing multiple genes

Slide 35

Slide 35 text

35 bioconductor.org/packages/spatialLIBD Spatially-aware clustering results BayesSpace PRECAST …

Slide 36

Slide 36 text

Some analysis differences ● 10x Genomics CellRanger → SpaceRanger (or other tools) ● DropletUtils::read10xVisium() → spatialLIBD::read10xVisiumWrapper() ● Spot QC ○ Drop high mitochondria % spots? ○ Drop spots with low UMI counts? ■ Biological vs technical reasons ● Spot clustering (spatially-aware) and/or manual annotation ● Choosing a spot clustering resolution ○ Can be guided by spatially cluster registration

Slide 37

Slide 37 text

37 bioconductor.org/packages/spatialLIBD 10.1126/science.adh1938

Slide 38

Slide 38 text

spatialLIBD::registration_wrapper() + layer_stat_cor() 38 10.1126/science.adh1938

Slide 39

Slide 39 text

spatialLIBD interactive apps ● Useful for visualizing & annotating the data ● Immediately make them after running SpaceRanger ● Update them as we generate more results ● Share them with the publication of the results ● spatial.libd.org/spatialLIBD/ ● research.libd.org/spatialDLPFC/#interactive-websites ● research.libd.org/Visium_SPG_AD/#interactive-websites ● …

Slide 40

Slide 40 text

Getting our feet wet with Visium HD 40 @Nick-Eagles Nicholas J. Eagles Kristen R Maynard @kr_maynard Kelsey D. Montgomery Sarah E. Maguire

Slide 41

Slide 41 text

Visium HD Overview - Visium HD is composed of square bins, not spots, at 3 different resolutions - 8μm bin size is recommended for analysis by 10x Genomics - Compare to 100μm distance between spots! - ~700k bins, compared to ~5k spots! - 2μm bin size is subcellular, and can be combined with segmentation to form cells “Bin level”: 8μm bins “Cell level”: Individual cells from combining 2μm bins 16μm bin border 8μm bin border 2μm bin border cell

Slide 42

Slide 42 text

Top SVGs (bin level) 1. Lower resolution with SEraster 10.1093/bioinformatics/btae412 2. Compute SVGs with nnSVG 10.1038/s41467-023-39748-z 3. Visualize with spatialLIBD 10.1186/s12864-022-08601-w 1 5 9

Slide 43

Slide 43 text

1 5 9 1. Compute HVGs with scran 10.12688/f1000research.9501.2 2. Visualize with spatialLIBD 10.1186/s12864-022-08601-w Top HVGs (cell level)

Slide 44

Slide 44 text

Spatially informed cell clustering with MERINGUE 10.1101/gr.271288.120

Slide 45

Slide 45 text

Banksy: cell-level spatial domains (k = 2, 4, 8) 10.1038/s41588-024-01664-3

Slide 46

Slide 46 text

FICTURE clustering * Note: mirrored and rotated data 10.1101/2023.11.04.565621

Slide 47

Slide 47 text

Software keeps evolving and as leaders in the field we aim to use the best methods 47 Moses, L., Pachter, L. Museum of spatial transcriptomics. Nat Methods 19, 534–546 (2022). https://doi.org/10.1038/s41592-022-01409-2

Slide 48

Slide 48 text

Visium HD Software Comparison Software tool Runs on our data Run time (per sample) Required memory (per sample, GB) Integrates well with SpatialExperiment Operates on multiple samples simultaneously Uses GPU Documentation quality Authors responsive bin2cell Yes 30 min < 32 Yes No No Good Yes FICTURE Yes 3 hours < 64 No No No Okay Yes SEraster Yes 20 min < 64 Yes No No Good Yes MERINGUE Sort of 1 day > 400 Yes No No Okay Yes Giotto Yes Varied Varied Yes Yes No Needs improvement Banksy Yes 3 hours > 250 Yes Yes No Okay HERGAST Yes Okay ENACT @Nick-Eagles Nicholas J. Eagles #RStats and #PyStats https://github.com/LieberInstitute/jhpce_module_source

Slide 49

Slide 49 text

Learn in public Learn continuously Share what you’ve learned youtube.com/@lcolladotor

Slide 50

Slide 50 text

50 research.libd.org/rstatsclub LIBD rstats club videos

Slide 51

Slide 51 text

51 research.libd.org/rstatsclub LIBD rstats club videos

Slide 52

Slide 52 text

@MadhaviTippani Madhavi Tippani @HeenaDivecha Heena R Divecha @lmwebr Lukas M Weber @stephaniehicks Stephanie C Hicks @abspangler Abby Spangler @martinowk Keri Martinowich @CerceoPage Stephanie C Page @kr_maynard Kristen R Maynard @lcolladotor Leonardo Collado-Torres @Nick-Eagles Nicholas J Eagles Kelsey D Montgomery Sang Ho Kwon Image Analysis Expression Analysis Data Generation Thomas M Hyde @lahuuki Louise A Huuki-Myers @BoyiGuo Boyi Guo @mattntran Matthew N Tran @sowmyapartybun Sowmya Parthiban Slides available at speakerdeck.com /lcolladotor + Many more LIBD, JHU, and external collaborators @mgrantpeters Melissa Grant-Peters @prashanthi-ravichandran (GH) Prashanthi Ravichandran

Slide 53

Slide 53 text

lcolladotor.github.io @lcolladotor.bsky.social Slides: