Last update: 2018-01-18

Code version: 5996c19850dc5fc65723f30bc33ab1c8d083a7e6


Setting important directories.

Also loading important libraries and custom functions for analysis.

seq_dir <- "/Volumes/PAULHOOK/sc-da-parkinsons/data"
file_dir <- "/Volumes/PAULHOOK/sc-da-parkinsons/output"
Rdata_dir <- "/Volumes/PAULHOOK/sc-da-parkinsons/data"
Script_dir <- "/Volumes/PAULHOOK/sc-da-parkinsons/code"
source(file.path(Script_dir,'init.R'))
source(file.path(Script_dir,"tools_R.r"))

#loading any special libraries
library(readr)
library(cowplot)
theme <- theme(axis.title.x = element_blank(),
        axis.text.x = element_blank(),
        axis.ticks.x = element_blank(),
        axis.title.y = element_text(family="Helvetica",size=8),
        axis.text.y = element_text(size=6),
        strip.text = element_text(family="Helvetica",face="bold.italic",size=10))
P7.Fb.dat.filter <- readRDS(file.path(Rdata_dir,"P7.Fb.dat.filter.final.Rds"))
P7.Ob.dat.filter <- readRDS(file.path(Rdata_dir,"P7.Ob.dat.filter.final.Rds"))
e15.dat.filter <- readRDS(file.path(Rdata_dir,"e15.dat.filter.final.rds"))
e15.Fb.dat.filter <- readRDS(file.path(Rdata_dir,"e15.Fb.dat.filter.final.rds"))
e15.Mb.dat.filter <- readRDS(file.path(Rdata_dir,"e15.Mb.dat.filter.final.rds"))
color.all <- c("#F6937A","#882F1C","#BF1F36","#C2B280","#F2C318","#E790AC","#F18421","#0168A5","#848483","#A4CAEB","#885793","#008957","#222222")
color.P7 <- c("#F2C318","#E790AC","#F18421","#0168A5","#848483","#A4CAEB","#885793","#008957","#222222")

Figure S3A

Plotting E15.5 t-SNE results colored by regional identity as well as subset cluster identity

#t-SNE plot colored by region
r <- myTSNEPlotAlpha(e15.dat.filter,color="region", shape="age") +
  scale_color_brewer(palette="Set1", name = "Region") +
  xlab("t-SNE 1") + ylab("t-SNE 2") +
  theme(legend.position = "bottom",
        axis.line = element_line(colour = "black"),
        plot.title = element_text(hjust = 0.5),
        axis.title = element_text(family='Helvetica',size=12)) +
  coord_fixed(ratio = 1) + guides(shape=FALSE) 

#t-SNE plot colored by subset cluster
c <- myTSNEPlotAlpha(e15.dat.filter,color="subset.cluster", shape="age") + scale_color_manual(values=color.all[1:4], name = "Subset Cluster") +
  xlab("t-SNE 1") +
  theme(legend.position = "bottom", 
        axis.line = element_line(colour = "black"),
        plot.title = element_text(hjust = 0.5),
        axis.title.y=element_blank(),
        axis.title = element_text(family='Helvetica',size=12)) +
  coord_fixed(ratio = 1) + guides(shape=FALSE)

# Plotting these in a grid
plot_grid(r,c,nrow = 1,ncol = 2)

# Writing out to PDF
pdf(file = file.path(file_dir, "Figure.S3A.pdf"), width = 7, height = 6)
r
c
dev.off()
## quartz_off_screen 
##                 2

Figure S3B

#t-SNE plot colored by region
s3b <- myTSNEPlotAlpha(e15.Fb.dat.filter,color="kmeans_tSNE_cluster", shape="age") + scale_color_manual(values=color.all[1:2], name = "Subset Cluster") +
  xlab("t-SNE 1") + ylab("t-SNE 2") +
  theme(legend.position = "bottom", 
        axis.line = element_line(colour = "black"),
        plot.title = element_text(hjust = 0.5),
        axis.title = element_text(family='Helvetica',size=10)) +
  coord_fixed(ratio = 1) + guides(shape=FALSE) +
  annotate('text',x=-180,y=325,label="Post-mitotic FB\nTh+ neurons",fontface=2,size=3) +
  annotate('text',x=-250,y=-275,label="FB neuroblast",fontface=2,size=3)

pdf(file = file.path(file_dir, "Figure.S3B.pdf"), height = 5, width = 5)
s3b
dev.off()
## quartz_off_screen 
##                 2
s3b

