Data loading

suppressPackageStartupMessages({
  library(SummarizedExperiment)
  library(SEtools)
  library(edgeR)
  library(DT)
  library(pheatmap)
  library(plotly)
  library(dplyr)
  library(sva)
  library(reshape2)
  library(overlapper)
  library(ggrepel)
})
source("Functions/EDC_Functions.R")
source("Functions/CriFormatted.R")
load("Data/AllSEcorrected.RData",verbose=T)
## Loading objects:
##   SEs
##   DEAs

DEGs heatmaps

fetal.chronic <- row.names(DEAs$chronic.fetal)[which((abs(DEAs$chronic.fetal$logFC.EXPO1X)>0.5 | abs(DEAs$chronic.fetal$logFC.EXPO1000X)>0.5) & DEAs$chronic.fetal$FDR<=0.05 & DEAs$chronic.fetal$logCPM>0)]


MixN_fetal_chronic <- SEs$chronic.fetal[,which(SEs$chronic.fetal$EXPO=="CNT"|SEs$chronic.fetal$EXPO=="1X" | SEs$chronic.fetal$EXPO=="1000X")]
sehm(MixN_fetal_chronic, assayName = "corrected", fetal.chronic,  do.scale = T, show_rownames = F, anno_columns = c("EXPO2"), main="Chronic fetal DEGs")

1X vs 1000X

FDRTh <- 0.05
LogFCTh <- 0.5

MixN1X <- DEAs$chronic.fetal
MixN1X$genes <- row.names(MixN1X)
MixN1X$logFC <- (MixN1X$logFC.EXPO1X)

MixN1000X <- DEAs$chronic.fetal
MixN1000X$genes <- row.names(MixN1000X)
MixN1000X$logFC <- (MixN1X$logFC.EXPO1000X)
Comp <- compareResultsFCNew(MixN1X, MixN1000X, FDRth=0.05, FCth=2^0.5, FDRceil=1e-10, logCPMth=0, FCceil=2.5, 
                              title='Comparing MixN 1X to 1000X', geneLabel=TRUE, topLab=-16)
## Warning in cor.test.default(AllRes$logFC_A, AllRes$logFC_B, method = corMethod):
## Cannot compute exact p-value with ties

Comp$Scatter


ggsave(Comp$Scatter, filename='Data/ChronicFetal/Scatter.pdf', width=10, height=10)
ggsave(Comp$Scatter, filename='Data/ChronicFetal/Scatter.png', width=10, height=10)

Neurodevelopmental Disorder Genes

load("Data/ASD.RData", verbose = T)
## Loading objects:
##   ASD
##   SFARI
##   SFARIgenes
##   NeuropsychiatricDiseases
##   PsychencodeNDD

fetal.chronic3 <- row.names(DEAs$chronic.fetal)[which(DEAs$chronic.fetal$FDR<=0.05)]
controlNeg <- row.names(DEAs$chronic.fetal)[-which(DEAs$chronic.fetal$FDR<=0.05)]

#random1 <- sample(row.names(DEAs$chronic.fetal), 10)
#random2 <- sample(row.names(DEAs$chronic.fetal), 100)
#random3 <- sample(row.names(DEAs$chronic.fetal), 1000)

fetal.chronicUp <- row.names(DEAs$chronic.fetal)[which(((DEAs$chronic.fetal$logFC.EXPO1X)>0 & (DEAs$chronic.fetal$logFC.EXPO1000X)>0) & DEAs$chronic.fetal$FDR<=0.05)]
fetal.chronicDown <- row.names(DEAs$chronic.fetal)[which(((DEAs$chronic.fetal$logFC.EXPO1X)<0 & (DEAs$chronic.fetal$logFC.EXPO1000X)<0) & DEAs$chronic.fetal$FDR<=0.05)]


#MixN <- list(fetalDEGs=fetal.chronic3, fetalDEGsUp=fetal.chronicUp, fetalDEGsDown=fetal.chronicDown,NonAffectedGenes=controlNeg)
MixN <- list(fetalDEGs=fetal.chronic3, NonAffectedGenes=controlNeg)

m <- overlapper::multintersect(ll = MixN, ll2 = ASD, universe = row.names(DEAs$chronic.fetal),two.tailed = F)

