In order to install SPATA2 with all its dependencies in the right order enter the following commands. The time it takes to install everything depends on how many of the required packages are already installed. The installation of SPATA2 itself takes approximately 2-3 minutes.

install.packages("devtools")

if (!base::requireNamespace("BiocManager", quietly = TRUE)){
      install.packages("BiocManager")
  }

BiocManager::install(c('BiocGenerics', 'DelayedArray', 'DelayedMatrixStats',
                       'limma', 'S4Vectors', 'SingleCellExperiment',
                       'SummarizedExperiment', 'batchelor', 'Matrix.utils', 'EBImage'))

install.packages("Seurat")

devtools::install_github(repo = "kueckelj/confuns")
devtools::install_github(repo = "theMILOlab/SPATAData")
devtools::install_github(repo = "theMILOlab/SPATA2")

# if you want to use monocle3 related wrappers 
devtools::install_github('cole-trapnell-lab/leidenbase')
devtools::install_github('cole-trapnell-lab/monocle3')