R/bandle-plots.R
bandle-plots-spatial.Rd
Generate a PCA plot with smoothed probability contours
An instance of class MSnSet
to provide the pca coordinates
An instance of class bandleParams
Feature columns that defines the markers. Defaults to "markers".
The PCA dimensions to plot. Defaults to c(1,2)
The covariance function for the smoothing kernel. Defaults to wendland.cov
The theta parameter of the wendland.cov. Defaults to 2.
The derivative paramter of the wendland.cov. Defaults to 2.
The k parameter of the wendland.cov
Which conditions do we want to plot. Must be 1
or 2
. Default
is 1
The chain from which we plot the probability distribution. Default is 1.
The levels at which to plot the contours. Defaults to c(0.99, 0.95, 0.9, 0.85, 0.8, 0.75, 0.7)
The aspect ratio of the pca plots. Defaults to 0.5.
returns a named vector of differential localisation probabilities
if (FALSE) {
## Generate some example data
library("pRolocdata")
data("tan2009r1")
set.seed(1)
tansim <- sim_dynamic(object = tan2009r1,
numRep = 4L,
numDyn = 100L)
data <- tansim$lopitrep
control <- data[1:2]
treatment <- data[3:4]
## fit GP params
gpParams <- lapply(tansim$lopitrep, function(x)
fitGPmaternPC(x, hyppar = matrix(c(0.5, 1, 100), nrow = 1)))
## run bandle
res <- bandle(objectCond1 = control,
objectCond2 = treatment,
gpParams = gpParams,
fcol = "markers",
numIter = 5L,
burnin = 1L,
thin = 2L,
numChains = 1,
BPPARAM = SerialParam(RNGseed = 1),
seed = 1)
## Process the results
bandleres <- bandleProcess(res)
## plot the results
spatial2D(control[[1]], bandleres)
}