install.packages("ggpubr") library(ggpubr) library(ggplot2) install.packaes("ggpubr") install.packages("ggpubr") install.packages("ggpubr") # There are binary versions available but the source versions are later: binary source needs_compilation Matrix 1.3-4 1.5-3 TRUE MatrixModels 0.5-0 0.5-1 FALSE minqa 1.2.4 1.2.5 TRUE nloptr 1.2.2.3 2.0.3 TRUE RcppEigen 0.3.3.9.1 0.3.3.9.3 TRUE quantreg 5.85 5.94 TRUE lme4 1.1-28 1.1-31 TRUE car 3.0-10 3.1-1 FALSE rstatix 0.7.0 0.7.1 FALSE ggpubr 0.4.0 0.5.0 FALSE install.packages("Matrix") save.image("~/Documents/Lowe Lab/Data/vertCons/figureDev.RData") savehistory("~/Documents/Lowe Lab/Data/vertCons/figureDev.Rhistor") savehistory("~/Documents/Lowe Lab/Data/vertCons/figureDev.Rhistory") install.packages("ggplot2") install.packages("ggplot2") install.packages("ggplot2") library(ggplot2) library(tibble) install.packages("ggpubr") install.packages("SparseM") library(ggplot2) install.packages("tidyverse") withr::with_makevars(c(OBJCXX = "gcc"), install.packages('systemfonts')) install.packages("systemfonts") remove.packages("systemfonts") install.packages("systemfonts") library(ggpubr) library(tidyverse) setwd("Documents/Lowe Lab/Data/vertCons/60way/rGraphs/") neuroPlas <- read.csv("neuronPlasticitySubgroup.tsv", header=TRUE, sep="\t") immPlas <- read.csv("innateImmPlasticitySubgroups.tsv", header=TRUE, sep="\t") muscPlas <- read.csv("musclePlasticitySubgroups.tsv", header=TRUE, sep="\t") immPlasGraph <- tibble(Type=as.factor(immPlas$CellType), MYA=as.numeric(as.character(factor(immPlas$MYA))), Enrichment=as.numeric(as.character(factor(immPlas$Z.Score)))) %>% ggplot(aes(x=MYA, y=Enrichment, group=Type, color=Type)) + geom_line() + geom_point() + geom_hline(yintercept=0, linetype="dotted", col="black") + theme_classic() + scale_x_reverse(limits=c(600,0)) + ylim=c(-4, 4) immPlasGraph <- tibble(Type=as.factor(immPlas$CellType), MYA=as.numeric(as.character(factor(immPlas$MYA))), Enrichment=as.numeric(as.character(factor(immPlas$Z.Score)))) %>% ggplot(aes(x=MYA, y=Enrichment, group=Type, color=Type)) + geom_line() + geom_point() + geom_hline(yintercept=0, linetype="dotted", col="black") + theme_classic() + scale_x_reverse(limits=c(600,0)) + ylim=c(-4, 4) immPlasGraph <- tibble(Type=as.factor(immPlas$CellType), MYA=as.numeric(as.character(factor(immPlas$MYA))), Enrichment=as.numeric(as.character(factor(immPlas$Z.Score)))) %>% ggplot(aes(x=MYA, y=Enrichment, group=Type, color=Type)) + geom_line() + geom_point() + geom_hline(yintercept=0, linetype="dotted", col="black") + theme_classic() + scale_x_reverse(limits=c(600,0)) ggpar(immPlasGraph, ylim = c(-4,4)) immPlasGraph <- tibble(Type=as.factor(immPlas$CellType), MYA=as.numeric(as.character(factor(immPlas$MYA))), Enrichment=as.numeric(as.character(factor(immPlas$Z.Score)))) %>% ggplot(aes(x=MYA, y=Enrichment, group=Type, color=Type)) + geom_line() + geom_point() + geom_hline(yintercept=0, linetype="dotted", col="black") + theme_classic() + scale_x_reverse(limits=c(600,0)) + eom_hline(yintercept=1.6, col="black") immPlasGraph <- tibble(Type=as.factor(immPlas$CellType), MYA=as.numeric(as.character(factor(immPlas$MYA))), Enrichment=as.numeric(as.character(factor(immPlas$Z.Score)))) %>% ggplot(aes(x=MYA, y=Enrichment, group=Type, color=Type)) + geom_line() + geom_point() + geom_hline(yintercept=0, linetype="dotted", col="black") + theme_classic() + scale_x_reverse(limits=c(600,0)) + geom_hline(yintercept=1.6, col="black") immPlasGraph <- tibble(Type=as.factor(immPlas$CellType), MYA=as.numeric(as.character(factor(immPlas$MYA))), Enrichment=as.numeric(as.character(factor(immPlas$Z.Score)))) %>% ggplot(aes(x=MYA, y=Enrichment, group=Type, color=Type)) + geom_line() + geom_point() + geom_hline(yintercept=0, linetype="dotted", col="black") + theme_classic() + scale_x_reverse(limits=c(600,0)) + geom_hline(yintercept=1.6, col="black") + geom_hline(yintercept=-1.6, col="black") ggpar(immPlasGraph, ylim = c(-4,4)) muscPlasGraph <- tibble(Type=as.factor(muscPlas$CellType), MYA=as.numeric(as.character(factor(muscPlas$MYA))), Enrichment=as.numeric(as.character(factor(muscPlas$Z.Score)))) %>% ggplot(aes(x=MYA, y=Enrichment, group=Type, color=Type)) + geom_line() + geom_point() + geom_hline(yintercept=1, linetype="dotted", col="black") + theme_classic() + scale_x_reverse(limits=c(600,0)) + geom_hline(yintercept=1.6, col="black") + geom_hline(yintercept=-1.6, col="black") ggpar(muscPlasGraph, ylim=c(-4,4)) neuroPlasGraph <- tibble(Type=as.factor(neuroPlas$CellType), MYA=as.numeric(as.character(factor(neuroPlas$MYA))), Enrichment=as.numeric(as.character(factor(neuroPlas$Z.Score)))) %>% ggplot(aes(x=MYA, y=Enrichment, group=Type, color=Type)) + geom_line() + geom_point() + geom_hline(yintercept=1, linetype="dotted", col="black") + theme_classic() + scale_x_reverse(limits=c(600,0)) + geom_hline(yintercept=1.6, col="black") + geom_hline(yintercept=-1.6, col="black") ggpar(neuroPlasGraph, ylim=c(-4,4)) tissPlasticity <- read.csv("tissPlasticityUpdated.tsv", header=TRUE, sep="\t") View(tissPlasticity) deathNum <- transform(tissPlasticity, tiss=as.numeric(as.factor(CTissue))) allTissues <- tibble(Type=as.factor(tissPlasticity$Tissue), Node=as.numeric(as.character(factor(tissPlasticity$MYA))), Plasticity=as.numeric(as.character(factor(tissPlasticity$Z.Score)))) %>% ggplot( aes(x=Node, y=Plasticity, group=Type, color=Type)) + + geom_line() + theme_classic() + + theme(legend.position="top", plot.title = element_text(size=16)) + + facet_wrap(~Type, scale="free_y") + geom_hline(yintercept=0, linetype="dotted", col="black") + scale_color_hue() allTissues <- tibble(Type=as.factor(tissPlasticity$Tissue), Node=as.numeric(as.character(factor(tissPlasticity$MYA))), Plasticity=as.numeric(as.character(factor(tissPlasticity$Z.Score)))) %>% ggplot( aes(x=Node, y=Plasticity, group=Type, color=Type)) + geom_line() + theme_classic() + theme(legend.position="top", plot.title = element_text(size=16)) + facet_wrap(~Type, scale="free_y") + geom_hline(yintercept=0, linetype="dotted", col="black") + scale_color_hue() ggpar(allTissues) allTissues <- tibble(Type=as.factor(tissPlasticity$Tissue), Node=as.numeric(as.character(factor(tissPlasticity$MYA))), Plasticity=as.numeric(as.character(factor(tissPlasticity$Z.Score)))) %>% ggplot( aes(x=Node, y=Plasticity, group=Type, color=Type)) + geom_line() + theme_classic() + theme(legend.position="top", plot.title = element_text(size=16)) + facet_wrap(~Type, scale="free_y") + geom_hline(yintercept=0, linetype="dotted", col="black") + scale_color_hue() + scale_x_reverse(limits=c(600,0)) + geom_hline(yintercept=1.6, col="black") + geom_hline(yintercept=-1.6, col="black") ggpar(allTissues) ggpar(allTissues, ylim=c(-4,4)) ggpar(allTissues) allTissues <- tibble(Type=as.factor(tissPlasticity$Tissue), Node=as.numeric(as.character(factor(tissPlasticity$MYA))), Plasticity=as.numeric(as.character(factor(tissPlasticity$Z.Score)))) %>% ggplot( aes(x=Node, y=Plasticity, group=Type, color=Type)) + geom_line() + theme_classic() + theme(legend.position="top", plot.title = element_text(size=16)) + facet_wrap(~Type, scale="free_y", ncol=1) + geom_hline(yintercept=0, linetype="dotted", col="black") + scale_color_hue() + scale_x_reverse(limits=c(600,0)) + geom_hline(yintercept=1.6, col="black") + geom_hline(yintercept=-1.6, col="black") ggpar(allTissues) savehistory("plasticitySubgroupAndAllTissues.Rhistory")