Skip to contents

Test if the gene expression is associated with spatial locations

Usage

spatialTest(
  expr,
  coord,
  knot = 0,
  maxknotallowed = 5,
  knot_row = knot,
  knot_col = knot
)

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

Number of knots (0 by default) or "auto" for automatic selection

maxknotallowed

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

knot_row

Number of knots for the row direction (knot by default)

knot_col

Number of knots for the column direction (knot by default)

Value

A data frame with the p-value (FDR) and test statistic for each gene (each row)