Description Usage Arguments Value Examples
Plot average nearest neighbor barplots for two cell types. This measurement is not symmetric, so if 'from' and 'to' are switched it will result in different results. For the 'to' parameter this function allows a cell-type without '+' or '-' in the end. Indicating that the distances from the first cell-type should be calculated against both '+/-' and a paired sign rank should be calculated. For example we want to calculate the average distance between SOX10 PDL1+ melanoma cells against both CD8 PD1+ and CD8 PD1- cells, the 'CD8 PD1' would be speficified as 'to' parameter, 2 distances would be calculated for each sample and a two-sided paired signed rank test calculated to test for significant differences.
1 2 3 4 5 | plot_nearest_neighbor(x, ...)
## S4 method for signature 'ImageSet'
plot_nearest_neighbor(x, from, to, signedrank = TRUE,
transposed = FALSE, remove_NAs = FALSE, use_pixel = FALSE)
|
x |
IrisSpatialFeatures ImageSet object. |
... |
Additional arguments. |
from |
Cell-type from which the nearest neighbor is calculated. |
to |
Cell-type to which the nearest neighbor is calculated. |
signedrank |
Flag indicating whether a paired signed rank test should be calculated. (default: TRUE) |
transposed |
Switches 'from' and 'to' cell-type. This way the (default: FALSE) |
remove_NAs |
dont plot samples with less than min cells |
use_pixel |
show the distances in pixels or micrometers (default: FALSE) |
plot average nearest neighbor barplots for two cell types
1 2 3 4 | #loading pre-read dataset
dataset <- IrisSpatialFeatures_data
dataset <- extract_nearest_neighbor(dataset)
p <- plot_nearest_neighbor(dataset,'CD8+ PD1+','SOX10+ PDL1')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.