---
title: "stIHC: Spatial transcriptomics iterative hierarchical clustering"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{stIHC-introduction}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
```

## Overview
The stIHC package implements the spatial transcriptomics iterative hierarchical clustering method from the paper Higgins C, Li JJ, Carey M. Spatial transcriptomics iterative hierarchical clustering (stIHC): a novel method for identifying spatial gene co-expression modules. Quantitative Biology. 2025;e70011. https://doi.org/10.1002/qub2.70011

## Example
An example demonstrating how to use stIHC, along with the data required to reproduce simulations from Section 3.2 in our paper, is provided.

```{r setup}
library(stIHC)

rds_path <- system.file("extdata", "spatial_data.rds", package = "stIHC")
example_data <- readRDS(rds_path)

stihc = stIHC(example_data) #Run stIHC

table(stihc$label)


```

