R/measure_association_to_cell_properties.R
measure_association_to_cell_properties.Rd
Plots the density or boxplot of a property of two cell celltypes or compares using t test/wilcoxon rank sum test.
measure_association_to_cell_properties(
spe_object,
property = "Cell.Area",
celltypes,
feature_colname = "Cell.Type",
method = "density",
Nucleus.Ratio = FALSE,
log.scale = FALSE
)
SpatialExperiment object in the form of the output of
format_image_to_spe
.
String that is the name of the column of interest.
String Vector of celltypes of interest.
String that speficies the column of the cell types.
String. The analysis to perform on the selected cell types and property. Options are "density", "box", "t", "wilcox".
Boolean whether the ratio of the nucleus size is of interest.
Boolean whether to log the data.
With method "box" or "density a plot is returned. With method "t" or "wilcox", the text output from the test are returned.
measure_association_to_cell_properties(image_no_markers,
celltypes = c("Tumour", "Immune1"),
feature_colname = "Cell.Type",
property = "Cell.Size",
method = "box")
measure_association_to_cell_properties(image_no_markers,
celltypes = c("Tumour", "Immune2"),
feature_colname="Cell.Type",
property = "Cell.Size",
method = "t")
#>
#> Welch Two Sample t-test
#>
#> data: Tumour and Immune2
#> t = 27.397, df = 230.97, p-value < 2.2e-16
#> alternative hypothesis: true difference in means is not equal to 0
#> 95 percent confidence interval:
#> 5.448048 6.292373
#> sample estimates:
#> mean of x mean of y
#> 14.797360 8.927149
#>