/spatial-lung-fibrosis

Repository for all R scripts used for the bioinformatic analyses of the mouse and human 10x Genomics Visium spatially resolved transcriptomics data presented in our associated manuscript.

Primary LanguageRMIT LicenseMIT

DOI

Mapping spatially resolved transcriptomes in human and mouse pulmonary fibrosis

Lovisa Franzén§, Martina Olsson Lindvall§, Michael Hühn, Victoria Ptasinski, Laura Setyo, Benjamin P Keith, Astrid Collin, Steven Oag, Thomas Volckaert, Annika Borde, Joakim Lundeberg, Julia Lindgren, Graham Belfield, Sonya Jackson, Anna Ollerstam, Marianna Stamou$, Patrik L Ståhl$, Jorrit J Hornberg

§ These authors contributed equally to the work
$ Corresponding authors

Nature Genetics (2024). DOI: 10.1038/s41588-024-01819-2

bioRxiv DOI:[https://doi.org/10.1101/2023.12.21.572330]

Description

This repository contains the R code used to produce all the analyses and figures presented in the article Mapping spatially resolved transcriptomes in human and mouse pulmonary fibrosis (Franzén & Olsson Lindvall et al.).

The underlying data used for the analyses have been deposited to ArrayExpress (human data, accession S-BSST1410; mouse data, accession S-BSST1410. Space Ranger output found within the zipped files in folders named "V*****-***-*1". To generate these files, raw FastQ files from the NovaSeq sequencing were processed with the Space Ranger pipeline (v. 1.2.2, 10x Genomics), where the reads were mapped to the GRCh38 (human) or mm10 (mouse) reference genome. Manual spot alignment was performed in the Loupe Browser (v. 6, 10x Genomics) software.

Cell type mapping results were obtained using the cell2location (v. 0.1) method, integrating the Space Ranger output data with annotated single cell RNA-seq data produced from human IPF lung, published by Habermann et al. (2020) (GEO accession: GSE135893), or mouse bleomycin-injured lungs, published by Strunz et al. (2020) (GEO accession: GSE141259).

Seurat/STUtility object was generated from the Space Ranger output files, using the R packages STUtility (v. 1.1.1) and Seurat (v. 4.1.1) in R (v. 4.0.5) or using semla (v. 1.1.6) and Seurat (v. 4.3.0.1) in R (v. 4.2.3).

The data processing workflows have been illustrated here.

Content

  • bin/: Installation files for R packages NNLM
  • data/: Follow instructions in the README.txt file placed within this folder to download and populate these folders with the relevant input data
    • human/
      • visium/
      • sc_deconvolution_habermann/
    • mouse/
      • visium/
      • sc_deconvolution_strunz/
    • misc: BioMart gene annotation tables, Orthogene mouse-human conversion tables, and single cell annotation groups
  • scripts/: All main R scripts used for processing and analyzing the Visium data
  • results/: Directory for saving analysis output objects and figures
  • doc/: Contains schematic workflow overview for the analyses
  • semla_analysis/: All files used for analyses performed using semla
    • bin/: Installation files for R packages spatstat and NNLM
    • data/: Visium object metadata used for input in semla analyses, together with Visium Seurat objects (needs to be downloaded separately)
    • scripts/: All scripts used for analyzing the Visium data with semla

Get started

If you intend to replicate some of the analyses presented here, it is recommended to do the following once you have forked/downloaded the content of this repo:

  1. Move the semla_analysis folder and content to another location (this analysis path has its own R project file and package requirements)
  2. Download the spaceranger output data and/or STUtility/Seurat objects and place them in their correct locations (see data/README.txt)
  3. Install renv and install the necessary packages from the renv.lock file by using renv::restore()
  4. Manually install the packages within the bin/ folder(s) and STUtility v. 1.1.1
  5. Read the scripts/README.txt for information about all scripts and their content

For details on the analysis steps, please see the overview schematic flowcharts below:

Contact

For questions related to this repo and its content, please contact Lovisa Franzén (lovisa.franzen@scilifelab.se)