Internal function called by extract_summary_functions()
to calculate a univariate spatial summary function for a single image.
univariate(
mximg,
markvar,
mark1,
mark2,
r_vec,
func = c(Kest, Lest, Gest),
edge_correction,
empirical_CSR = FALSE,
permutations = 1000
)
A data.frame
containing:
the radius of values over which the spatial summary function is evaluated
the values of the spatial summary function
the values of the spatial summary function under complete spatial randomness
sumfun - csr, positive values indicate clustering and negative values repulsion
Dataframe of cell-level multiplex imaging data for a single image.
Should have variables x
and y
to denote x and y spatial locations of each cell.
The name of the variable that denotes cell type(s) of interest. Character.
dummy filler, unused
dummy filler, unused
Numeric vector of radii over which to evaluate spatial summary functions. Must begin at 0.
Spatial summary function to calculate. Options are c(Kest, Lest, Gest) which denote Ripley's K, Besag's L, and nearest neighbor G function, respectively.
Character string that denotes the edge correction method for spatial summary function. For Kest and Lest choose one of c("border", "isotropic", "Ripley", "translate", "none"). For Gest choose one of c("rs", "km", "han")
logical to indicate whether to use the permutations to identify the sample-specific complete spatial randomness (CSR) estimation.
integer for the number of permtuations to use if empirical_CSR is TRUE
and exact CSR not calculable
Julia Wrobel julia.wrobel@emory.edu
Alex Soupir alex.soupir@moffitt.org
Creed, J. H., Wilson, C. M., Soupir, A. C., Colin-Leitzinger, C. M., Kimmel, G. J., Ospina, O. E., Chakiryan, N. H., Markowitz, J., Peres, L. C., Coghill, A., & Fridley, B. L. (2021). spatialTIME and iTIME: R package and Shiny application for visualization and analysis of immunofluorescence data. Bioinformatics (Oxford, England), 37(23), 4584–4586. https://doi.org/10.1093/bioinformatics/btab757