fetal.chronicLong=fetal.chronic3
save(fetal.chronic,fetal.chronicLong,file = "Data/DEGsFetalChronic.RData")
dotplot.multintersect(m, sizeRange = c(0,15), th=0.05)


ggsave(dotplot.multintersect(m, th=0.05), filename='Data/ChronicFetal/DotplotFetalNDD.pdf', width=10, height=6)

P values of the overlaps

m$prob <- round(m$prob, digits=3)
DT::datatable(m$prob)

NDD psychencode

m <- overlapper::multintersect(ll = MixN, ll2 = PsychencodeNDD, universe = row.names(DEAs$chronic.fetal),two.tailed = F)
dotplot.multintersect(m, th=0.05)


ggsave(dotplot.multintersect(m, th=0.05), filename='Data/ChronicFetal/DotplotFetalNDD.pdf', width=10, height=6)

Gene expression dysregulation of the most important NDD genes

geneStripPairEDCMix(SE = MixN_fetal_chronic,GeneSet = intersect(fetal.chronic, unlist(SFARIgenes)), printExp = FALSE, SampleColors = "Default")
## Warning: `fun.y` is deprecated. Use `fun` instead.
## Warning: `fun.ymin` is deprecated. Use `fun.min` instead.
## Warning: `fun.ymax` is deprecated. Use `fun.max` instead.

PVals <- DEAs$chronic.fetal[intersect(fetal.chronic, unlist(SFARIgenes)),]
PVals <- PVals[complete.cases(PVals), ]
PVals
##         logFC.EXPO1X logFC.EXPO1000X   logCPM         F       PValue
## RANBP17   0.42942927       0.5046568 4.315729 15.524431 1.368507e-05
## CD38     -0.07818771      -0.5136144 2.317253 10.633310 2.344008e-04
## UPF3B    -0.69780169      -0.2505012 2.220196  8.283412 1.095909e-03
## KCNJ2     0.01174969       0.6317999 2.352303  6.680355 3.403851e-03
##                 FDR
## RANBP17 0.001026474
## CD38    0.006803033
## UPF3B   0.018808919
## KCNJ2   0.038314035
  • Genes with conventional PVal > 0.05:
  • Genes with conventional PVal < 0.05:
  • Genes with conventional FDR < 0.05: RANBP17, CD38, UPF3B, KCNJ2

Gene expression dysregulation of the chronic organoids NDD-DEGs in fetal dataset

load("Data/DEGsOrganoidsChronic.RData", verbose = T)
## Loading objects:
##   org.chronic
##   org.chronicLong
geneStripPairEDCMix(SE = MixN_fetal_chronic,GeneSet = intersect(org.chronic, union(union(SFARIgenes$score1,SFARIgenes$score2),SFARIgenes$score3)), printExp = FALSE,SampleColors = "Default")
## [1] "Expression values are not available for the following genes: LMX1B CNTN5 FOXP2"
## Warning: `fun.y` is deprecated. Use `fun` instead.
## Warning: `fun.ymin` is deprecated. Use `fun.min` instead.
## Warning: `fun.ymax` is deprecated. Use `fun.max` instead.

PVals <- DEAs$chronic.fetal[intersect(org.chronic, union(union(SFARIgenes$score1,SFARIgenes$score2),SFARIgenes$score3)),]
PVals <- PVals[complete.cases(PVals), ]
PVals
##         logFC.EXPO1X logFC.EXPO1000X    logCPM         F       PValue
## SCN9A    -0.02379698     -0.22817909 4.0165210 8.5764810 0.0008975184
## CACNA1E  -0.23420581      0.01300326 0.1448921 1.0890090 0.3473611846
## SCN2A    -0.18687998     -0.07101465 0.2608272 0.3449099 0.7105950709
## SPARCL1  -0.14589917     -0.04707601 3.5113849 0.5094489 0.6050859597
## SLC6A1   -0.01639811     -0.23519283 3.7305288 2.0112246 0.1485613035
## NRXN3     0.08392746      0.01466756 6.1478405 0.7129638 0.4969681974
## CACNB2    0.21680279      0.01476147 4.0805953 4.7232387 0.0150695434
## KDM6B    -0.06400076      0.07252019 3.9159704 0.8225561 0.4473804131
## KIRREL3   0.05531668     -0.19737441 1.9492403 3.8168693 0.0313621709
##                FDR
## SCN9A   0.01661891
## CACNA1E 0.56800767
## SCN2A   0.83594250
## SPARCL1 0.76628869
## SLC6A1  0.35460420
## NRXN3   0.69077479
## CACNB2  0.09452263
## KDM6B   0.65057903
## KIRREL3 0.14465401
  • Genes with conventional PVal > 0.05: CACNA1E, SCN2A, SPARCL1, SLC6A1, NRXN3, KDM6B
  • Genes with conventional PVal < 0.05: CACNB2, KIRREL3
  • Genes with conventional FDR < 0.05: SCN9A

