cal_cor_dist | R Documentation |
This function calculate the correlation between geodesic distances which refer to the relative distance of one cell to all other cell in the trajectory. The result is obtained from the mean values of choosing 0.05, 0.1, 0.15, 0.2, 0.3, 0.35, 0.4, 0.45, 0.5 percent cells as waypoints.
cal_cor_dist(model_ref, model_sim, match_result)
model_ref, model_sim |
A matrix. |
match_result |
The result generated by |
A value ranged from 0 to 1
# Check the docker status
# dynwrap::test_docker_installation(detailed = TRUE)
# Open Terminal and execute the command
# docker pull dynverse/ti_slingshot:v1.0.3
# Generate a reference data
set.seed(1)
a <- matrix(rpois(n = 2500, lambda = 2), nrow = 50)
rownames(a) <- paste0("cell_", 1:ncol(a))
colnames(a) <- paste0("gene_", 1:nrow(a))
dataset_ref <- dynwrap::wrap_expression(
counts = a,
expression = log2(a+1)
)
# Trajectory inference
#Generate a simulation data
set.seed(1)
b <- matrix(rpois(n = 2500, lambda = 1.5), nrow = 50)
rownames(b) <- paste0("fcell_", 1:ncol(b))
colnames(b) <- paste0("fgene_", 1:nrow(b))
dataset_sim <- dynwrap::wrap_expression(
counts = b,
expression = log2(b+1)
)
# Trajectory inference
# Match cells
match_result <- match_cells(ref_data = dataset_ref,
sim_data = dataset_sim)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.