First compiled: October 3, 2017.
suppressMessages(library(monocle))
df <- read.csv('./write/nestorowa16_171011_raw/X.csv', header=F)
df_anno <- read.csv('./write/nestorowa16_171011/smp.csv', header=T)
cds <- newCellDataSet(t(as.matrix(df)), phenoData = new("AnnotatedDataFrame", data = df_anno))
groups_colors <- as.vector(read.csv('./write/nestorowa16_171011/add/aga_groups_colors.csv', header=F)$V1)
groups_order <- as.vector(read.csv('./write/nestorowa16_171011/add/aga_groups_order.csv', header=F)$V1)
names(groups_colors) = groups_order
previous_time <- proc.time()[3]
cds2 <- reduceDimension(cds, verbose = F, max_components = 10)
cds2 <- orderCells(cds2)
proc.time()[3] - previous_time
Warning message in if (reduction_method == "DPT") {: “the condition has length > 1 and only the first element will be used”
plot_complex_cell_trajectory(cds2, color_by = 'State', show_branch_points = T,
cell_size = 0.8, cell_link_size = 0.3, root_states = c(3))
Choose the root state that best matches the stem cell cluster 18. It's state 3.
plot_complex_cell_trajectory(cds2, color_by = 'as.factor(aga_groups)', show_branch_points = T,
cell_size = 0.8, cell_link_size = 0.3, root_states = c(3)) + scale_color_manual(values = groups_colors)
previous_time <- proc.time()[3]
cds3 <- reduceDimension(cds, verbose = F, max_components = 4)
cds3 <- orderCells(cds2)
proc.time()[3] - previous_time
Warning message in if (reduction_method == "DPT") {: “the condition has length > 1 and only the first element will be used”
plot_complex_cell_trajectory(cds3, color_by = 'as.factor(aga_groups)', show_branch_points = T,
cell_size = 0.8, cell_link_size = 0.3, root_states = c(1)) + scale_color_manual(values = groups_colors)
sessionInfo()
R version 3.3.2 (2016-10-31) Platform: x86_64-apple-darwin13.4.0 (64-bit) Running under: macOS Sierra 10.12.5 locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] splines stats4 parallel stats graphics grDevices utils [8] datasets methods base other attached packages: [1] destiny_2.0.8 dplyr_0.7.1 plyr_1.8.4 [4] monocle_2.2.0 L1Graph_0.1.0 lpSolveAPI_5.5.2.0-17 [7] simplePPT_0.1.0 igraph_1.0.1 DDRTree_0.1.5 [10] irlba_2.2.1 VGAM_1.0-3 ggplot2_2.2.1 [13] Biobase_2.34.0 BiocGenerics_0.20.0 Matrix_1.2-10 loaded via a namespace (and not attached): [1] nlme_3.1-131 matrixStats_0.52.2 pbkrtest_0.4-7 [4] xts_0.9-7 RColorBrewer_1.1-2 repr_0.12.0 [7] tools_3.3.2 backports_1.1.0 R6_2.2.2 [10] rpart_4.1-11 Hmisc_4.0-3 lazyeval_0.2.0 [13] mgcv_1.8-17 colorspace_1.3-2 nnet_7.3-12 [16] sp_1.2-5 smoother_1.1 gridExtra_2.2.1 [19] quantreg_5.33 htmlTable_1.9 Cairo_1.5-9 [22] SparseM_1.77 labeling_0.3 slam_0.1-40 [25] scales_0.4.1 checkmate_1.8.2 DEoptimR_1.0-8 [28] lmtest_0.9-35 robustbase_0.92-7 proxy_0.4-17 [31] pbdZMQ_0.2-6 stringr_1.2.0 digest_0.6.12 [34] foreign_0.8-69 minqa_1.2.4 base64enc_0.1-3 [37] pkgconfig_2.0.1 htmltools_0.3.6 lme4_1.1-13 [40] limma_3.30.13 TTR_0.23-1 htmlwidgets_0.8 [43] rlang_0.1.1 FNN_1.1 bindr_0.1 [46] zoo_1.8-0 combinat_0.0-8 jsonlite_1.5 [49] acepack_1.4.1 car_2.1-4 magrittr_1.5 [52] Formula_1.2-1 Rcpp_0.12.11 IRkernel_0.8.6.9000 [55] munsell_0.4.3 scatterplot3d_0.3-40 stringi_1.1.5 [58] MASS_7.3-47 Rtsne_0.13 grid_3.3.2 [61] crayon_1.3.2 lattice_0.20-35 IRdisplay_0.4.4 [64] knitr_1.16 uuid_0.1-2 boot_1.3-19 [67] reshape2_1.4.2 glue_1.1.1 evaluate_0.10.1 [70] latticeExtra_0.6-28 data.table_1.10.4 laeken_0.4.6 [73] vcd_1.4-3 nloptr_1.0.4 MatrixModels_0.4-1 [76] VIM_4.7.0 gtable_0.2.0 assertthat_0.2.0 [79] RcppEigen_0.3.3.3.0 e1071_1.6-8 class_7.3-14 [82] survival_2.41-3 qlcMatrix_0.9.5 HSMMSingleCell_0.108.0 [85] tibble_1.3.3 pheatmap_1.0.8 bindrcpp_0.2 [88] cluster_2.0.6 fastICA_1.2-1 densityClust_0.2.1