Gene expression dysregulation of the genes found in the acute expo

load("Data/DEGsFetalAcute.RData", verbose = T)
## Loading objects:
##   fet.acute
geneStripPairEDCMix(SE = MixN_fetal_chronic,GeneSet = intersect(fet.acute,fetal.chronic), printExp = FALSE,SampleColors = "Default")
## Warning: `fun.y` is deprecated. Use `fun` instead.
## Warning: `fun.ymin` is deprecated. Use `fun.min` instead.
## Warning: `fun.ymax` is deprecated. Use `fun.max` instead.

PVals <- DEAs$chronic.fetal[intersect(fet.acute,fetal.chronic),]
PVals <- PVals[complete.cases(PVals), ]
PVals
##       logFC.EXPO1X logFC.EXPO1000X   logCPM         F       PValue         FDR
## DHRS3   -0.7391126      -1.2919270 2.356456  8.279411 1.098918e-03 0.018828021
## LGI4    -0.6400688      -0.5527407 3.324905 14.129351 2.942914e-05 0.001699696
  • Genes with conventional PVal > 0.05:
  • Genes with conventional PVal < 0.05:
  • Genes with conventional FDR < 0.05: DHRS3, LGI4
geneStripPairEDCMix(SE = MixN_fetal_chronic,GeneSet = c("CLSTN2", "EPHB2"), printExp = FALSE,SampleColors = "Default")
## Warning: `fun.y` is deprecated. Use `fun` instead.
## Warning: `fun.ymin` is deprecated. Use `fun.min` instead.
## Warning: `fun.ymax` is deprecated. Use `fun.max` instead.

PVals <- DEAs$chronic.fetal[c("CLSTN2", "EPHB2"),]
PVals <- PVals[complete.cases(PVals), ]
PVals
##        logFC.EXPO1X logFC.EXPO1000X   logCPM         F      PValue        FDR
## CLSTN2  -0.43177041     -0.36208302 3.102171 5.3919031 0.008939188 0.06884648
## EPHB2   -0.08307527     -0.06479717 6.840971 0.5195956 0.599145992 0.76229730
  • Genes with conventional PVal > 0.05: EPHB2
  • Genes with conventional PVal < 0.05: CLSTN2
  • Genes with conventional FDR < 0.05:

Data praparation

For details on data filtering, normalization, batch correction and differential expression analysis, see here

For details on the preparation of Neurodevelopmental disorder genes, see here


Authors

Nicolò Caporale: ,

Cristina Cheroni:

Pierre-Luc Germain:

Giuseppe Testa:

Lab: http://www.testalab.eu/

‘Date: December 01, 2021’

