calculateCentroids-methods: Calculate cluster centroids

calculateCentroidsR Documentation

Calculate cluster centroids

Description

Calculate spatial centroids for the clusters or the subclusters.

Usage

calculateCentroids(
  object,
  assay.type = "ST",
  sample.name = "Sample1",
  cluster.column,
  cluster.type = c("Cluster", "Subcluster")
)

## S4 method for signature 'CellRouter'
calculateCentroids(
  object,
  assay.type = "ST",
  sample.name = "Sample1",
  cluster.column,
  cluster.type = c("Cluster", "Subcluster")
)

Arguments

object

the CellRouter object.

assay.type

character; the type of data to use.

sample.name

character; the name of the tissue sample.

cluster.column

character; the name of the column where the clustering information is stored.

cluster.type

character; the column where the clusters are indicated. It could be either 'Cluster' or 'Subcluster'.

Value

list; the centroids dataframe for each tissue sample. Each dataframe has the columns cluster, row, col, imagerow, imagecol. The row and col are the centroid coordinates while the imagerow and imagecol are the coordinates for plotting, as scaled in the bcs list.


edroaldo/fusca documentation built on March 1, 2023, 1:43 p.m.