Figure S3C

#t-SNE plot colored by region
s3c <- myTSNEPlotAlpha(e15.Mb.dat.filter,color="kmeans_tSNE_cluster", shape="age") + scale_color_manual(values=color.all[3:4], name = "Subset Cluster") +
  xlab("t-SNE 1") + ylab("t-SNE 2") +
  theme(legend.position = "bottom", 
        axis.line = element_line(colour = "black"),
        plot.title = element_text(hjust = 0.5),
        axis.title = element_text(family='Helvetica',size=10)) +
  coord_fixed(ratio = 1) + guides(shape=FALSE) +
  annotate('text',x=150,y=225,label="MB neuroblast",fontface=2,size=3) +
  annotate('text',x=100,y=-250,label="Post-mitotic MB\nDA neurons",fontface=2,size=3)

pdf(file = file.path(file_dir, "Figure.S3C.pdf"), height = 5, width = 5)
s3c
dev.off()
## quartz_off_screen 
##                 2
s3c

Figure S3D

one <- myBoxplot.cluster(P7.Fb.dat.filter, "Onecut2", logMode = T) + scale_fill_manual(values = color.P7[1:2], name = "P7 FB Cluster") + theme 

arx <- myBoxplot.cluster(P7.Fb.dat.filter, "Arx", logMode = T) + scale_fill_manual(values = color.P7[1:2], name = "P7 FB Cluster") + scale_y_continuous(breaks = c(0,1,2,3)) + theme

prlr <- myBoxplot.cluster(P7.Fb.dat.filter, "Prlr", logMode = T) + scale_fill_manual(values = color.P7[1:2], name = "P7 FB Cluster") + scale_y_continuous(breaks = c(0,1,2,3)) + theme

slc <- myBoxplot.cluster(P7.Fb.dat.filter, "Slc6a3", logMode = T) + scale_fill_manual(values = color.P7[1:2], name = "P7 FB Cluster") + theme

sst <- myBoxplot.cluster(P7.Fb.dat.filter, "Sst", logMode = T) + scale_fill_manual(values = color.P7[1:2], name = "P7 FB Cluster") + scale_y_continuous(breaks = c(0,2,4,6,8)) + theme

grid_arrange_shared_legend(one,arx,prlr,slc,sst,ncol=1,nrow=5, position = "bottom")

pdf(file = file.path(file_dir, "Figure.S3D.pdf"), height = 2, width = 4)
one
arx
prlr
slc
sst
dev.off()
## quartz_off_screen 
##                 2

Figure S3E

pax <- myBoxplot.cluster(P7.Ob.dat.filter, "Pax6", logMode = T) + scale_fill_manual(values = color.P7[7:9], name = "P7 OB Cluster") + theme

meis <- myBoxplot.cluster(P7.Ob.dat.filter, "Meis2", logMode = T) + scale_fill_manual(values = color.P7[7:9], name = "P7 OB Cluster") + theme

nr <- myBoxplot.cluster(P7.Ob.dat.filter, "Nr4a2", logMode = T) + scale_fill_manual(values = color.P7[7:9], name = "P7 OB Cluster") + theme

slc6 <- myBoxplot.cluster(P7.Ob.dat.filter, "Slc6a3", logMode = T) + scale_fill_manual(values = color.P7[7:9], name = "P7 OB Cluster") + theme

slc18 <- myBoxplot.cluster(P7.Ob.dat.filter, "Slc18a2", logMode = T) + scale_fill_manual(values = color.P7[7:9], name = "P7 OB Cluster") + theme

th <- myBoxplot.cluster(P7.Ob.dat.filter, "Th", logMode = T) + scale_fill_manual(values = color.P7[7:9], name = "P7 OB Cluster") + theme

ddc <- myBoxplot.cluster(P7.Ob.dat.filter, "Ddc", logMode = T) + scale_fill_manual(values = color.P7[7:9], name = "P7 OB Cluster")  + theme

snap <- myBoxplot.cluster(P7.Ob.dat.filter, "Snap25", logMode = T) + scale_fill_manual(values = color.P7[7:9], name = "P7 OB Cluster") + theme

dcx <- myBoxplot.cluster(P7.Ob.dat.filter, "Dcx", logMode = T) + scale_fill_manual(values = color.P7[7:9], name = "P7 OB Cluster") + theme

grid_arrange_shared_legend(dcx,th,snap,ddc,pax,slc18,meis,slc6,nr,ncol=2,nrow=5, position = "bottom")

