findInteractions | R Documentation |
Calculate the interaction strength and statistical significance using random permutation tests.
findInteractions( data, idents, ligand, receptor, stats = c("mean", "median"), pair.fxn = c("+", "*"), n_perm = 100, emd = FALSE, nbins = 100, weighted = TRUE, p.adjust.method = "none", threshold = 0, min_pct = 0, max_pct = 1, drop_zero = FALSE, cutoff.stats = NA, return.perm = FALSE, n_cores = NULL, seed = 1 )
data |
Expression data. A d x M matrix with d rows of features and M columns of data points (cells). |
idents |
Cell type identity in characters or factors. |
ligand |
Name or index for ligand. |
receptor |
Name or index for receptor. |
stats |
Method used to calculate strength.
|
pair.fxn |
Functions used to calculate pair strength.
|
n_perm |
Number of random permutations. Default is 100. |
emd |
Whethter to run Earth Mover's Distance adjustment. Default is FALSE. |
nbins |
Number of bins to use for Earth Mover's Distance calculation. Default is 10. |
weighted |
Logic, compute weighted Earth Mover's Distance which will give higher weight/penalty on lowly expressed genes. Default is TRUE. |
p.adjust.method |
p value adjustment method. Default is "none". See details |
threshold |
Threshold used for interaction products. See details |
min_pct |
Earth Movre's Distance values below this percentile will be replaced with this percentile value. Default is 0. |
max_pct |
Earth Movre's Distance Values above this percentile will be replaced with this percentile value. Default is 1. |
drop_zero |
Whether to drop all the zeros in the data when calculating EMD. Default is FALSE. |
cutoff.stats |
Cutoff used to calculate the statistics (mean or median). Default is NA. If set to 0, all 0 values will be removed when calculating mean or median. |
return.perm |
Whether to return the permutation result. Default is FALSE. |
n_cores |
Number of cores used. Default is to use all cores - 1. See details |
seed |
Random seed number for permutation. Default is 1. |
Returns a list contains interaction strength and pvalues, optionally the null strength and Earth Mover's Distance similarity.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.