Permutation Test

PermTest(fullcluster, distmat, firstn = 15)

Arguments

fullcluster

A list of clusters that generated by the function GetCluster()

distmat

A list of distance vectors generated by the function FindNNDist().

firstn

Positive integer giving the number of nearest neighbors from each sampled cell to include. It must not exceed the meaningn value used to create distmat. The published method uses 15.

Value

A list containing the relative within-between distance matrix (allrevDiff) and permutation-test p-values (allP).

Examples

data(sim_result)
# fullcluster <- GetCluster(seuratlist)
# Assuming 'distmat' is a list of normalized gene count matrix
# distmat <- FindNNDist(fullcluster, normCount, meaningn = 20)
testres <- PermTest(sim_result[[1]], sim_result[[3]], 15)