SpatialDE
SpatialOmicsGPs.spatialDE — FunctionspatialDE(y,x::Union{RowVecs, ColVecs},n::Int; covariates = [], mean = true, names = [], lambda_tol = 1e-3)TBW
SpatialOmicsGPs.spatialde_param_inference — Functionspatialde_param_inference(y,x::Union{RowVecs, ColVecs},n::Int; covariates = [], mean = true, lambda_tol = 1e-3)Perform parameter inference for the SpatialDE model for all variables (columns) in y observed at locations x with a squared exponential kernel and a grid of n length scales. The input x should be of type RowVecs or ColVecs from the KernelFunctions package. The function returns the optimal variance parameters and length scale indices for all variables, as well as the grid of length scales used.
SpatialOmicsGPs.spatialde_pvalues — Functionspatialde_pvalues(minus_loglikes, minus_loglikes_null, n)Compute the p-values for the SpatialDE model for all variables given the negative log-likelihoods of the model with and without spatial structure. The input minus_loglikes and minus_loglikes_null should be vectors with the same number of elements, and n is the number of samples.
SpatialOmicsGPs.spatialde_varpars_all — Functionspatialde_varpars_all(y,x::Union{RowVecs, ColVecs},n::Int; covariates = [], mean = true, lambda_tol = 1e-3)Compute the spatial variance parameters for all variables (columns) in y observed at locations x using FaST-LMM with a squared exponential kernel and a grid of length scales. The input x should be of type RowVecs or ColVecs from the KernelFunctions package.
SpatialOmicsGPs.spatialde_varpars_opt — Functionspatialde_varpars_opt(lσ²s, lδs, minus_loglikes)Compute the optimal spatial variance parameters and length scale index for all variables by finding for each row the minimum of the negative log-likelihood in minus_loglikes and returning the corresponding variance parameters and length scale index. The input lσ²s and lδs should be matrices with the same number of rows as minus_loglikes and the same number of columns as the length scales used in the optimization.
SpatialOmicsGPs.spatialde_varpars_null — Functionspatialde_varpars_null(y; covariates = [], mean = true)Compute the variance parameter REML estimate and corresponding negative log-likelihood for all variables in y for the null model without spatial structure.
SpatialOmicsGPs.lengthscales — Functionlengthscales(X, n=10)For a vector-of-vectors X, return a grid of length scales with n grid points, logarithmically spaced. The boundaries of the grid are by default set as the shortest observed distance between pairs of vectors in X divided by 2, and the longest observed distancebetween pairs of vectors inX` multiplied by 2.
The input X should be of type RowVecs or ColVecs from the KernelFunctions package.