pGRN package pre-loaded with pGRNDB data with both of expression matrix and pseudotime information. You can simply load this data by calling pGRNDB.
# loading pGRN packagelibrary(pGRN)# loading pre-build dataexample_data <- pGRNDBnames(example_data)## [1] "expression" "ptime"expression_matrix <- example_data[["expression"]]pseudotime_list <- example_data[["ptime"]]$PseudoTimeCurrently, two methods “DTW” and “granger” were available for pGRN network construction.
# try DTW methodnets_dtw <- pGRN(expression_matrix,pseudotime_list, method= "DTW",quantile_cutoff=50)# try granger methodnets_gg <- pGRN(expression_matrix,pseudotime_list, method= "granger")## Time relapsed for granger test: 1.6192889213562 seconds!pGRN provides methods for visualize the network either stationary or interactively.
# plot network stationarilyplot_network(nets_dtw[[1]])plot_network(nets_gg[[1]])# plot network interactively#plot_network_i(nets_dtw[[1]])#plot_network_i(nets_gg[[1]])