Skip to contents

Fit the gene expression along spatial locations

Usage

spatialFit(expr, coord, knot = F, maxknotallowed = 5)

Arguments

expr

The normalized gene expression matrix. Rows represent genes and columns represent spots/cells

coord

The matrix of spatial locations. Rows represent spots/cells. The column named "row" ("col") represents row (column) coordinates

knot

Whether to select the optimal number of knots automatically

maxknotallowed

A user-defined maximum number of knots (5 by default)

Value

The fitted expression matrix. Rows represent genes and columns represent spots/cells