| doPerm | R Documentation |
Performs permutation-based sampling to generate an empirical null distribution of correlation coefficients for p-value calculation in CIBERSORT analysis. Randomly samples from the mixture data to create null distributions.
doPerm(perm, X, Y, absolute, abs_method, seed = NULL)
perm |
Integer. Number of permutations to perform ( |
X |
Matrix or data frame containing signature matrix (predictor variables). |
Y |
Numeric vector containing the mixture sample expression. |
absolute |
Logical indicating whether to use absolute space for weights. |
abs_method |
String specifying the method for absolute space weights: '"sig.score"' or '"no.sumto1"'. |
seed |
Integer. Random seed for reproducibility. If NULL (default), uses current random state. |
List containing:
Numeric vector of correlation coefficients from permutations
# Simulate data
set.seed(123)
X <- matrix(rnorm(100), nrow = 10)
rownames(X) <- paste0("Gene", 1:10)
colnames(X) <- paste0("Cell", 1:10)
Y <- rnorm(10)
names(Y) <- paste0("Gene", 1:10)
# Run permutation test
result <- doPerm(10, X, Y, absolute = FALSE, abs_method = "sig.score")
if (!is.null(result)) str(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.