pdf(file = file.path(file_dir, "Figure.S3E.pdf"), height = 2, width = 4)
dcx
snap
pax
meis
nr
th
ddc
slc18
slc6
dev.off()
## quartz_off_screen 
##                 2

Session Info

sessionInfo()
## R version 3.3.0 (2016-05-03)
## Platform: x86_64-apple-darwin13.4.0 (64-bit)
## Running under: OS X 10.11.6 (El Capitan)
## 
## 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] grid      splines   stats4    parallel  stats     graphics  grDevices
##  [8] utils     datasets  methods   base     
## 
## other attached packages:
##  [1] cowplot_0.9.2       readr_1.1.1         ggbiplot_0.55      
##  [4] scales_0.5.0        SC3_1.1.4           ROCR_1.0-7         
##  [7] jackstraw_1.1.1     lfa_1.2.2           tsne_0.1-3         
## [10] gridExtra_2.3       slackr_1.4.2        vegan_2.4-4        
## [13] permute_0.9-4       MASS_7.3-47         gplots_3.0.1       
## [16] RColorBrewer_1.1-2  Hmisc_4.0-3         Formula_1.2-2      
## [19] survival_2.41-3     lattice_0.20-35     Heatplus_2.18.0    
## [22] Rtsne_0.13          pheatmap_1.0.8      tidyr_0.7.1        
## [25] dplyr_0.7.4         plyr_1.8.4          heatmap.plus_1.3   
## [28] stringr_1.2.0       marray_1.50.0       limma_3.28.21      
## [31] reshape2_1.4.3      monocle_2.2.0       DDRTree_0.1.5      
## [34] irlba_2.2.1         VGAM_1.0-2          ggplot2_2.2.1      
## [37] Biobase_2.32.0      BiocGenerics_0.18.0 Matrix_1.2-11      
## 
## loaded via a namespace (and not attached):
##  [1] RSelenium_1.7.1        colorspace_1.3-2       class_7.3-14          
##  [4] rprojroot_1.2          htmlTable_1.9          corpcor_1.6.9         
##  [7] base64enc_0.1-3        mvtnorm_1.0-6          codetools_0.2-15      
## [10] doParallel_1.0.11      robustbase_0.92-7      knitr_1.17            
## [13] jsonlite_1.5           cluster_2.0.6          semver_0.2.0          
## [16] shiny_1.0.5            rrcov_1.4-3            httr_1.3.1            
## [19] backports_1.1.1        assertthat_0.2.0       lazyeval_0.2.1        
## [22] acepack_1.4.1          htmltools_0.3.6        tools_3.3.0           
## [25] bindrcpp_0.2           igraph_1.1.2           gtable_0.2.0          
## [28] glue_1.1.1             binman_0.1.0           doRNG_1.6.6           
## [31] Rcpp_0.12.14           slam_0.1-37            gdata_2.18.0          
## [34] nlme_3.1-131           iterators_1.0.8        mime_0.5              
## [37] rngtools_1.2.4         gtools_3.5.0           WriteXLS_4.0.0        
## [40] XML_3.98-1.9           DEoptimR_1.0-8         hms_0.3               
## [43] yaml_2.1.15            pkgmaker_0.22          rpart_4.1-11          
## [46] fastICA_1.2-1          latticeExtra_0.6-28    stringi_1.1.5         
## [49] pcaPP_1.9-72           foreach_1.4.3          e1071_1.6-8           
## [52] checkmate_1.8.4        caTools_1.17.1         rlang_0.1.6           
## [55] pkgconfig_2.0.1        matrixStats_0.52.2     bitops_1.0-6          
## [58] qlcMatrix_0.9.5        evaluate_0.10.1        purrr_0.2.4           
## [61] bindr_0.1              labeling_0.3           htmlwidgets_0.9       
## [64] magrittr_1.5           R6_2.2.2               combinat_0.0-8        
## [67] wdman_0.2.2            foreign_0.8-69         mgcv_1.8-22           
## [70] nnet_7.3-12            tibble_1.3.4           KernSmooth_2.23-15    
## [73] rmarkdown_1.8          data.table_1.10.4      HSMMSingleCell_0.106.2
## [76] digest_0.6.12          xtable_1.8-2           httpuv_1.3.5          
## [79] openssl_0.9.7          munsell_0.4.3          registry_0.3

This R Markdown site was created with workflowr