create a correlation plot
spatialcorr.Rdcreate a correlation plot
Usage
spatialcorr(
spe,
method,
adjust = "fdr",
variables = NULL,
sig.level = 0.05,
type = "lower",
diag = FALSE,
order = "original",
plot_layout = "color",
insig = "label_sig",
addCoef.col = NULL,
...
)
Arguments
- spe
the spe object
- method
-
method to used for correlation analysis - deconvolution method or decoupleR e.g. "cell2location"
- adjust
-
method used to adjust p-values for multiple testing, see stats::p.asjust.methods for details
- variables
-
if not provided, the function selects variables based on the specified method, it can also be a vector
- sig.level
it can also be a vector
- type
-
Character, 'full' 'upper' or 'lower' (default), display full matrix, lower triangular or upper triangular matrix.
- diag
-
Logical, whether display the correlation coefficients on the principal diagonal. default is FALSE
- order
-
Character, the ordering method of the correlation matrix.'original' for original order (default),'AOE' for the angular order of the eigenvectors, 'FPC' for the first principal component order, 'hclust' for the hierarchical clustering order,'alphabet' for alphabetical order.
- plot_layout
-
represents the method parameter in the original corrplot function.The layout of the correlation plot. color is default. Choose between "circle", "square", "ellipse", "number", "shade", "color", "pie"
- insig
-
If 'blank', wipe away the corresponding glyphs; if 'p-value', add p-values the corresponding glyphs; if 'pch', add characters (see pch for details) on corresponding glyphs; if 'n', don't take any measures; if 'label_sig' (default), mark significant correlations with pch (see sig.level).
- addCoef.col
-
to add labels to the plot showing the correlation values, default is NULL, the user can choose any other color to add and color the values.
- ...
additional parameters passed to corrplot function