Plot Spatial Phenotype Significance Map with Permutation Thresholds
Source:R/PhenotypePlot.R
PhenotypePlot.Rd
Visualizes phenotype prediction scores in spatial coordinates and highlights spatial units with statistically significant scores based on permutation-derived null distributions.
Arguments
- coordinate
A data.frame or matrix with two columns (x, y). Row names should match prediction order.
- prediction
A numeric vector of phenotype prediction scores for each spatial unit.
- permutation
A numeric vector from the permutation null distribution.
- size
Numeric; point size in the spatial plot. Default is 1.
- p
Numeric; two-sided significance level (between 0 and 1). Default is 0.01.
Value
A combined ggplot2
visualization with spatial points and a legend,
rendered using gridExtra::grid.arrange
.