WOTPLY (Waddington-OT analysis PLot) is an R package that shows the connections between selected clusters from the latest time point and the clusters from all the previous time points. The transition matrices between time point t and t+1 are obtained from Waddington-OT analysis (python package wot).
You can install the development version from GitHub with:
devtools::install_github("ScialdoneLab/WOTPLY", ref="main")
The main function of the package is WOTPLY
WOTPLY(list_transition_matrices, selected_stages, cluster_label, time_label, legend_time, customize_color, top_link = NULL)
requires as input:
A ggnet2 plot is generated showing the connections between selected_stages from the latest time point and the clusters from previous time points . The number of columns is equal to the numbers of time points. In each column, the cluster of the corresponding time point is shown as network node. The weight of the links between clusters at time points t and t+1 refelect the weigth of the transition probabilities from list_transition_matrices.
Below an example of input using the development version of WOTPLY from GitHub The analysis performed on a single cell RNA seq dataset from a time-course of iPS reprogramming. The data are from day 10, day 12, day 14, day 16 and day 18 from Schiebinger et al. 2019. Below the transition matrices bewteen time points t and t+1 are loaded. Each matrix is the output of get_transition_matrix and was built starting from compute_all_transport_maps function from pyhton package wot). See ?get_transition_matrix for more info.
load(system.file("extdata", "cluster_label_example.Rda", package = "WOTPLY")) load(system.file("extdata", "example_day_10_12.Rda", package = "WOTPLY")) load(system.file("extdata", "example_day_12_14.Rda", package = "WOTPLY")) load(system.file("extdata", "example_day_14_16.Rda", package = "WOTPLY")) load(system.file("extdata", "example_day_16_18.Rda", package = "WOTPLY"))
list_transition_matrices_example <- list(example_day_10_12,example_day_12_14,example_day_14_16,example_day_16_18) selected_stages <- c("IPS","Trophoblast","Epithelial","STROMAL","NEURAL") legend_time_example <- c("day_10","day_12","day_14","day_16","day_18") customize_color <- WOTPLY:::gg_color_hue(length(levels(factor(cluster_label_example))))
The output of WOTPLY function shows the connections between selected_stages from the latest time point and the clusters from previous time points. The number of columns is equal to the numbers of time points. In each column, the cluster of the corresponding time point is shown as network node. The weight of the links between clusters at time points t and t+1 refelects the weigth of the transition probabilities from list_transition_matrices. It is possible to change the maximum number of links to select between clusters at time t and clusters at time t+1. Links are sorted according to the weigth and then only the top_link are kept. If NULL (default), all the links are kept.
WOTPLY(list_transition_matrices_example, selected_stages, cluster_label_example, legend_time_example, customize_color, top_link = NULL)
WOTPLY(list_transition_matrices_example, selected_stages, cluster_label_example, legend_time_example, customize_color, top_link = 3)
The following vignette is available and completely reproducible.
It can be accessed within R with:
utils::vignette("WOTPLY_vignette")Contributions and Support
Contributions in the form of feedback, comments, code and bug report are welcome.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4