Skip to contents

Downloads and loads MERFISH example data from a public GitHub repository. The function retrieves cell type annotations, spatial region labels, and gene expression count matrices (in up to 10 chunks), then returns them as a list.

Usage

read_merfish(num_chunks = 10)

Arguments

num_chunks

Integer between 0 and 10. Controls how many count matrix chunks to download and load. Defaults to 10 (all chunks). Use 0 to skip loading counts.

Value

A named list with three elements:

counts

A matrix or data frame of gene expression counts (combined from multiple chunks).

regions

A vector or factor of region labels for each cell.

CT

A vector or factor of cell types for each cell.

Details

This function requires an internet connection to download data from https://github.com/kaishumason/SpotGLM-Example-Data. The function assumes the repository structure and filenames are consistent with the expected format.

Examples

if (FALSE) { # \dontrun{
data_list <- read_merfish_data(num_chunks = 5)
head(data_list$counts)
table(data_list$CT)
} # }