library(Seurat)
library(scrattch.hicat)
library(monocle)
library(Matrix)
library(dplyr)
library(RColorBrewer)
library(ggplot2)
library(ggExtra)
library(cowplot)
library(wesanderson)
library(MoMAColors)
library(princurve)
#Set ggplot theme as classic
theme_set(theme_classic())
<- readRDS("Pidd1KO.cells.RDS")
Pidd1.data
DimPlot(object = Pidd1.data,
group.by = "Cell.ident",
reduction = "spring",
cols = c("grey40","#4cabdc","#046c9a", "#7293c8", "#31b6bd", "#ebcb2e", "#9ec22f", "#a9961b", "#cc3a1b", wes_palette("FantasticFox1")),
pt.size = 0.5) & NoAxes()
<- subset(Pidd1.data,
Neurons.data subset = Cell.ident %in% c("Progenitors_Hem", "Differentiating_CRs", "Neurons_Cajal-Retzius"))
DimPlot(object = Neurons.data,
group.by = "Cell.ident",
reduction = "spring",
cols = c("#4cabdc", "#7293c8","#cc3a1b"),
pt.size = 0.5) & NoAxes()
<- SCTransform(Neurons.data,
Neurons.data method = "glmGamPoi",
vars.to.regress = c("percent.mito", "CC.Difference", "nCount_RNA"),
verbose = T)
##
|
| | 0%
|
|================== | 25%
|
|=================================== | 50%
|
|==================================================== | 75%
|
|======================================================================| 100%
##
|
| | 0%
|
|== | 3%
|
|==== | 6%
|
|======= | 9%
|
|========= | 12%
|
|=========== | 16%
|
|============= | 19%
|
|=============== | 22%
|
|================== | 25%
|
|==================== | 28%
|
|====================== | 31%
|
|======================== | 34%
|
|========================== | 38%
|
|============================ | 41%
|
|=============================== | 44%
|
|================================= | 47%
|
|=================================== | 50%
|
|===================================== | 53%
|
|======================================= | 56%
|
|========================================== | 59%
|
|============================================ | 62%
|
|============================================== | 66%
|
|================================================ | 69%
|
|================================================== | 72%
|
|==================================================== | 75%
|
|======================================================= | 78%
|
|========================================================= | 81%
|
|=========================================================== | 84%
|
|============================================================= | 88%
|
|=============================================================== | 91%
|
|================================================================== | 94%
|
|==================================================================== | 97%
|
|======================================================================| 100%
##
|
| | 0%
|
|== | 3%
|
|==== | 6%
|
|======= | 9%
|
|========= | 12%
|
|=========== | 16%
|
|============= | 19%
|
|=============== | 22%
|
|================== | 25%
|
|==================== | 28%
|
|====================== | 31%
|
|======================== | 34%
|
|========================== | 38%
|
|============================ | 41%
|
|=============================== | 44%
|
|================================= | 47%
|
|=================================== | 50%
|
|===================================== | 53%
|
|======================================= | 56%
|
|========================================== | 59%
|
|============================================ | 62%
|
|============================================== | 66%
|
|================================================ | 69%
|
|================================================== | 72%
|
|==================================================== | 75%
|
|======================================================= | 78%
|
|========================================================= | 81%
|
|=========================================================== | 84%
|
|============================================================= | 88%
|
|=============================================================== | 91%
|
|================================================================== | 94%
|
|==================================================================== | 97%
|
|======================================================================| 100%
<- FindVariableFeatures(Neurons.data, selection.method = "vst", nfeatures = 1000) Neurons.data
<- RunPCA(Neurons.data, features = VariableFeatures(Neurons.data)[!VariableFeatures(Neurons.data) %in% c("eYFP", "Pidd1")] , verbose = FALSE)
Neurons.data
<- RunUMAP(Neurons.data, dims = 1:5) Neurons.data
DimPlot(object = Neurons.data,
group.by = "Cell.ident",
reduction = "umap",
cols = c("#4cabdc", "#7293c8","#cc3a1b"),
pt.size = 0.5) & NoAxes()
DimPlot(object = Neurons.data,
group.by = "Genotype",
reduction = "umap",
cols = c("#7293c8", "#cc3a1b"),
pt.size = 1) & NoAxes()
FeaturePlot(object = Neurons.data,
features = c("Gmnc", "AI593442", "Trp73", "Top2a", "Pcna", "Dll1"),
pt.size = 0.5,
cols = c("grey90", brewer.pal(9,"YlGnBu")),
reduction = "umap",
order = T) & NoAxes() & NoLegend()
<- principal_curve(as.matrix(Neurons.data@meta.data[,c("AP_signature1", "BP_signature1", "EN_signature1", "LN_signature1")]),
fit smoother='lowess',
trace=TRUE,
f = 1,
stretch=0)
## Starting curve---distance^2: 247832.2
## Iteration 1---distance^2: 191.8651
## Iteration 2---distance^2: 172.381
## Iteration 3---distance^2: 164.9822
## Iteration 4---distance^2: 161.6177
## Iteration 5---distance^2: 159.781
## Iteration 6---distance^2: 158.8637
## Iteration 7---distance^2: 158.7367
<- fit$lambda/max(fit$lambda)
PseudotimeScore
if (cor(PseudotimeScore, Neurons.data@assays$RNA@data['Hmga2', ]) > 0) {
$PseudotimeScore <- -(PseudotimeScore - max(PseudotimeScore))
Neurons.data }
FeaturePlot(object = Neurons.data,
features = "PseudotimeScore",
pt.size = 1.5,
split.by = "Genotype",
cols = rev(brewer.pal(n =11, name = "Spectral")),
reduction = "umap",
order = T) & NoAxes()
<- NormalizeData(Neurons.data, assay = "RNA", normalization.method = "LogNormalize", scale.factor = 10000)
Neurons.data saveRDS(Neurons.data, "CR.Traj.Pidd1KO.RDS")
# Define functions
<- function (Dataset, gene, show.pt = T, x.intercept = NULL)
Plot.gene.trend
{<- data.frame(Genotype = as.character(Dataset@meta.data$Genotype), Pseudotime = Dataset@meta.data$PseudotimeScore)
data $Gene <- Dataset@assays[["RNA"]]@data[gene, ]
data<- ggplot(data = data, aes(x = Pseudotime, y = Gene, color = Genotype)) +
p geom_point(size=1, alpha = ifelse(show.pt == T, 0.5, 0)) +
scale_color_manual(values = moma.colors("Althoff", 6)[c(5,2)]) +
geom_smooth(method = "loess", n = 30, size = 2) +
ggtitle(gene) +
ylim(0, NA) +
theme(legend.position = "none",
panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
panel.background = element_blank(),
axis.ticks.x = element_blank(),
axis.text.x = element_blank(),
axis.title.y = element_blank(),
axis.line = element_line(size = 1))
if (!is.null(x.intercept)) {
<- p + geom_vline(xintercept = x.intercept, colour = "red",
p linetype = 2)
}return(p)
}
<- function (Dataset, genes, show.pt=T, x.intercept = NULL)
Plot.genes.trend
{<- mapply(FUN = Plot.gene.trend, gene = genes, MoreArgs = list(Dataset = Dataset,
pList show.pt = show.pt, x.intercept = x.intercept), SIMPLIFY = FALSE)
print(x = cowplot::plot_grid(plotlist = pList, ncol = 3))
}
Plot.gene.trend(Neurons.data, "Trp73")
Plot.genes.trend(Neurons.data, c("Pidd1", "eYFP", "Hrk"))
Plot.genes.trend(Neurons.data, rownames(read.table("WT.Gene.dynamique.csv", header = T))[1:9])
Plot.genes.trend(Neurons.data, rownames(read.table("WT.Gene.dynamique.csv", header = T))[10:18])
Plot.genes.trend(Neurons.data, rownames(read.table("WT.Gene.dynamique.csv", header = T))[19:27])
Plot.genes.trend(Neurons.data, rownames(read.table("WT.Gene.dynamique.csv", header = T))[28:36])
Plot.genes.trend(Neurons.data, rownames(read.table("WT.Gene.dynamique.csv", header = T))[37:39])
Plot.genes.trend(Neurons.data, rownames(read.table("KO.Gene.dynamique.csv", header = T))[1:9])
Plot.genes.trend(Neurons.data, rownames(read.table("KO.Gene.dynamique.csv", header = T))[10:18])
Plot.genes.trend(Neurons.data, rownames(read.table("KO.Gene.dynamique.csv", header = T))[19:27])
Plot.genes.trend(Neurons.data, rownames(read.table("KO.Gene.dynamique.csv", header = T))[28:34])
<- SetIdent(Neurons.data, value = Neurons.data@meta.data$Cell.ident)
Neurons.data <- FindMarkers(Neurons.data, subset.ident = "Neurons_Cajal-Retzius", group.by = "Genotype", ident.1 = "Pidd1.KO")
KO.DEG
Plot.genes.trend(Neurons.data, rownames(KO.DEG)[1:9])
Plot.genes.trend(Neurons.data, rownames(KO.DEG)[10:18])
Plot.genes.trend(Neurons.data, rownames(KO.DEG)[19:27])
Plot.genes.trend(Neurons.data, rownames(KO.DEG)[28:36])
Plot.genes.trend(Neurons.data, rownames(KO.DEG)[37:45])
Plot.genes.trend(Neurons.data, rownames(KO.DEG)[46:54])
Plot.genes.trend(Neurons.data, rownames(KO.DEG)[55:63])
Plot.genes.trend(Neurons.data, rownames(KO.DEG)[64:72])
Plot.genes.trend(Neurons.data, rownames(KO.DEG)[73:81])
#date
format(Sys.time(), "%d %B, %Y, %H,%M")
## [1] "05 November, 2023, 01,20"
#Packages used
sessionInfo()
## R version 4.1.1 (2021-08-10)
## Platform: x86_64-conda-linux-gnu (64-bit)
## Running under: CentOS Linux 7 (Core)
##
## Matrix products: default
## BLAS/LAPACK: /shared/ifbstor1/software/miniconda/envs/r-4.1.1/lib/libopenblasp-r0.3.18.so
##
## locale:
## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
## [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
## [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
## [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
## [9] LC_ADDRESS=C LC_TELEPHONE=C
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
##
## attached base packages:
## [1] splines stats4 stats graphics grDevices utils datasets
## [8] methods base
##
## other attached packages:
## [1] princurve_2.1.6 MoMAColors_0.0.0.9000 wesanderson_0.3.6
## [4] cowplot_1.1.1 ggExtra_0.9 RColorBrewer_1.1-3
## [7] dplyr_1.0.10 monocle_2.22.0 DDRTree_0.1.5
## [10] irlba_2.3.5.1 VGAM_1.1-5 ggplot2_3.3.6
## [13] Biobase_2.54.0 BiocGenerics_0.40.0 Matrix_1.3-4
## [16] scrattch.hicat_1.0.0 sp_1.4-7 SeuratObject_4.1.0
## [19] Seurat_4.1.1
##
## loaded via a namespace (and not attached):
## [1] plyr_1.8.7 igraph_1.3.1 lazyeval_0.2.2
## [4] densityClust_0.3 listenv_0.8.0 scattermore_0.8
## [7] fastICA_1.2-3 digest_0.6.30 htmltools_0.5.2
## [10] viridis_0.6.2 fansi_1.0.3 magrittr_2.0.3
## [13] tensor_1.5 cluster_2.1.2 ROCR_1.0-11
## [16] limma_3.50.0 globals_0.14.0 matrixStats_0.62.0
## [19] docopt_0.7.1 spatstat.sparse_2.1-1 colorspace_2.0-3
## [22] ggrepel_0.9.1 xfun_0.34 rgdal_1.5-23
## [25] crayon_1.5.2 sparsesvd_0.2 jsonlite_1.8.2
## [28] progressr_0.10.0 spatstat.data_2.2-0 survival_3.2-13
## [31] zoo_1.8-10 glue_1.6.2 polyclip_1.10-0
## [34] gtable_0.3.1 leiden_0.3.10 future.apply_1.9.0
## [37] abind_1.4-5 scales_1.2.1 pheatmap_1.0.12
## [40] DBI_1.1.2 spatstat.random_2.2-0 miniUI_0.1.1.1
## [43] Rcpp_1.0.9 viridisLite_0.4.1 xtable_1.8-4
## [46] reticulate_1.24 spatstat.core_2.4-2 htmlwidgets_1.5.4
## [49] httr_1.4.4 FNN_1.1.3.1 ellipsis_0.3.2
## [52] ica_1.0-2 farver_2.1.1 pkgconfig_2.0.3
## [55] sass_0.4.1 uwot_0.1.11 deldir_1.0-6
## [58] utf8_1.2.2 labeling_0.4.2 tidyselect_1.2.0
## [61] rlang_1.0.6 reshape2_1.4.4 later_1.3.0
## [64] munsell_0.5.0 tools_4.1.1 cli_3.4.1
## [67] generics_0.1.3 ggridges_0.5.3 evaluate_0.17
## [70] stringr_1.4.1 fastmap_1.1.0 yaml_2.3.6
## [73] goftest_1.2-3 knitr_1.40 fitdistrplus_1.1-8
## [76] purrr_0.3.5 RANN_2.6.1 pbapply_1.5-0
## [79] future_1.25.0 nlme_3.1-153 mime_0.12
## [82] slam_0.1-49 compiler_4.1.1 rstudioapi_0.13
## [85] plotly_4.10.0 png_0.1-7 spatstat.utils_2.3-0
## [88] tibble_3.1.8 bslib_0.3.1 stringi_1.7.8
## [91] highr_0.9 rgeos_0.5-9 lattice_0.20-45
## [94] HSMMSingleCell_1.14.0 vctrs_0.4.2 pillar_1.8.1
## [97] lifecycle_1.0.3 spatstat.geom_2.4-0 combinat_0.0-8
## [100] lmtest_0.9-40 jquerylib_0.1.4 RcppAnnoy_0.0.19
## [103] data.table_1.14.2 httpuv_1.6.5 patchwork_1.1.1
## [106] R6_2.5.1 promises_1.2.0.1 KernSmooth_2.23-20
## [109] gridExtra_2.3 parallelly_1.31.1 codetools_0.2-18
## [112] MASS_7.3-54 assertthat_0.2.1 ggstream_0.1.0
## [115] withr_2.5.0 qlcMatrix_0.9.7 sctransform_0.3.3
## [118] mgcv_1.8-38 parallel_4.1.1 grid_4.1.1
## [121] rpart_4.1-15 tidyr_1.2.1 rmarkdown_2.11
## [124] Rtsne_0.16 shiny_1.7.1
IPNP & Imagine Institute, Paris, France, frederic.causeret@inserm.fr↩︎