# Load a small example Seurat object
data("pbmc_small", package = "SeuratObject")
features <- c("CD3D", "CD79A", "MS4A1", "GZMK", "CCL5")
# Prepare expression matrices first
matrices <- prepare_expression_matrices(pbmc_small, features, group_by = "RNA_snn_res.0.8")
# Define gene groups
gene_groups <- list(
"T-cell Markers" = c("CD3D", "GZMK", "CCL5"),
"B-cell Markers" = c("CD79A", "MS4A1")
)
# Create gene annotations
annotations <- create_gene_annotations(
exp_mat = matrices$exp_mat,
percent_mat = matrices$percent_mat,
gene_classification = gene_groups,
color_palette = "Set1"
)
# Access results
ordered_exp_mat <- annotations$exp_mat_ordered
Run the code above in your browser using DataLab