calculate_traj_metrics | R Documentation |
Calculate Four Metrics to Compare Two Trajectories
calculate_traj_metrics(model_ref, model_sim, algorithm)
model_ref, model_sim |
The object generated by |
algorithm |
Optional. Which algorithm used for matching cells in simulated and real data. Improved_Hungarian (default), Hungarian. |
A list containing the results of four metrics.
# Check the docker status
# dynwrap::test_docker_installation(detailed = TRUE)
# 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)
)
#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)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.