catcheR_pseudotime - Pseudotime ================================== Since Monocle pseudotime calculation requires interactive root cell selection, the first step must be performed manually within ``monocle3``. Step-by-step ------------ #. Load ``processed_cds.RData`` in R, then calculate pseudotime and plot it: .. code-block:: r library(monocle3) cds <- order_cells(cds) pt = as.data.frame(pseudotime(cds)) names(pt) = c("pseudotime") write.csv(pt, paste0(dir, "/pseudotime.csv")) plot_cells(cds, color_cells_by = "pseudotime", label_cell_groups = FALSE, label_leaves = FALSE, label_branch_points = FALSE, graph_label_size = 1.5) #. Your working folder should now contain: - Outputs from ``catcheR_load`` - The ``pseudotime.csv`` file created above #. Run ``catcheR_pseudotime``: .. code-block:: r catcheR_pseudotime( group = c("docker", "sudo"), folder, cds, pseudotime, all = FALSE ) **Example usage:** .. code-block:: r catcheR_pseudotime( group = "docker", folder = "/path/to/working/folder/", cds = "processed_cds.RData", pseudotime = "pseudotime.csv" ) The ``all`` argument is a logical value: - ``FALSE`` (default): compare target vs. all controls together - ``TRUE``: compare target vs. each control separately Outputs ------- The following files are generated by ``catcheR_pseudotime``: #. **cumulative_frequency_pseudotime.pdf** - Plots showing the number of cells at each pseudotime point, grouped by gene, shRNA, and clone. .. image:: cumulative_frequency_pseudotime_gene.pdf .. image:: cumulative_frequency_pseudotime_shRNA.pdf .. image:: cumulative_frequency_pseudotime_clone.pdf #. **ks_statistics_*.csv** - Kolmogorov-Smirnov test results comparing cumulative frequencies along pseudotime between knockdown and controls. #. **Volcano plots** - Visualize significance and effect size (fold change) of the Kolmogorov-Smirnov test, across different comparisons. .. image:: volcano_ks_stats_vs_control_genes_allFALSE.pdf .. image:: volcano_shRNA_ks_statistics_vscontrol_genes_allFALSE.pdf #. **correlated_pseudotime_gene_exp.pdf** - UMAP plot highlighting genes whose expression is most correlated with pseudotime. .. image:: correlated_pseudotime_gene_expX12.pdf