Skip to content

zifornd/visium

Repository files navigation

visium

A quarto workflow to analyse and visualise 10x Visium Spatial Transcriptomics data

Contents

Overview

Visium is a quarto workflow to process and analyse 10x Visium Spatial transcriptomic data from the 10x Genomics platform. It is compatible with both FFPE and Fresh frozen protocols and utilises the following key analysis frameworks:

Installation

Please ensure you also have make and R version 4.0 or greater installed.

  1. Install Renv

    Visium and all of its dependencies can be installed via the renv package manager. In each workflow renv::restore() will restore the project state from the renv.lock file.

    For more details on renv please follow this link.

    The first thing we install is renv which requires yaml to parse dependencies within Quarto Markdown files:

    $ R
    
    R version 4.2.0 (2022-04-22) -- "Vigorous Calisthenics"
    Copyright (C) 2022 The R Foundation for Statistical Computing
    Platform: x86_64-pc-linux-gnu (64-bit)
    
    R is free software and comes with ABSOLUTELY NO WARRANTY.
    You are welcome to redistribute it under certain conditions.
    Type 'license()' or 'licence()' for distribution details.
    
    R is a collaborative project with many contributors.
    Type 'contributors()' for more information and
    'citation()' on how to cite R or R packages in publications.
    
    Type 'demo()' for some demos, 'help()' for on-line help, or
    'help.start()' for an HTML browser interface to help.
    Type 'q()' to quit R.
    
    > install.packages("yaml")
    > install.packages("renv")
  2. Install quarto

    As this workflow is written as a number of quarto documents we next we need to install Quarto by following the link:

    We can then install the .deb file and test quarto install:

    $ sudo dpkg -i quarto-0.9.640-linux-amd64.deb
    $ quarto -V # Test version and install

    See the following link for more details on rendering quarto documents .qmd

Usage

  1. Create sample table

    $ vim data/sample_table.csv # containing sample meta data 

    This table should look something like the following and must contain these headers:

    sample image slide group area index files protocol
    V1_Breast_Cancer_Block_A_Section_1 V1_Breast_Cancer_Block_A_Section_1_image V19L29-097 slide1 B1 T1T2-F10 V1_Breast_Cancer_Block_A_Section_1_filtered_feature_bc_matrix.h5 FF
    V1_Breast_Cancer_Block_A_Section_2 V1_Breast_Cancer_Block_A_Section_2_image V19L29-098 slide2 B1 T1T2-H10 V1_Breast_Cancer_Block_A_Section_2_filtered_feature_bc_matrix.h5 FF
  2. Fill in paramaters

    These can be filled in at the top of each workbook e.g. for 01-data-loading:

         ---
         title: "Data loading"
         params:
             prefix:
             - "data/"
             marker:
             - "ACTA2"
             sample.sheet:
             - "V1_Breast_Cancer.csv"
         ---

    or supplied upon render using the -P flag:

  3. Construct your make file

    $ vim Makefile # Edit/Comment out .qmd files not in use.
  4. Test make file

    $ make -n
  5. Run make file

    $ make

Alternatively this quarto workflow may be rendered in separate parts using RStudio

Support

If you need help, open an issue with one of the following labels:

  • help wanted (extra attention is needed)
  • question (further information is requested)

Feedback

If you have any suggestions, open an issue with one of the following labels:

  • documentation (improvements or additions to documentation)
  • enhancement (new feature or request)

Contributing

To contribute to Visium, clone this repository locally and commit your code on a separate branch. Please generate unit tests for your code and run a linter before opening a pull request.

You can find more details in the Contributing guide.

Participation in this project is subject to a Code of Conduct.

Authors

Visium was developed by Ben Southgate and James Ashmore.

If you would like to be added to this list, please open a pull request with your contribution.

Citation

Used By

Visium is used by the following companies and institutes:

If you would like to be added to this list, please open a pull request with your information.

Acknowledgements

This work was based primarily on the Seurat workflow for analysis of spatial transcriptomics data. Please see below for relevant citations:

Hao Y, Hao S, Andersen-Nissen E, Mauck WM 3rd, Zheng S, Butler A, Lee MJ, Wilk AJ, Darby C, Zager M, Hoffman P, Stoeckius M, Papalexi E, Mimitou EP, Jain J, Srivastava A, Stuart T, Fleming LM, Yeung B, Rogers AJ, McElrath JM, Blish CA, Gottardo R, Smibert P, Satija R. Integrated analysis of multimodal single-cell data. Cell. 2021 Jun 24;184(13):3573-3587.e29. doi: 10.1016/j.cell.2021.04.048. Epub 2021 May 31. PMID: 34062119; PMCID: PMC8238499.

Stuart T, Butler A, Hoffman P, Hafemeister C, Papalexi E, Mauck WM 3rd, Hao Y, Stoeckius M, Smibert P, Satija R. Comprehensive Integration of Single-Cell Data. Cell. 2019 Jun 13;177(7):1888-1902.e21. doi: 10.1016/j.cell.2019.05.031. Epub 2019 Jun 6. PMID: 31178118; PMCID: PMC6687398.

Hafemeister, C., Satija, R. Normalization and variance stabilization of single-cell RNA-seq data using regularized negative binomial regression. Genome Biol 20, 296 (2019). https://doi.org/10.1186/s13059-019-1874-1

Amezquita, R.A., Lun, A.T.L., Becht, E. et al. Orchestrating single-cell analysis with Bioconductor. Nat Methods 17, 137–145 (2020). https://doi.org/10.1038/s41592-019-0654-x

The workflow was motivated by the following projects:

The documentation was informed by the following articles:

License

Visium is licensed under the MIT license.
Copyright © 2022, Zifo rnd

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published