monocle-release icon indicating copy to clipboard operation
monocle-release copied to clipboard

Differential gene expression analysis between two not neighboring states Monocle 2

Open McStber opened this issue 4 years ago • 0 comments

Hello guys,

Case:

I am analyzing a dataset of CD45+ T cells and created with Monocle 2 a trajectory tree. Then I detected that one cell type is present in two specific states.

Aim:

I would like to do a statistical test using the BEAM function to check which genes are differentially expressed between the branches/states 3 and 5.

Here first the trajectory tree with cells colored based on CellType: image

And here the tree with States (1-5): image

Questions:

I would like to see which genes are differentially expressed between cells of state 3 and state 5.

  1. Is that possible since they are separated by 2 branch points and not close to each other?!
  2. Is it even possible with BEAM() or differentialGeneTest() to analyze these two states 3 and 5?

What I already tried:

Unfortunately, one can select only one branchpoint but I still tried it with specifying the states in BEAM():

BEAM_res <- BEAM(object_cds, fullModelFormulaStr = "~sm.ns(Pseudotime, df = 3)*Branch", reducedModelFormulaStr = "~sm.ns(Pseudotime, df = 3)", branch_states = c('3', '5'), branch_point = 1, relative_expr = TRUE, branch_labels = NULL, verbose = TRUE, cores = 1)

BEAM_res <- BEAM_res[order(BEAM_res$qval),]

BEAM_res <- BEAM_res[,c("gene_short_name", "pval", "qval")]

Then I run the lot_genes_branched_heatmap() command:

plot_genes_branched_heatmap(SubClLymphocytes_OnlyMyeloids_cds[row.names(subset(BEAM_res))], branch_states = c('3', '5'), branch_labels = c("State 3", "State 5"), branch_point = 1, num_clusters = 4, branch_colors = c("#000000", "#24B700", "#F962DD"), cores = 1, use_gene_short_name = T, show_rownames = T)

I received a plot but its way too big to be really investigated in PDF file:

image

Does anyone already passed through such a similar situation and could give me an advice?? That would be so nice!!

Best regards, McStber

This is my sessionInfo: sessionInfo() R version 4.0.3 (2020-10-10) Platform: x86_64-pc-linux-gnu (64-bit) Running under: CentOS Linux 7 (Core)

Matrix products: default BLAS: /code/R/4.0.3/lib64/R/lib/libRblas.so LAPACK: /code/R/4.0.3/lib64/R/lib/libRlapack.so

locale: [1] en_US.UTF-8

attached base packages: [1] splines stats4 parallel stats graphics grDevices utils datasets methods base

other attached packages: [1] monocle_2.18.0 DDRTree_0.1.5 irlba_2.3.3 VGAM_1.1-5 Biobase_2.50.0 [6] BiocGenerics_0.36.0 umap_0.2.7.0 ggplot2_3.3.3 cowplot_1.1.1 networkD3_0.4 [11] tidyr_1.1.2 devtools_2.3.2 usethis_2.0.0 Matrix_1.3-2 dplyr_1.0.3 [16] knitr_1.30 Seurat_3.9.9.9026

loaded via a namespace (and not attached): [1] plyr_1.8.6 igraph_1.2.6 lazyeval_0.2.2 densityClust_0.3
[5] listenv_0.8.0 scattermore_0.7 fastICA_1.2-2 digest_0.6.27
[9] htmltools_0.5.1.1 viridis_0.5.1 fansi_0.4.2 magrittr_2.0.1
[13] memoise_1.1.0 tensor_1.5 cluster_2.1.0 ROCR_1.0-11
[17] limma_3.46.0 remotes_2.2.0 globals_0.14.0 matrixStats_0.57.0
[21] docopt_0.7.1 askpass_1.1 prettyunits_1.1.1 colorspace_2.0-0
[25] ggrepel_0.9.1 xfun_0.20 sparsesvd_0.2 callr_3.5.1
[29] crayon_1.3.4 jsonlite_1.7.2 spatstat_1.64-1 spatstat.data_1.7-0
[33] survival_3.2-7 zoo_1.8-8 glue_1.4.2 polyclip_1.10-0
[37] gtable_0.3.0 leiden_0.3.6 pkgbuild_1.2.0 future.apply_1.7.0
[41] abind_1.4-5 scales_1.1.1 pheatmap_1.0.12 DBI_1.1.1
[45] miniUI_0.1.1.1 Rcpp_1.0.6 viridisLite_0.3.0 xtable_1.8-4
[49] reticulate_1.18 rsvd_1.0.3 htmlwidgets_1.5.3 httr_1.4.2
[53] FNN_1.1.3 RColorBrewer_1.1-2 ellipsis_0.3.1 ica_1.0-2
[57] farver_2.0.3 pkgconfig_2.0.3 uwot_0.1.10 deldir_0.2-9
[61] labeling_0.4.2 tidyselect_1.1.0 rlang_0.4.10 reshape2_1.4.4
[65] later_1.1.0.1 munsell_0.5.0 tools_4.0.3 cli_2.2.0
[69] generics_0.1.0 ggridges_0.5.3 stringr_1.4.0 fastmap_1.1.0
[73] goftest_1.2-2 processx_3.4.5 fs_1.5.0 fitdistrplus_1.1-3
[77] purrr_0.3.4 RANN_2.6.1 pbapply_1.4-3 future_1.21.0
[81] nlme_3.1-151 mime_0.9 slam_0.1-48 compiler_4.0.3
[85] rstudioapi_0.13 plotly_4.9.3 png_0.1-7 testthat_3.0.1
[89] spatstat.utils_2.0-0 tibble_3.0.5 stringi_1.5.3 ps_1.5.0
[93] RSpectra_0.16-0 desc_1.2.0 lattice_0.20-41 HSMMSingleCell_1.10.0 [97] vctrs_0.3.6 pillar_1.4.7 lifecycle_0.2.0 combinat_0.0-8
[101] lmtest_0.9-38 RcppAnnoy_0.0.18 data.table_1.13.6 httpuv_1.5.5
[105] patchwork_1.1.1 R6_2.5.0 promises_1.1.1 KernSmooth_2.23-18
[109] gridExtra_2.3 parallelly_1.23.0 sessioninfo_1.1.1 codetools_0.2-18
[113] MASS_7.3-53 assertthat_0.2.1 pkgload_1.1.0 openssl_1.4.3
[117] rprojroot_2.0.2 withr_2.4.0 qlcMatrix_0.9.7 sctransform_0.3.2
[121] mgcv_1.8-33 grid_4.0.3 rpart_4.1-15 Rtsne_0.15
[125] shiny_1.6.0 tinytex_0.29

McStber avatar Jan 28 '21 15:01 McStber