First compiled: August 17, 2017.
suppressMessages(library(monocle))
Here, we load the data that we exported in robustness.ipynb.
df <- read.csv('./data/krumsiek11_blobs/X.csv', header=F)
df_anno <- read.csv('./data/krumsiek11_blobs/smp.csv', header=T)
groups_colors <- as.vector(read.csv('data/krumsiek11_blobs/add/aga_groups_colors.csv', header=F)$V1)
names(groups_colors) = c(0:(length(groups_colors)-1))
cds <- newCellDataSet(t(as.matrix(df)), phenoData = new("AnnotatedDataFrame", data = df_anno))
We try to reconstruct the tree with different combinations of parameters.
previous_time <- proc.time()[3]
cds2 <- reduceDimension(cds, verbose = F, max_components = 2)
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”
Coloring using the reference clustering "groups".
plot_complex_cell_trajectory(cds2, color_by = 'as.factor(aga_groups)', show_branch_points = T,
cell_size = 0.5, cell_link_size = 0.3, root_states = c(0)) + scale_color_manual(values = groups_colors)
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”Warning message in irlba::irlba(C, nv = L, v = initial_v): “You're computing too large a percentage of total singular values, use a standard svd instead.”Warning message in irlba(C, nv = L, v = initial_v): “You're computing too large a percentage of total singular values, use a standard svd instead.”Warning message in irlba(C, nv = L, v = initial_v): “did not converge--results might be invlaid!; try increasing maxit or fastpath=FALSE”Warning message in irlba::irlba(C, nv = L, v = initial_v): “You're computing too large a percentage of total singular values, use a standard svd instead.”Warning message in irlba(C, nv = L, v = initial_v): “You're computing too large a percentage of total singular values, use a standard svd instead.”Warning message in irlba(C, nv = L, v = initial_v): “did not converge--results might be invlaid!; try increasing maxit or fastpath=FALSE”Warning message in irlba::irlba(C, nv = L, v = initial_v): “You're computing too large a percentage of total singular values, use a standard svd instead.”Warning message in irlba(C, nv = L, v = initial_v): “You're computing too large a percentage of total singular values, use a standard svd instead.”Warning message in irlba(C, nv = L, v = initial_v): “did not converge--results might be invlaid!; try increasing maxit or fastpath=FALSE”Warning message in irlba::irlba(C, nv = L, v = initial_v): “You're computing too large a percentage of total singular values, use a standard svd instead.”Warning message in irlba(C, nv = L, v = initial_v): “You're computing too large a percentage of total singular values, use a standard svd instead.”Warning message in irlba(C, nv = L, v = initial_v): “did not converge--results might be invlaid!; try increasing maxit or fastpath=FALSE”Warning message in irlba::irlba(C, nv = L, v = initial_v): “You're computing too large a percentage of total singular values, use a standard svd instead.”Warning message in irlba(C, nv = L, v = initial_v): “You're computing too large a percentage of total singular values, use a standard svd instead.”Warning message in irlba(C, nv = L, v = initial_v): “did not converge--results might be invlaid!; try increasing maxit or fastpath=FALSE”Warning message in irlba::irlba(C, nv = L, v = initial_v): “You're computing too large a percentage of total singular values, use a standard svd instead.”Warning message in irlba::irlba(C, nv = L, v = initial_v): “did not converge--results might be invlaid!; try increasing maxit or fastpath=FALSE”Warning message in irlba(C, nv = L, v = initial_v): “You're computing too large a percentage of total singular values, use a standard svd instead.”Warning message in irlba(C, nv = L, v = initial_v): “did not converge--results might be invlaid!; try increasing maxit or fastpath=FALSE”Warning message in irlba::irlba(C, nv = L, v = initial_v): “You're computing too large a percentage of total singular values, use a standard svd instead.”Warning message in irlba(C, nv = L, v = initial_v): “You're computing too large a percentage of total singular values, use a standard svd instead.”Warning message in irlba(C, nv = L, v = initial_v): “did not converge--results might be invlaid!; try increasing maxit or fastpath=FALSE”Warning message in irlba::irlba(C, nv = L, v = initial_v): “You're computing too large a percentage of total singular values, use a standard svd instead.”Warning message in irlba::irlba(C, nv = L, v = initial_v): “did not converge--results might be invlaid!; try increasing maxit or fastpath=FALSE”Warning message in irlba(C, nv = L, v = initial_v): “You're computing too large a percentage of total singular values, use a standard svd instead.”Warning message in irlba(C, nv = L, v = initial_v): “did not converge--results might be invlaid!; try increasing maxit or fastpath=FALSE”
plot_complex_cell_trajectory(cds2, color_by = 'as.factor(aga_groups)', show_branch_points = T,
cell_size = 0.5, cell_link_size = 0.3, root_states = c(0)) + scale_color_manual(values = groups_colors)
df <- read.csv('./data/krumsiek11/X.csv', header=F)
df_anno <- read.csv('./data/krumsiek11/smp.csv', header=T)
groups_colors <- as.vector(read.csv('data/krumsiek11/add/groups_colors.csv', header=F)$V1)
names(groups_colors) = c(0:(length(groups_colors)-1))
cds <- newCellDataSet(t(as.matrix(df)), phenoData = new("AnnotatedDataFrame", data = df_anno))
previous_time <- proc.time()[3]
cds2 <- reduceDimension(cds, verbose = F, max_components = 2)
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 = 'as.factor(groups)', show_branch_points = T,
cell_size = 0.5, cell_link_size = 0.3, root_states = c(0)) + scale_color_manual(values = groups_colors)
previous_time <- proc.time()[3]
cds2 <- reduceDimension(cds, verbose = F, max_components = 5)
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 = 'as.factor(groups)', show_branch_points = T,
cell_size = 0.5, cell_link_size = 0.3, root_states = c(0)) + 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.6 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] monocle_2.2.0 L1Graph_0.1.0 lpSolveAPI_5.5.2.0-17 [4] simplePPT_0.1.0 igraph_1.0.1 DDRTree_0.1.5 [7] irlba_2.2.1 VGAM_1.0-3 ggplot2_2.2.1 [10] Biobase_2.34.0 BiocGenerics_0.20.0 Matrix_1.2-10 loaded via a namespace (and not attached): [1] pbdZMQ_0.2-6 slam_0.1-40 repr_0.12.0 [4] reshape2_1.4.2 lattice_0.20-35 colorspace_1.3-2 [7] fastICA_1.2-1 rlang_0.1.1 glue_1.1.1 [10] RColorBrewer_1.1-2 HSMMSingleCell_0.108.0 bindrcpp_0.2 [13] uuid_0.1-2 matrixStats_0.52.2 plyr_1.8.4 [16] bindr_0.1 stringr_1.2.0 munsell_0.4.3 [19] combinat_0.0-8 gtable_0.2.0 evaluate_0.10.1 [22] labeling_0.3 Cairo_1.5-9 IRdisplay_0.4.4 [25] Rcpp_0.12.11 scales_0.4.1 limma_3.30.13 [28] IRkernel_0.8.6.9000 densityClust_0.2.1 jsonlite_1.5 [31] digest_0.6.12 stringi_1.1.5 Rtsne_0.13 [34] qlcMatrix_0.9.5 dplyr_0.7.1 grid_3.3.2 [37] tools_3.3.2 magrittr_1.5 proxy_0.4-17 [40] lazyeval_0.2.0 tibble_1.3.3 cluster_2.0.6 [43] crayon_1.3.2 pkgconfig_2.0.1 pheatmap_1.0.8 [46] assertthat_0.2.0 R6_2.2.2