calcEMD | R Documentation |
Calculate the Earth Mover's Distance Similarity for interaction data. The similarity is defined as 1-normalized Earth Mover's Distance.
calcEMD( data, idents, ligand, receptor, nbins = 100, weighted = TRUE, min_pct = 0, max_pct = 1, drop_zero = FALSE )
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. |
nbins |
Number of bins to use for Earth Mover's Distance calculation. Default is 100. |
weighted |
Logic, compute weighted Earth Mover's Distance which will give higher weight/penalty on lowly expressed genes. Default is TRUE. |
min_pct |
Values below this percentile will be replaced with this percentile's value. Default is 0. |
max_pct |
Values above this percentile will be replaced with this percentile's value. Default is 1. |
drop_zero |
Whether to drop all the zeros in the data. Default is FALSE. |
Returns Earth Mover's Distance matrix.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.