This repository provides an R-based pipeline for analyzing spatial RNA-seq data using Seurat, STDeconvolve, and Giotto. Designed to process and analyze spatial transcriptomics data through a sequence of well-defined steps, enabling in-depth exploration and interpretation of spatially resolved gene expression profiles.
Note: Make sure to have older version of Giotto (1.1.2).
Tool | Functions |
---|---|
Seurat | automated_seurat_analysis_func , automated_seurat_spatial_analysis_func |
STDeconvolve | decolvolve_spatial_transcriptomics_analysis |
Giotto | giotto_spatial_transcriptomics_analysis |
File Name | Description |
---|---|
run_analysis.R |
Main script to run the entire analysis pipeline. |
package_installer.R |
Script to install necessary R packages. |
seurat_analysis.R |
Functions for Seurat-based analysis. |
cell_deconvolution_analysis.R |
Functions for cell deconvolution analysis. |
giotto_gene_expr_analysis.R |
Functions for Giotto-based analysis. |
git clone https://github.com/utdal/visium10x-spatial-transcriptomics-pipeline.git
cd visium10x-spatial-transcriptomics-pipeline
Note: Prior to running the pipeline, one needs to install R and RStudio/VSCode for running the R-based pipeline.
- Open
run_analysis.R
in Rstudio/VSCode. - Modify the directory paths, per sample.
- Additionally, for Giotto analysis, there is a chance that the barcodes may not overlap with the tissue, in that case;
xmax_adj
,xmin_adj
,ymax_adj
andymin_adj
need to be adjusted accordingly. - Outputs generated are saved to the directory path defined in
run_analysis.R
file.
The script will generate various output files which include:
- Plots (e.g., UMAP, PCA, heatmaps)
- CSV files with marker genes
- RDS files with processed data
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
- Missing Files: Ensure all required files are present in the specified paths.
- Package Issues: Install any missing R packages using package_installer.R.
- Path Errors: Double-check file paths and directory names in the run_analysis.R script.
Known Issues:
STDeconvolve
andGiotto
need the input files to be in the following format:-- sample -- outs -- filtered_feature_bc_matrix -- barcodes.tsv.gz -- features.tsv.gz -- matrix.mtx.gz -- raw_feature_bc_matrix -- barcodes.tsv.gz -- features.tsv.gz -- matrix.mtx.gz -- spatial -- tissue_positions_list.csv -- scalefactors_json.json -- filtered_feature_bc_matrix.h5 -- raw_feature_bc_matrix.h5 -- etc.
Contant: For questions or issues, please reach out Dr. Tavares Ferreira, Diana or Nikhil Nageshwar Inturi.