get_transition_matrix: get_transition_matrix

get_transition_matrixR Documentation

get_transition_matrix

Description

The output of compute_all_transport_maps from pythonpackage WOT is a matrix. Each entry (i,j) describes the transition probability of cell i at time t towards cluster j at time t+1. From this matrix, the average of the transition probability for all the cells at time t belonging to the same cluster is computed. Finally only the entries of the resulting matrix with above threshold are kept. The row names of the final matrix are equal to level_t_plus, while the column names are equal to the levels of cluster_t.

Usage

get_transition_matrix(path, cluster_t, threshold, cells_t)

Arguments

path

Character string with the path to the folder with the outputof the function compute_all_transport_maps from pythonpackage WOT.

cluster_t

Vector with cluster assignment for cells at time t. The length is equal to the length of cells_t.

threshold

Numeric value. Only entry of the transition matrix with weight equal or above threshold are kept.

cells_t

Character vector with the name of cells at time t for which we want to obtain the transition matrix.

Value

A matrix with row names equal to level_t_plus and column names equal to the levels of cluster_t.

Author(s)

Gabriele Lubatti gabriele.lubatti@helmholtz-muenchen.de

See Also

https://broadinstitute.github.io/wot/


WOTPLY documentation built on Sept. 12, 2022, 9:05 a.m.