scHOT.Rd
A wrapper function to perform scHOT
scHOT(
scHOT,
testingScaffold = NULL,
weightMatrix = NULL,
positionType = NULL,
positionColData = NULL,
nrow.out = NULL,
averageAcrossTrajectoryTies = FALSE,
higherOrderFunction = NULL,
higherOrderFunctionType = NULL,
numberPermutations = 1000,
numberScaffold = 100,
storePermutations = TRUE,
higherOrderSummaryFunction = sd,
parallel = FALSE,
BPPARAM = BiocParallel::SerialParam(),
usenperm_estimate = FALSE,
nperm_estimate = 10000,
maxDist = 0.1,
plot = FALSE,
verbose = TRUE,
...
)
A scHOT object
A matrix with rows for each testing combination
A matrix indicates the weight matrix for scHOT analysis
A string indicating the position type, either "trajectory" or "spatial"
Either trajectory or spatial information for each sample. If positionType is "trajectory" then positionColData should be a character or numeric indicating the subset of colData of the scHOT object. If positionType is "spatial" then positionColData should be a character or numeric vector indicating the subset of colData that give the full spatial coordinates.
The number of weightings to include for testing, a smaller value is faster for computation
Logical indicating whether ties in the trajectory should be given the same local weights
A function object indicates the higher order function
is "weighted" or "unweighted", determines if there is a weighting argument in the higher order function
The number of permutations, set as 1000 by default
The number of testing scaffolds to perform permutations, set as 100 by default
a logical flag on whether permutation values should be saved
A functon indicating the higher order summary function (default is standard deviation `sd`)
A logical input indicating whether to run the permutation test using multiple cores in parallel.
A BiocParallelParam
class object from
the BiocParallel
package is used. Default is SerialParam().
Logical (default FALSE) if number of neighbouring permutations should be used to estimate P-values, or if difference of global higher order statistic should be used
Number of neighbouring permutations to use for p-value estimation
max difference of global higher order statistic to use for p-value estimation (default 0.1)
A logical input indicating whether the results are plotted
A logical input indicating whether the intermediate steps will be printed
parameters for function trajectoryWeightMatrix or spatialWeightMatrix
A scHOT object
data(MOB_subset)
sce_MOB_subset <- MOB_subset$sce_MOB_subset
scHOT_spatial <- scHOT_buildFromSCE(sce_MOB_subset,
assayName = "logcounts",
positionType = "spatial",
positionColData = c("x", "y"))
pairs <- matrix(c("Arrb1", "Mtor", "Dnm1l", "Gucy1b3"), ncol = 2, byrow = TRUE)
rownames(pairs) <- apply(pairs,1,paste0,collapse = "_")
scHOT_spatial <- scHOT(scHOT_spatial,
testingScaffold = pairs,
positionType = "spatial",
positionColData = c("x", "y"),
nrow.out = NULL,
higherOrderFunction = weightedSpearman,
higherOrderFunctionType = "weighted",
numberPermutations = 100,
higherOrderSummaryFunction = sd,
parallel = TRUE,
BPPARAM = MulticoreParam(2),
verbose = TRUE,
span = 0.05)
#> Adding testing scaffold
#> Set weight matrix
#> weightMatrix not provided, generating one using parameter settings...
#> Calculating global higher order function
#> higherOrderFunctionType given will replace any stored param
#> higherOrderFunction given will replace any stored param
#> Calculating higher order test statistics
#> numberScaffold set higher than the scaffold, setting permutation number for all tests
#> higherOrderSummaryFunction will replace any stored param
#> Perform Permutation Test
#> Permutation testing combination 1 of 2...
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'BPPARAM' in selecting a method for function 'bplapply': could not find function "MulticoreParam"