sessionInfo()
## R version 4.0.3 (2020-10-10)
## Platform: x86_64-apple-darwin17.0 (64-bit)
## Running under: macOS Big Sur 10.16
## 
## Matrix products: default
## BLAS:   /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
## 
## 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] parallel  stats4    stats     graphics  grDevices utils     datasets 
## [8] methods   base     
## 
## other attached packages:
##  [1] ggrepel_0.9.1               overlapper_0.99.1          
##  [3] reshape2_1.4.4              sva_3.38.0                 
##  [5] BiocParallel_1.24.1         genefilter_1.72.1          
##  [7] mgcv_1.8-34                 nlme_3.1-152               
##  [9] dplyr_1.0.5                 plotly_4.9.3               
## [11] ggplot2_3.3.3               pheatmap_1.0.12            
## [13] DT_0.17                     edgeR_3.32.1               
## [15] limma_3.46.0                SEtools_1.4.0              
## [17] SummarizedExperiment_1.20.0 Biobase_2.50.0             
## [19] GenomicRanges_1.42.0        GenomeInfoDb_1.26.2        
## [21] IRanges_2.24.1              S4Vectors_0.28.1           
## [23] BiocGenerics_0.36.0         MatrixGenerics_1.2.1       
## [25] matrixStats_0.58.0         
## 
## loaded via a namespace (and not attached):
##   [1] circlize_0.4.12        plyr_1.8.6             lazyeval_0.2.2        
##   [4] shinydashboard_0.7.1   splines_4.0.3          crosstalk_1.1.1       
##   [7] digest_0.6.27          foreach_1.5.1          htmltools_0.5.1.1     
##  [10] fansi_0.4.2            magrittr_2.0.1         memoise_2.0.0         
##  [13] cluster_2.1.1          openxlsx_4.2.3         ComplexHeatmap_2.6.2  
##  [16] annotate_1.68.0        colorspace_2.0-0       blob_1.2.1            
##  [19] xfun_0.21              crayon_1.4.1           RCurl_1.98-1.2        
##  [22] jsonlite_1.7.2         survival_3.2-7         iterators_1.0.13      
##  [25] glue_1.4.2             registry_0.5-1         gtable_0.3.0          
##  [28] zlibbioc_1.36.0        XVector_0.30.0         UpSetR_1.4.0          
##  [31] GetoptLong_1.0.5       DelayedArray_0.16.1    V8_3.4.0              
##  [34] shape_1.4.5            scales_1.1.1           futile.options_1.0.1  
##  [37] DBI_1.1.1              randomcoloR_1.1.0.1    Rcpp_1.0.6            
##  [40] viridisLite_0.3.0      xtable_1.8-4           clue_0.3-58           
##  [43] bit_4.0.4              htmlwidgets_1.5.3      httr_1.4.2            
##  [46] RColorBrewer_1.1-2     ellipsis_0.3.1         farver_2.1.0          
##  [49] pkgconfig_2.0.3        XML_3.99-0.5           sass_0.3.1            
##  [52] locfit_1.5-9.4         utf8_1.2.1             labeling_0.4.2        
##  [55] tidyselect_1.1.0       rlang_0.4.10           later_1.1.0.1         
##  [58] AnnotationDbi_1.52.0   munsell_0.5.0          tools_4.0.3           
##  [61] cachem_1.0.4           generics_0.1.0         RSQLite_2.2.3         
##  [64] evaluate_0.14          stringr_1.4.0          fastmap_1.1.0         
##  [67] yaml_2.2.1             knitr_1.31             bit64_4.0.5           
##  [70] shinycssloaders_1.0.0  zip_2.1.1              purrr_0.3.4           
##  [73] mime_0.10              formatR_1.7            compiler_4.0.3        
##  [76] curl_4.3               png_0.1-7              tibble_3.1.0          
##  [79] bslib_0.2.4            stringi_1.5.3          highr_0.8             
##  [82] futile.logger_1.4.3    lattice_0.20-41        Matrix_1.3-2          
##  [85] ggsci_2.9              vctrs_0.3.7            pillar_1.5.1          
##  [88] lifecycle_1.0.0        jquerylib_0.1.3        GlobalOptions_0.1.2   
##  [91] cowplot_1.1.1          data.table_1.14.0      bitops_1.0-6          
##  [94] seriation_1.2-9        httpuv_1.5.5           R6_2.5.0              
##  [97] promises_1.2.0.1       TSP_1.1-10             gridExtra_2.3         
## [100] codetools_0.2-18       lambda.r_1.2.4         assertthat_0.2.1      
## [103] rjson_0.2.20           withr_2.4.1            GenomeInfoDbData_1.2.4
## [106] VennDiagram_1.6.20     grid_4.0.3             tidyr_1.1.3           
## [109] rmarkdown_2.7          Cairo_1.5-12.2         Rtsne_0.15            
## [112] shiny_1.6.0