# \donttest{
# Simulate example data
set.seed(42)
n_genes <- 20
n_spots <- 100
expr_matrix <- matrix(rpois(n_genes * n_spots, lambda = 10),
nrow = n_genes, ncol = n_spots)
rownames(expr_matrix) <- paste0("gene_", seq_len(n_genes))
colnames(expr_matrix) <- paste0("spot_", seq_len(n_spots))
spatial_coords <- cbind(x = runif(n_spots, 0, 100),
y = runif(n_spots, 0, 100))
rownames(spatial_coords) <- colnames(expr_matrix)
# Run SPARK-X method (no external dependencies)
results <- CalSVG(expr_matrix, spatial_coords, method = "sparkx",
kernel_option = "single", verbose = FALSE)
head(results)
# }
Run the code above in your browser using DataLab