This function calculates the sum of counts for each row in a spatial matrix.

sum_of_counts(spatial_matrix = NULL, control = NULL)

Arguments

spatial_matrix

The spatial matrix containing molecule counts, typically obtained from a spatial transcriptomics experiment.

control

A regular expression pattern indicating the controls in the dataset. Controls are internal features used for for monitoring experiments.

Value

A numeric vector containing the sum of counts for each row in the spatial matrix.