Runs diffusion maps and coarse-graining on a Seurat object, writes
intermediate files to disk, and launches a Python script
(gene_distance_cal_parallel.py) in the background to compute pairwise
gene EMDs via optimal transport. Results are saved to dir.path and can
be loaded with LoadGeneEMD().
ComputeGeneEMD(
srat,
common_genes,
dir.path,
script_dir = NULL,
npc = 10,
K = 10,
reduction = "dm"
)A Seurat object. Must have a normalised RNA assay.
Character vector of gene names to include in the
computation (e.g., the output of SelectCommonGenes()).
Character string. Path to the directory where intermediate and output files will be written.
Character string or NULL. Path to the directory containing
gene_distance_cal_parallel.py. If NULL (default), uses the bundled
Python script included with the package.
Integer. Number of diffusion map components to use. Default 10.
Integer. Number of nearest neighbours for the cell graph. Default 10.
Character string. Name of the dimensionality reduction to
use when computing graph distances. Default "dm".
Invisibly returns NULL. Results are written to dir.path.
if (FALSE) {
ComputeGeneEMD(srat, common_genes, dir.path = "results/emd/")
}