Learn R Programming

CAESAR.Suite

=========================================================================

CAESAR suite is an open-source software package that provides image-based spatial co-embedding of locations and genomic features. The 'CAESAR.Suite' package is specifically developed by the Jin Liu's lab for annotation and enrichment analysis of spatially resolved transcriptomics (SRT) dataset. It uniquely transfers labels from scRNA-seq reference, enabling the annotation of spatial omics datasets across different technologies, resolutions, species, and modalities, based on the conserved relationship between signature genes and cells/locations at an appropriate level of granularity. Notably, CAESAR enriches location-level pathways, allowing for the detection of gradual biological pathway activation within spatially defined domain types.

Check out our Package Website for a more complete description of the methods and analyses.

CAESAR provides image-based spatial aware co-embedding of locations and genomic features.

By assuming a conserved relationship between genomic features and cells/locations within each cell/domain type at an appropriate level of granularity, the CAESAR suite flexibly annotates spatial omics datasets in a variety of contexts, for instance:

  • Using multiple reference datasets.
  • Across species.
  • Across resolutions.
  • Across modalities.
  • Across technologies.

The CAESAR suite includes functions for hypothesis testing to identify pathways enriched in each cell/location or cell/domain type. For instance:

  • Test whether pathways are enriched in dataset.
  • Calculate pathway enrichment score for each cell/location.
  • Detect cell/domain type differentially enriched pathway.

In addition, once the co-embeddings of (multiple) dataset are estimated by CAESAR, the package provides functionality for further data exploration, analysis, and visualization. Users can:

  • Detect the signature genes .
  • Determine appropriate marker gene sets based on signature gene lists obtained from reference datasets
  • Recover comparable gene expression matrices among datasets .
  • Integrate signature gene lists from multiple datasets.
  • Visualize the co-embeddings on UMAP space.
  • Visualize the signature genes on UMAP space.

Installation

"CAESAR.Suite" depends on the Rcpp and RcppArmadillo package, which requires appropriate setup of computer. For the users that have set up system properly for compiling C++ files, the following installation command will work.

# Method 1: Install CAESAR.Suite from CRAN
install.packages('CAESAR.Suite')

# For the newest version of CAESAR.Suite, users can use method 2 for installation.
# Method 2: Install CAESAR.Suite from Github
if (!require("remotes", quietly = TRUE))
    install.packages("remotes")
remotes::install_github("XiaoZhangryy/CAESAR.Suite")

# If some dependent packages (such as `scater`) on Bioconductor cannot be installed normally, use the following commands, then run the above command.
if (!require("BiocManager", quietly = TRUE)) ## install BiocManager
    install.packages("BiocManager")
# Install the package on Bioconductor
BiocManager::install(c("scater"))

Usage

For usage examples and guided walkthroughs, check the vignettes directory of the repo.

Tutorials for CAESAR suite:

For the users that don't have set up system properly, the following setup on different systems can be referred.

Setup on Windows system

First, download Rtools; second, add the Rtools directory to the environment variable.

Setup on MacOS system

First, install Xcode. Installation about Xcode can be referred here.

Second, install "gfortran" for compiling C++ and Fortran at here.

Setup on Linux system

If you use conda environment on Linux system and some dependent packages (such as scater) can not normally installed, you can search R package at anaconda.org website. We take the scater package as example, and its search result is https://anaconda.org/bioconda/bioconductor-scater. Then you can install it in conda environment by following command.

conda install -c bioconda bioconductor-scater

For the user not using conda environment, if dependent packages (such as scater) not normally installed are in Bioconductor, then use the following command to install the dependent packages.

# install BiocManager
if (!require("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
# install the package on Bioconducter
BiocManager::install(c("scater"))

If dependent packages (such as ProFAST) not normally installed are in CRAN, then use the following command to install the dependent packages.

# install the package on CRAN
install.packages("ProFAST")

Demonstration

For an example of typical CAESAR.Suite usage, please see our Package Website for a demonstration and overview of the functions included in CAESAR.Suite.

NEWs

  • CAESAR.Suite version 0.1 (2024-09-06)

Copy Link

Version

Install

install.packages('CAESAR.Suite')

Monthly Downloads

167

Version

0.1.0

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Xiao Zhang

Last Published

September 16th, 2024

Functions in CAESAR.Suite (0.1.0)

CAESAR.CTDEP

Test Cell Type Differentially Enriched Pathways
CAESAR.RUV

Perform Batch Correction and Integration with CAESAR Using Housekeeping Genes
add.gene.embedding

Add Gene Embedding to Seurat Object
find.sig.genes

Identify Signature Genes for Each Cell Type
acc

Calculate Accuracy of Predicted Cell Types
getneighborhood_fastcpp

getneighborhood_fast
SigScore

Calculate Signature Score for Cell Clusters
Mouse_HK_genes

Mouse housekeeping genes database
markerList2mat

Convert Marker List to a Weighted Matrix
Human_HK_genes

Human housekeeping genes database
marker.select

Select Marker Genes from a signature gene list Based on Expression Proportion and Overlap Criteria
cellembedding_image_matrix

Compute Spatial-Aware Cell Embeddings with Image Information
auc

Calculate Area Under the Curve (AUC) for Pathway Scores
annotation_mat

Annotate Cells Using Distance Matrix and Marker Frequencies
cellembedding_seurat

Perform CAESAR embedding of Cells Using FAST with Spatial Weights
Intsg

Integrate Signature Genes Across Datasets
cellembedding_matrix

Compute Spatial-Aware Cell Embeddings
cellembedding_image_seurat

Compute Spatial-Aware Cell Embeddings with Image Information
toydata

A toy dataset to run examples
CAESAR.coembedding.image

Compute Co-embedding with Image Information Using CAESAR
CoUMAP.plot

Plot Co-embedding UMAP for Genes and Cells
CAESAR.enrich.pathway

Test whether pathways are enriched
CAESAR.coembedding

Compute Co-embedding Using CAESAR
CoUMAP

Co-embedding UMAP for Genes and Cells in a Seurat Object
CAESAR.enrich.score

Calculate Spot Level Enrichment Scores for Pathways Using CAESAR
Cauchy.Combination

Combine p-values Using the Cauchy Combination Method
CAESAR.annotation

Perform Cell Annotation Using CAESAR with Confidence and Proportion Calculation