source("http://bioconductor.org/biocLite.R")
biocLite( "BSgenome" )
library(pwr)
?
pwr.t.test
pwr.t.test(n = NULL, d = 2, sig.level = 0.05, power = 0.8,
type = "two.sample",alternative = "two.sided")
pwr.t.test(n = NULL, d = 2, sig.level = 0.05, power = 0.9,
type = "two.sample",alternative = "two.sided")
pwr.t.test(n = NULL, d = 1.5, sig.level = 0.05, power = 0.9,
type = "two.sample",alternative = "two.sided")
pwr.t.test(n = NULL, d = 2, sig.level = 0.05, power = 0.95,
type = "two.sample",alternative = "two.sided")
pwr.t.test(n = NULL, d = 1.5, sig.level = 0.05, power = 0.95,
type = "two.sample",alternative = "two.sided")
pwr.t.test(n = NULL, d = 0.15, sig.level = 0.05, power = 0.80,
type = "two.sample",alternative = "two.sided")
pwr.t.test(n = 5, d = 2, sig.level = 0.05, power = NULL,
type = "two.sample",alternative = "two.sided")
pwr.t.test(n = 5, d = NULL, sig.level = 0.05, power = 0.8,
type = "two.sample",alternative = "two.sided")
pwr.t.test(n = 5, d = NULL, sig.level = 0.05, power = 0.95,
type = "two.sample",alternative = "two.sided")
devtools::install_github("catavallejos/BASiCS", build_vignettes = TRUE)
library(devtools)
source("http://bioconductor.org/biocLite.R")
biocLite("BiocGenerics")
devtools::install_github("catavallejos/BASiCS", build_vignettes = TRUE)
biocLite("scran")
require(devtools)
devtools::install_github('hms-dbmi/scde', build_vignettes = FALSE)
setwd('/Volumes/MyBook_5a/RNAseq_datasets_for_Deconvolution/Process_for_deconvolution/CiBERSORT_plotting')
library('pheatmap')
# 2017-03-07
# try to implement clean figure readin plotting of cibersort
ciber.training <- read.csv('../2017-01-18/Training_CIBERSORT.Output_Job43.csv',row.names=1)
ciber.liver <- read.csv('../2017-01-18/Liver_CIBERSORT.Output_Job47.csv',row.names=1)
ciber.heart <- read.csv('../2017-01-18/Heart_CIBERSORT.Output_Job48.csv',row.names=1)
ciber.NPCs <- read.csv('../2017-01-18/NPCs_CIBERSORT.Output_Job46.csv',row.names=1)
ciber.OB <- read.csv('../2017-01-18/OB_CIBERSORT.Output_Job45.csv',row.names=1)
ciber.Cereb <- read.csv('../2017-01-18/Cerebellum_Cerebellum_CIBERSORT.Output_Job44.csv',row.names=1)
ciber.mix <- read.csv('../InSilicoMixtures/Mixtures_CIBERSORT.Output_Job49.csv',row.names=1)
colnames(ciber.liver)
# [1] "Input.Sample"        "Adipocytes"          "aNSCs"               "Astrocytes"          "Endothelial_cells"   "Erythrocytes"        "Granulocytes"
# [8] "Macrophages"         "Microglia"           "Monocytes"           "Neurons"             "NK_cells"            "NPCs"                "Oligodendrocytes"
# [15] "qNSCs"               "T_cells"             "Cardiomyocytes"      "Hepatocytes"         "B_cells"             "Cardiac_Fibroblasts" "Dermal_Fibroblasts"
# [22] "Ependymal"           "P.value"             "Pearson.Correlation" "RMSE"
my.cell.cols.order <- c("Cardiomyocytes",
"Hepatocytes",
"aNSCs","NPCs","qNSCs",
"Astrocytes","Oligodendrocytes","Neurons","Ependymal",
"Cardiac_Fibroblasts", "Dermal_Fibroblasts" ,
"Monocytes","Macrophages","Microglia","Granulocytes",
"B_cells","T_cells","NK_cells",
"Endothelial_cells",
"Adipocytes",
"Erythrocytes"
)
ciber.liver$age <- factor(c(rep("3m",3),rep("12m",3),rep("29m",3)))
ciber.heart$age <- factor(c(rep("3m",3),rep("12m",3),rep("29m",3)))
ciber.NPCs$age <- factor(c(rep("3m",2),rep("12m",2),rep("29m",2)))
ciber.OB$age <- factor(c(rep("3m",3),rep("12m",2),rep("29m",3)))
ciber.Cereb$age <- factor(c(rep("3m",3),rep("12m",3),rep("29m",3)))
my.cols <- c("coral","blueviolet","dodgerblue")
colnames(ciber.Cereb)
pdf("CIBERSORT_B_cells_beeswarm.pdf", width = 9, height = 6)
par(mfrow=c(2,3))
beeswarm(B_cells ~ age, data = ciber.Cereb,pch = 16, col = my.cols, cex = 2, main = "Cerebellum", ylim = c(0,0.05))
beeswarm(B_cells ~ age, data = ciber.heart,pch = 16, col = my.cols, cex = 2, main = "Heart", ylim = c(0,0.05))
beeswarm(B_cells ~ age, data = ciber.liver,pch = 16, col = my.cols, cex = 2, main = "Liver", ylim = c(0,0.05))
beeswarm(B_cells ~ age, data = ciber.OB,pch = 16, col = my.cols, cex = 2, main = "Olfactory Bulb", ylim = c(0,0.05))
beeswarm(B_cells ~ age, data = ciber.NPCs, pch = 16, col = my.cols, cex = 2, main = "NPCs", ylim = c(0,0.05))
par(mfrow=c(1,1))
dev.off()
pdf("CIBERSORT_T_cells_beeswarm.pdf", width = 9, height = 6)
par(mfrow=c(2,3))
beeswarm(T_cells ~ age, data = ciber.Cereb,pch = 16, col = my.cols, cex = 2, main = "Cerebellum", ylim = c(0,0.05))
beeswarm(T_cells ~ age, data = ciber.heart,pch = 16, col = my.cols, cex = 2, main = "Heart", ylim = c(0,0.05))
beeswarm(T_cells ~ age, data = ciber.liver,pch = 16, col = my.cols, cex = 2, main = "Liver", ylim = c(0,0.05))
beeswarm(T_cells ~ age, data = ciber.OB,pch = 16, col = my.cols, cex = 2, main = "Olfactory Bulb", ylim = c(0,0.05))
beeswarm(T_cells ~ age, data = ciber.NPCs, pch = 16, col = my.cols, cex = 2, main = "NPCs", ylim = c(0,0.05))
par(mfrow=c(1,1))
dev.off()
pdf("CIBERSORT_NK_cells_beeswarm.pdf", width = 9, height = 6)
par(mfrow=c(2,3))
beeswarm(NK_cells ~ age, data = ciber.Cereb,pch = 16, col = my.cols, cex = 2, main = "Cerebellum", ylim = c(0,0.05))
beeswarm(NK_cells ~ age, data = ciber.heart,pch = 16, col = my.cols, cex = 2, main = "Heart", ylim = c(0,0.05))
beeswarm(NK_cells ~ age, data = ciber.liver,pch = 16, col = my.cols, cex = 2, main = "Liver", ylim = c(0,0.05))
beeswarm(NK_cells ~ age, data = ciber.OB,pch = 16, col = my.cols, cex = 2, main = "Olfactory Bulb", ylim = c(0,0.05))
beeswarm(NK_cells ~ age, data = ciber.NPCs, pch = 16, col = my.cols, cex = 2, main = "NPCs", ylim = c(0,0.05))
par(mfrow=c(1,1))
dev.off()
pdf("CIBERSORT_Fibroblasts_beeswarm.pdf", width = 9, height = 6)
par(mfrow=c(2,3))
beeswarm(Cardiac_Fibroblasts + Dermal_Fibroblasts ~ age, data = ciber.Cereb,pch = 16, col = my.cols, cex = 2, main = "Cerebellum", ylim = c(0,0.05))
beeswarm(Cardiac_Fibroblasts + Dermal_Fibroblasts ~ age, data = ciber.heart,pch = 16, col = my.cols, cex = 2, main = "Heart", ylim = c(0,0.05))
beeswarm(Cardiac_Fibroblasts + Dermal_Fibroblasts ~ age, data = ciber.liver,pch = 16, col = my.cols, cex = 2, main = "Liver", ylim = c(0,0.05))
beeswarm(Cardiac_Fibroblasts + Dermal_Fibroblasts ~ age, data = ciber.OB,pch = 16, col = my.cols, cex = 2, main = "Olfactory Bulb", ylim = c(0,0.05))
beeswarm(Cardiac_Fibroblasts + Dermal_Fibroblasts ~ age, data = ciber.NPCs, pch = 16, col = my.cols, cex = 2, main = "NPCs", ylim = c(0,0.05))
par(mfrow=c(1,1))
dev.off()
library('beeswarm')
my.cols <- c("coral","blueviolet","dodgerblue")
pdf("CIBERSORT_B_cells_beeswarm.pdf", width = 9, height = 6)
par(mfrow=c(2,3))
beeswarm(B_cells ~ age, data = ciber.Cereb,pch = 16, col = my.cols, cex = 2, main = "Cerebellum", ylim = c(0,0.05))
beeswarm(B_cells ~ age, data = ciber.heart,pch = 16, col = my.cols, cex = 2, main = "Heart", ylim = c(0,0.05))
beeswarm(B_cells ~ age, data = ciber.liver,pch = 16, col = my.cols, cex = 2, main = "Liver", ylim = c(0,0.05))
beeswarm(B_cells ~ age, data = ciber.OB,pch = 16, col = my.cols, cex = 2, main = "Olfactory Bulb", ylim = c(0,0.05))
beeswarm(B_cells ~ age, data = ciber.NPCs, pch = 16, col = my.cols, cex = 2, main = "NPCs", ylim = c(0,0.05))
par(mfrow=c(1,1))
dev.off()
pdf("CIBERSORT_T_cells_beeswarm.pdf", width = 9, height = 6)
par(mfrow=c(2,3))
beeswarm(T_cells ~ age, data = ciber.Cereb,pch = 16, col = my.cols, cex = 2, main = "Cerebellum", ylim = c(0,0.05))
beeswarm(T_cells ~ age, data = ciber.heart,pch = 16, col = my.cols, cex = 2, main = "Heart", ylim = c(0,0.05))
beeswarm(T_cells ~ age, data = ciber.liver,pch = 16, col = my.cols, cex = 2, main = "Liver", ylim = c(0,0.05))
beeswarm(T_cells ~ age, data = ciber.OB,pch = 16, col = my.cols, cex = 2, main = "Olfactory Bulb", ylim = c(0,0.05))
beeswarm(T_cells ~ age, data = ciber.NPCs, pch = 16, col = my.cols, cex = 2, main = "NPCs", ylim = c(0,0.05))
par(mfrow=c(1,1))
dev.off()
pdf("CIBERSORT_NK_cells_beeswarm.pdf", width = 9, height = 6)
par(mfrow=c(2,3))
beeswarm(NK_cells ~ age, data = ciber.Cereb,pch = 16, col = my.cols, cex = 2, main = "Cerebellum", ylim = c(0,0.05))
beeswarm(NK_cells ~ age, data = ciber.heart,pch = 16, col = my.cols, cex = 2, main = "Heart", ylim = c(0,0.05))
beeswarm(NK_cells ~ age, data = ciber.liver,pch = 16, col = my.cols, cex = 2, main = "Liver", ylim = c(0,0.05))
beeswarm(NK_cells ~ age, data = ciber.OB,pch = 16, col = my.cols, cex = 2, main = "Olfactory Bulb", ylim = c(0,0.05))
beeswarm(NK_cells ~ age, data = ciber.NPCs, pch = 16, col = my.cols, cex = 2, main = "NPCs", ylim = c(0,0.05))
par(mfrow=c(1,1))
dev.off()
pdf("CIBERSORT_Fibroblasts_beeswarm.pdf", width = 9, height = 6)
par(mfrow=c(2,3))
beeswarm(Cardiac_Fibroblasts + Dermal_Fibroblasts ~ age, data = ciber.Cereb,pch = 16, col = my.cols, cex = 2, main = "Cerebellum", ylim = c(0,0.05))
beeswarm(Cardiac_Fibroblasts + Dermal_Fibroblasts ~ age, data = ciber.heart,pch = 16, col = my.cols, cex = 2, main = "Heart", ylim = c(0,0.05))
beeswarm(Cardiac_Fibroblasts + Dermal_Fibroblasts ~ age, data = ciber.liver,pch = 16, col = my.cols, cex = 2, main = "Liver", ylim = c(0,0.05))
beeswarm(Cardiac_Fibroblasts + Dermal_Fibroblasts ~ age, data = ciber.OB,pch = 16, col = my.cols, cex = 2, main = "Olfactory Bulb", ylim = c(0,0.05))
beeswarm(Cardiac_Fibroblasts + Dermal_Fibroblasts ~ age, data = ciber.NPCs, pch = 16, col = my.cols, cex = 2, main = "NPCs", ylim = c(0,0.05))
par(mfrow=c(1,1))
dev.off()
ciber.Cereb
pdf("CIBERSORT_B_cells_beeswarm.pdf", width = 9, height = 6)
par(mfrow=c(2,3))
beeswarm(B_cells ~ age, data = ciber.Cereb,pch = 16, col = my.cols, cex = 2, main = "Cerebellum", ylim = c(0,0.005))
beeswarm(B_cells ~ age, data = ciber.heart,pch = 16, col = my.cols, cex = 2, main = "Heart", ylim = c(0,0.005))
beeswarm(B_cells ~ age, data = ciber.liver,pch = 16, col = my.cols, cex = 2, main = "Liver", ylim = c(0,0.005))
beeswarm(B_cells ~ age, data = ciber.OB,pch = 16, col = my.cols, cex = 2, main = "Olfactory Bulb", ylim = c(0,0.005))
beeswarm(B_cells ~ age, data = ciber.NPCs, pch = 16, col = my.cols, cex = 2, main = "NPCs", ylim = c(0,0.005))
par(mfrow=c(1,1))
dev.off()
pdf("CIBERSORT_T_cells_beeswarm.pdf", width = 9, height = 6)
par(mfrow=c(2,3))
beeswarm(T_cells ~ age, data = ciber.Cereb,pch = 16, col = my.cols, cex = 2, main = "Cerebellum", ylim = c(0,0.005))
beeswarm(T_cells ~ age, data = ciber.heart,pch = 16, col = my.cols, cex = 2, main = "Heart", ylim = c(0,0.005))
beeswarm(T_cells ~ age, data = ciber.liver,pch = 16, col = my.cols, cex = 2, main = "Liver", ylim = c(0,0.005))
beeswarm(T_cells ~ age, data = ciber.OB,pch = 16, col = my.cols, cex = 2, main = "Olfactory Bulb", ylim = c(0,0.005))
beeswarm(T_cells ~ age, data = ciber.NPCs, pch = 16, col = my.cols, cex = 2, main = "NPCs", ylim = c(0,0.005))
par(mfrow=c(1,1))
dev.off()
pdf("CIBERSORT_NK_cells_beeswarm.pdf", width = 9, height = 6)
par(mfrow=c(2,3))
beeswarm(NK_cells ~ age, data = ciber.Cereb,pch = 16, col = my.cols, cex = 2, main = "Cerebellum", ylim = c(0,0.005))
beeswarm(NK_cells ~ age, data = ciber.heart,pch = 16, col = my.cols, cex = 2, main = "Heart", ylim = c(0,0.005))
beeswarm(NK_cells ~ age, data = ciber.liver,pch = 16, col = my.cols, cex = 2, main = "Liver", ylim = c(0,0.005))
beeswarm(NK_cells ~ age, data = ciber.OB,pch = 16, col = my.cols, cex = 2, main = "Olfactory Bulb", ylim = c(0,0.005))
beeswarm(NK_cells ~ age, data = ciber.NPCs, pch = 16, col = my.cols, cex = 2, main = "NPCs", ylim = c(0,0.005))
par(mfrow=c(1,1))
dev.off()
ciber.NPCs
pdf("CIBERSORT_B_cells_beeswarm.pdf", width = 9, height = 6)
par(mfrow=c(2,3))
beeswarm(B_cells ~ age, data = ciber.Cereb,pch = 16, col = my.cols, cex = 2, main = "Cerebellum", ylim = c(0,0.005))
beeswarm(B_cells ~ age, data = ciber.heart,pch = 16, col = my.cols, cex = 2, main = "Heart", ylim = c(0,0.005))
beeswarm(B_cells ~ age, data = ciber.liver,pch = 16, col = my.cols, cex = 2, main = "Liver", ylim = c(0,0.005))
beeswarm(B_cells ~ age, data = ciber.OB,pch = 16, col = my.cols, cex = 2, main = "Olfactory Bulb", ylim = c(0,0.005))
beeswarm(B_cells ~ age, data = ciber.NPCs, pch = 16, col = my.cols, cex = 2, main = "NPCs", ylim = c(0,0.025))
par(mfrow=c(1,1))
dev.off()
pdf("CIBERSORT_T_cells_beeswarm.pdf", width = 9, height = 6)
par(mfrow=c(2,3))
beeswarm(T_cells ~ age, data = ciber.Cereb,pch = 16, col = my.cols, cex = 2, main = "Cerebellum", ylim = c(0,0.005))
beeswarm(T_cells ~ age, data = ciber.heart,pch = 16, col = my.cols, cex = 2, main = "Heart", ylim = c(0,0.005))
beeswarm(T_cells ~ age, data = ciber.liver,pch = 16, col = my.cols, cex = 2, main = "Liver", ylim = c(0,0.005))
beeswarm(T_cells ~ age, data = ciber.OB,pch = 16, col = my.cols, cex = 2, main = "Olfactory Bulb", ylim = c(0,0.005))
beeswarm(T_cells ~ age, data = ciber.NPCs, pch = 16, col = my.cols, cex = 2, main = "NPCs", ylim = c(0,0.005))
par(mfrow=c(1,1))
dev.off()
pdf("CIBERSORT_NK_cells_beeswarm.pdf", width = 9, height = 6)
par(mfrow=c(2,3))
beeswarm(NK_cells ~ age, data = ciber.Cereb,pch = 16, col = my.cols, cex = 2, main = "Cerebellum", ylim = c(0,0.005))
beeswarm(NK_cells ~ age, data = ciber.heart,pch = 16, col = my.cols, cex = 2, main = "Heart", ylim = c(0,0.005))
beeswarm(NK_cells ~ age, data = ciber.liver,pch = 16, col = my.cols, cex = 2, main = "Liver", ylim = c(0,0.005))
beeswarm(NK_cells ~ age, data = ciber.OB,pch = 16, col = my.cols, cex = 2, main = "Olfactory Bulb", ylim = c(0,0.005))
beeswarm(NK_cells ~ age, data = ciber.NPCs, pch = 16, col = my.cols, cex = 2, main = "NPCs", ylim = c(0,0.005))
par(mfrow=c(1,1))
dev.off()
pdf("CIBERSORT_B_cells_beeswarm.pdf", width = 9, height = 6)
par(mfrow=c(2,3))
beeswarm(B_cells ~ age, data = ciber.Cereb,pch = 16, col = my.cols, cex = 2, main = "Cerebellum", ylim = c(0,0.005))
beeswarm(B_cells ~ age, data = ciber.heart,pch = 16, col = my.cols, cex = 2, main = "Heart", ylim = c(0,0.005))
beeswarm(B_cells ~ age, data = ciber.liver,pch = 16, col = my.cols, cex = 2, main = "Liver", ylim = c(0,0.005))
beeswarm(B_cells ~ age, data = ciber.OB,pch = 16, col = my.cols, cex = 2, main = "Olfactory Bulb", ylim = c(0,0.005))
beeswarm(B_cells ~ age, data = ciber.NPCs, pch = 16, col = my.cols, cex = 2, main = "NPCs", ylim = c(0,0.025))
par(mfrow=c(1,1))
dev.off()
dev.off()
pdf("CIBERSORT_B_cells_beeswarm.pdf", width = 9, height = 6)
par(mfrow=c(2,3))
beeswarm(B_cells ~ age, data = ciber.Cereb,pch = 16, col = my.cols, cex = 2, main = "Cerebellum", ylim = c(0,0.005))
beeswarm(B_cells ~ age, data = ciber.heart,pch = 16, col = my.cols, cex = 2, main = "Heart", ylim = c(0,0.005))
beeswarm(B_cells ~ age, data = ciber.liver,pch = 16, col = my.cols, cex = 2, main = "Liver", ylim = c(0,0.005))
beeswarm(B_cells ~ age, data = ciber.OB,pch = 16, col = my.cols, cex = 2, main = "Olfactory Bulb", ylim = c(0,0.005))
beeswarm(B_cells ~ age, data = ciber.NPCs, pch = 16, col = my.cols, cex = 2, main = "NPCs", ylim = c(0,0.025))
par(mfrow=c(1,1))
dev.off()
pdf("CIBERSORT_B_cells_beeswarm.pdf", width = 9, height = 6)
par(mfrow=c(2,3))
beeswarm(B_cells ~ age, data = ciber.Cereb,pch = 16, col = my.cols, cex = 2, main = "Cerebellum", ylim = c(0,0.005))
beeswarm(B_cells ~ age, data = ciber.heart,pch = 16, col = my.cols, cex = 2, main = "Heart", ylim = c(0,0.005))
beeswarm(B_cells ~ age, data = ciber.liver,pch = 16, col = my.cols, cex = 2, main = "Liver", ylim = c(0,0.005))
beeswarm(B_cells ~ age, data = ciber.OB,pch = 16, col = my.cols, cex = 2, main = "Olfactory Bulb", ylim = c(0,0.005))
beeswarm(B_cells ~ age, data = ciber.NPCs, pch = 16, col = my.cols, cex = 2, main = "NPCs", ylim = c(0,0.005))
par(mfrow=c(1,1))
dev.off()
pdf("CIBERSORT_T_cells_beeswarm.pdf", width = 9, height = 6)
par(mfrow=c(2,3))
beeswarm(T_cells ~ age, data = ciber.Cereb,pch = 16, col = my.cols, cex = 2, main = "Cerebellum", ylim = c(0,0.005))
beeswarm(T_cells ~ age, data = ciber.heart,pch = 16, col = my.cols, cex = 2, main = "Heart", ylim = c(0,0.005))
beeswarm(T_cells ~ age, data = ciber.liver,pch = 16, col = my.cols, cex = 2, main = "Liver", ylim = c(0,0.005))
beeswarm(T_cells ~ age, data = ciber.OB,pch = 16, col = my.cols, cex = 2, main = "Olfactory Bulb", ylim = c(0,0.005))
beeswarm(T_cells ~ age, data = ciber.NPCs, pch = 16, col = my.cols, cex = 2, main = "NPCs", ylim = c(0,0.025))
par(mfrow=c(1,1))
dev.off()
pdf("CIBERSORT_NK_cells_beeswarm.pdf", width = 9, height = 6)
par(mfrow=c(2,3))
beeswarm(NK_cells ~ age, data = ciber.Cereb,pch = 16, col = my.cols, cex = 2, main = "Cerebellum", ylim = c(0,0.005))
beeswarm(NK_cells ~ age, data = ciber.heart,pch = 16, col = my.cols, cex = 2, main = "Heart", ylim = c(0,0.005))
beeswarm(NK_cells ~ age, data = ciber.liver,pch = 16, col = my.cols, cex = 2, main = "Liver", ylim = c(0,0.005))
beeswarm(NK_cells ~ age, data = ciber.OB,pch = 16, col = my.cols, cex = 2, main = "Olfactory Bulb", ylim = c(0,0.005))
beeswarm(NK_cells ~ age, data = ciber.NPCs, pch = 16, col = my.cols, cex = 2, main = "NPCs", ylim = c(0,0.005))
par(mfrow=c(1,1))
dev.off()
pdf("CIBERSORT_B_cells_beeswarm.pdf", width = 9, height = 6)
par(mfrow=c(2,3))
beeswarm(B_cells ~ age, data = ciber.Cereb,pch = 16, col = my.cols, cex = 2, main = "Cerebellum", ylim = c(0,0.01))
beeswarm(B_cells ~ age, data = ciber.heart,pch = 16, col = my.cols, cex = 2, main = "Heart", ylim = c(0,0.01))
beeswarm(B_cells ~ age, data = ciber.liver,pch = 16, col = my.cols, cex = 2, main = "Liver", ylim = c(0,0.01))
beeswarm(B_cells ~ age, data = ciber.OB,pch = 16, col = my.cols, cex = 2, main = "Olfactory Bulb", ylim = c(0,0.01))
beeswarm(B_cells ~ age, data = ciber.NPCs, pch = 16, col = my.cols, cex = 2, main = "NPCs", ylim = c(0,0.01))
par(mfrow=c(1,1))
dev.off()
pdf("CIBERSORT_T_cells_beeswarm.pdf", width = 9, height = 6)
par(mfrow=c(2,3))
beeswarm(T_cells ~ age, data = ciber.Cereb,pch = 16, col = my.cols, cex = 2, main = "Cerebellum", ylim = c(0,0.01))
beeswarm(T_cells ~ age, data = ciber.heart,pch = 16, col = my.cols, cex = 2, main = "Heart", ylim = c(0,0.01))
beeswarm(T_cells ~ age, data = ciber.liver,pch = 16, col = my.cols, cex = 2, main = "Liver", ylim = c(0,0.005))
beeswarm(T_cells ~ age, data = ciber.OB,pch = 16, col = my.cols, cex = 2, main = "Olfactory Bulb", ylim = c(0,0.01))
beeswarm(T_cells ~ age, data = ciber.NPCs, pch = 16, col = my.cols, cex = 2, main = "NPCs", ylim = c(0,0.01))
par(mfrow=c(1,1))
dev.off()
pdf("CIBERSORT_NK_cells_beeswarm.pdf", width = 9, height = 6)
par(mfrow=c(2,3))
beeswarm(NK_cells ~ age, data = ciber.Cereb,pch = 16, col = my.cols, cex = 2, main = "Cerebellum", ylim = c(0,0.01))
beeswarm(NK_cells ~ age, data = ciber.heart,pch = 16, col = my.cols, cex = 2, main = "Heart", ylim = c(0,0.01))
beeswarm(NK_cells ~ age, data = ciber.liver,pch = 16, col = my.cols, cex = 2, main = "Liver", ylim = c(0,0.01))
beeswarm(NK_cells ~ age, data = ciber.OB,pch = 16, col = my.cols, cex = 2, main = "Olfactory Bulb", ylim = c(0,0.01))
beeswarm(NK_cells ~ age, data = ciber.NPCs, pch = 16, col = my.cols, cex = 2, main = "NPCs", ylim = c(0,0.01))
par(mfrow=c(1,1))
dev.off()
par(mfrow=c(2,3))
beeswarm(Cardiac_Fibroblasts + Dermal_Fibroblasts ~ age, data = ciber.Cereb,pch = 16, col = my.cols, cex = 2, main = "Cerebellum", ylim = c(0,0.05))
beeswarm(Cardiac_Fibroblasts + Dermal_Fibroblasts ~ age, data = ciber.heart,pch = 16, col = my.cols, cex = 2, main = "Heart", ylim = c(0,0.05))
beeswarm(Cardiac_Fibroblasts + Dermal_Fibroblasts ~ age, data = ciber.liver,pch = 16, col = my.cols, cex = 2, main = "Liver", ylim = c(0,0.05))
beeswarm(Cardiac_Fibroblasts + Dermal_Fibroblasts ~ age, data = ciber.OB,pch = 16, col = my.cols, cex = 2, main = "Olfactory Bulb", ylim = c(0,0.05))
beeswarm(Cardiac_Fibroblasts + Dermal_Fibroblasts ~ age, data = ciber.NPCs, pch = 16, col = my.cols, cex = 2, main = "NPCs", ylim = c(0,0.05))
par(mfrow=c(1,1))
ciber.liver$age <- c(rep(3,3),rep(12,3),rep(29,3))
ciber.heart$age <- c(rep(3,3),rep(12,3),rep(29,3))
ciber.NPCs$age <- c(rep(3,2),rep(12,2),rep(29,2))
ciber.OB$age <- c(rep(3,3),rep(12,2),rep(29,3))
ciber.Cereb$age <- c(rep(3,3),rep(12,3),rep(29,3))
cereb.lm <- lm(Cardiac_Fibroblasts + Dermal_Fibroblasts~ age, data = ciber.Cereb)
summary(cereb.lm) # p-value: 0.08821
heart.lm <- lm(Cardiac_Fibroblasts + Dermal_Fibroblasts~ age, data = ciber.heart)
summary(heart.lm) # p-value: 0.1522
liver.lm <- lm(Microglia + Macrophages + Monocytes~ age, data = ciber.liver)
summary(liver.lm) # p-value: 0.9774
liver.lm <- lm(Cardiac_Fibroblasts + Dermal_Fibroblasts~ age, data = ciber.liver)
summary(liver.lm) # p-value: 0.9774
OB.lm <- lm(Cardiac_Fibroblasts + Dermal_Fibroblasts~ age, data = ciber.OB)
summary(OB.lm) # p-value: 0.1791
npcs.lm <- lm(Cardiac_Fibroblasts + Dermal_Fibroblasts~ age, data = ciber.NPCs)
summary(npcs.lm) # p-value: 0.8195
ciber.heart$Dermal_Fibroblasts
ciber.heart$Cardiac_Fibroblasts
wilcox.test(ciber.heart$Cardiac_Fibroblasts[,7:9],ciber.heart$Cardiac_Fibroblasts[,1:3],alternative='greater')
wilcox.test(ciber.heart$Cardiac_Fibroblasts[7:9],ciber.heart$Cardiac_Fibroblasts[1:3],alternative='greater')
ciber.liver$Cardiac_Fibroblasts[7:9]
ciber.liver$Cardiac_Fibroblasts
ciber.liver$Dermal_Fibroblasts
wilcox.test(ciber.liver$Dermal_Fibroblasts[7:9],ciber.liver$Dermal_Fibroblasts[1:3],alternative='greater')
iber.liver$Dermal_Fibroblasts
ciber.liver$Dermal_Fibroblasts
my.cols <- c("coral","blueviolet","dodgerblue")
par(mfrow=c(2,3))
beeswarm(B_cells ~ age, data = ciber.Cereb,pch = 16, col = my.cols, cex = 2, main = "Cerebellum", ylim = c(0,0.01))
beeswarm(B_cells ~ age, data = ciber.heart,pch = 16, col = my.cols, cex = 2, main = "Heart", ylim = c(0,0.01))
beeswarm(B_cells ~ age, data = ciber.liver,pch = 16, col = my.cols, cex = 2, main = "Liver", ylim = c(0,0.01))
beeswarm(B_cells ~ age, data = ciber.OB,pch = 16, col = my.cols, cex = 2, main = "Olfactory Bulb", ylim = c(0,0.01))
beeswarm(B_cells ~ age, data = ciber.NPCs, pch = 16, col = my.cols, cex = 2, main = "NPCs", ylim = c(0,0.01))
par(mfrow=c(1,1))
my.cols <- c("coral","blueviolet","dodgerblue")
pdf("CIBERSORT_B_cells_beeswarm.pdf", width = 9, height = 6)
par(mfrow=c(2,3))
beeswarm(B_cells ~ age, data = ciber.Cereb,pch = 16, col = my.cols, cex = 2, main = "Cerebellum", ylim = c(0,0.01))
beeswarm(B_cells ~ age, data = ciber.heart,pch = 16, col = my.cols, cex = 2, main = "Heart", ylim = c(0,0.01))
beeswarm(B_cells ~ age, data = ciber.liver,pch = 16, col = my.cols, cex = 2, main = "Liver", ylim = c(0,0.01))
beeswarm(B_cells ~ age, data = ciber.OB,pch = 16, col = my.cols, cex = 2, main = "Olfactory Bulb", ylim = c(0,0.01))
beeswarm(B_cells ~ age, data = ciber.NPCs, pch = 16, col = my.cols, cex = 2, main = "NPCs", ylim = c(0,0.01))
par(mfrow=c(1,1))
dev.off()
pdf("CIBERSORT_T_cells_beeswarm.pdf", width = 9, height = 6)
par(mfrow=c(2,3))
beeswarm(T_cells ~ age, data = ciber.Cereb,pch = 16, col = my.cols, cex = 2, main = "Cerebellum", ylim = c(0,0.01))
beeswarm(T_cells ~ age, data = ciber.heart,pch = 16, col = my.cols, cex = 2, main = "Heart", ylim = c(0,0.01))
beeswarm(T_cells ~ age, data = ciber.liver,pch = 16, col = my.cols, cex = 2, main = "Liver", ylim = c(0,0.005))
beeswarm(T_cells ~ age, data = ciber.OB,pch = 16, col = my.cols, cex = 2, main = "Olfactory Bulb", ylim = c(0,0.01))
beeswarm(T_cells ~ age, data = ciber.NPCs, pch = 16, col = my.cols, cex = 2, main = "NPCs", ylim = c(0,0.01))
par(mfrow=c(1,1))
dev.off()
pdf("CIBERSORT_NK_cells_beeswarm.pdf", width = 9, height = 6)
par(mfrow=c(2,3))
beeswarm(NK_cells ~ age, data = ciber.Cereb,pch = 16, col = my.cols, cex = 2, main = "Cerebellum", ylim = c(0,0.01))
beeswarm(NK_cells ~ age, data = ciber.heart,pch = 16, col = my.cols, cex = 2, main = "Heart", ylim = c(0,0.01))
beeswarm(NK_cells ~ age, data = ciber.liver,pch = 16, col = my.cols, cex = 2, main = "Liver", ylim = c(0,0.01))
beeswarm(NK_cells ~ age, data = ciber.OB,pch = 16, col = my.cols, cex = 2, main = "Olfactory Bulb", ylim = c(0,0.01))
beeswarm(NK_cells ~ age, data = ciber.NPCs, pch = 16, col = my.cols, cex = 2, main = "NPCs", ylim = c(0,0.01))
par(mfrow=c(1,1))
dev.off()
########## Fibrosis?
pdf("CIBERSORT_Fibroblasts_beeswarm.pdf", width = 9, height = 6)
par(mfrow=c(2,3))
beeswarm(Cardiac_Fibroblasts + Dermal_Fibroblasts ~ age, data = ciber.Cereb,pch = 16, col = my.cols, cex = 2, main = "Cerebellum", ylim = c(0,0.05))
beeswarm(Cardiac_Fibroblasts + Dermal_Fibroblasts ~ age, data = ciber.heart,pch = 16, col = my.cols, cex = 2, main = "Heart", ylim = c(0,0.05))
beeswarm(Cardiac_Fibroblasts + Dermal_Fibroblasts ~ age, data = ciber.liver,pch = 16, col = my.cols, cex = 2, main = "Liver", ylim = c(0,0.05))
beeswarm(Cardiac_Fibroblasts + Dermal_Fibroblasts ~ age, data = ciber.OB,pch = 16, col = my.cols, cex = 2, main = "Olfactory Bulb", ylim = c(0,0.05))
beeswarm(Cardiac_Fibroblasts + Dermal_Fibroblasts ~ age, data = ciber.NPCs, pch = 16, col = my.cols, cex = 2, main = "NPCs", ylim = c(0,0.05))
par(mfrow=c(1,1))
dev.off()
ciber.liver$age <- c(rep(3,3),rep(12,3),rep(29,3))
ciber.heart$age <- c(rep(3,3),rep(12,3),rep(29,3))
ciber.NPCs$age <- c(rep(3,2),rep(12,2),rep(29,2))
ciber.OB$age <- c(rep(3,3),rep(12,2),rep(29,3))
ciber.Cereb$age <- c(rep(3,3),rep(12,3),rep(29,3))
cereb.lm <- lm(Cardiac_Fibroblasts + Dermal_Fibroblasts~ age, data = ciber.Cereb)
summary(cereb.lm) # p-value: 0.2676
heart.lm <- lm(Cardiac_Fibroblasts + Dermal_Fibroblasts~ age, data = ciber.heart)
summary(heart.lm) # p-value: 0.1884
liver.lm <- lm(Cardiac_Fibroblasts + Dermal_Fibroblasts~ age, data = ciber.liver)
summary(liver.lm) # p-value: 0.07582
OB.lm <- lm(Cardiac_Fibroblasts + Dermal_Fibroblasts~ age, data = ciber.OB)
summary(OB.lm) # p-value: 0.8968
npcs.lm <- lm(Cardiac_Fibroblasts + Dermal_Fibroblasts~ age, data = ciber.NPCs)
summary(npcs.lm) # p-value: 0.2289
wilcox.test(ciber.heart$Cardiac_Fibroblasts[7:9],ciber.heart$Cardiac_Fibroblasts[1:3],alternative='greater')
#W = 7, p-value = 0.2
wilcox.test(ciber.liver$Dermal_Fibroblasts[7:9],ciber.liver$Dermal_Fibroblasts[1:3],alternative='greater')
#W = 7, p-value = 0.2
hippo.mix <- read.csv('/Volumes/MyBook_3/BD_aging_project/RNAseq/All_tissues_analysis/CIBERSORT/Disease_models/Hippo_40Hz_CIBERSORT.Output_Job57.csv ',row.names=1)
hippo.mix <- read.csv('/Volumes/MyBook_3/BD_aging_project/RNAseq/All_tissues_analysis/CIBERSORT/Disease_models/Hippo_40Hz_CIBERSORT.Output_Job57.csv',row.names=1)
alz.mix <- read.csv('/Volumes/MyBook_3/BD_aging_project/RNAseq/All_tissues_analysis/CIBERSORT/Disease_models/Alzh_CIBERSORT.Output_Job58.csv ',row.names=1)
alz.mix <- read.csv('/Volumes/MyBook_3/BD_aging_project/RNAseq/All_tissues_analysis/CIBERSORT/Disease_models/Alzh_CIBERSORT.Output_Job58.csv',row.names=1)
my.cell.cols.order <- c("Cardiomyocytes",
"Hepatocytes",
"aNSCs","NPCs","qNSCs",
"Astrocytes","Oligodendrocytes","Neurons","Ependymal",
"Cardiac_Fibroblasts", "Dermal_Fibroblasts" ,
"Monocytes","Macrophages","Microglia","Granulocytes",
"B_cells","T_cells","NK_cells",
"Endothelial_cells",
"Adipocytes",
"Erythrocytes"
)
rownames(hippo.mix)
rownames(alz.mix)
alz.mix$condition <- factor(c(rep("CTL",6),rep("CKp25",6)))
alz.mix$age <- factor(c(rep("2",3),rep("6",3),rep("2",3),rep("6",3)))
hippo.mix$condition <- factor(c(rep("CTL",3),rep("40hz",3)))
hippo.mix
beeswarm(Microglia + Macrophages + Monocytes ~ condition, data = hippo.mix,pch = 16, col = my.cols, cex = 2, main = "Hippocampus 40Hz", ylim = c(0,0.05))
library('beeswarm')
beeswarm(Microglia + Macrophages + Monocytes ~ condition, data = hippo.mix,pch = 16, col = my.cols, cex = 2, main = "Hippocampus 40Hz", ylim = c(0,0.05))
my.cols <- c("coral","dodgerblue")
beeswarm(Microglia + Macrophages + Monocytes ~ condition, data = hippo.mix,pch = 16, col = my.cols, cex = 2, main = "Hippocampus 40Hz", ylim = c(0,0.05))
beeswarm(Microglia + Macrophages + Monocytes ~ condition, data = hippo.mix,pch = 16, col = my.cols, cex = 2, main = "Hippocampus 40Hz", ylim = c(0,0.15))
beeswarm(Microglia + Macrophages + Monocytes ~ condition, data = hippo.mix,pch = 16, col = my.cols, cex = 2, main = "Hippocampus 40Hz", ylim = c(0,0.2))
wilcox.test(c(hippo.mix$Microglia + hippo.mix$Macrophages + hippo.mix$Monocytes)[hippo.mix$condition %in% 'CTL'],
c(hippo.mix$Microglia + hippo.mix$Macrophages + hippo.mix$Monocytes)[!(hippo.mix$condition %in% 'CTL')]
)
wilcox.test(c(hippo.mix$Microglia + hippo.mix$Macrophages + hippo.mix$Monocytes)[hippo.mix$condition %in% 'CTL'],
c(hippo.mix$Microglia + hippo.mix$Macrophages + hippo.mix$Monocytes)[!(hippo.mix$condition %in% 'CTL')],
alternative = "greater"
)
wilcox.test(c(hippo.mix$Microglia + hippo.mix$Macrophages + hippo.mix$Monocytes)[hippo.mix$condition %in% 'CTL'],
c(hippo.mix$Microglia + hippo.mix$Macrophages + hippo.mix$Monocytes)[!(hippo.mix$condition %in% 'CTL')],
alternative = "less")
pdf("CIBERSORT_Inflammatory_cells_beeswarm_Hippocampus.pdf", width = 9, height = 6)
beeswarm(Microglia + Macrophages + Monocytes ~ condition, data = hippo.mix,pch = 16, col = my.cols, cex = 2, main = "Hippocampus 40Hz", ylim = c(0,0.2))
dev.off()
wilcox.test(c(hippo.mix$Microglia + hippo.mix$Macrophages + hippo.mix$Monocytes)[hippo.mix$condition %in% 'CTL'],
c(hippo.mix$Microglia + hippo.mix$Macrophages + hippo.mix$Monocytes)[!(hippo.mix$condition %in% 'CTL')],
alternative = "less")
#W = 0, p-value = 0.05 (hypothesis: there is more microglia in )
beeswarm(Microglia + Macrophages + Monocytes ~ condition, data = alz.mix,pch = 16, col = my.cols, cex = 2, main = "Hippocampus 40Hz", ylim = c(0,0.2))
beeswarm(Microglia + Macrophages + Monocytes ~ condition, data = alz.mix,pch = 16, col = my.cols, cex = 2, main = "Hippocampus 40Hz", ylim = c(0,0.5))
beeswarm(Microglia + Macrophages + Monocytes ~ condition, data = alz.mix,pch = 16, col = my.cols, cex = 2, main = "Hippocampus 40Hz", ylim = c(0,0.3))
wilcox.test(c(alz.mix$Microglia + alz.mix$Macrophages + alz.mix$Monocytes)[alz.mix$condition %in% 'CTL'],
c(alz.mix$Microglia + alz.mix$Macrophages + alz.mix$Monocytes)[!(alz.mix$condition %in% 'CTL')],
alternative = "less")
alz.mix$condition %in% 'CTL' && alz.mix$age == 6
library(bitops)
alz.mix$age == 6
wilcox.test(c(alz.mix$Microglia + alz.mix$Macrophages + alz.mix$Monocytes)[bitAnd(alz.mix$condition %in% 'CTL',alz.mix$age == 6) > 0],
c(alz.mix$Microglia + alz.mix$Macrophages + alz.mix$Monocytes)[bitAnd(!(alz.mix$condition %in% 'CTL'),alz.mix$age == 6) > 0],
alternative = "less")
beeswarm(Microglia + Macrophages + Monocytes ~ condition, data = alz.mix[alz.mix$age == 6,],pch = 16, col = my.cols, cex = 2, main = "alzheimer 6weeks", ylim = c(0,0.3))
my.cols <- rev(c("coral","dodgerblue"))
beeswarm(Microglia + Macrophages + Monocytes ~ condition, data = alz.mix[alz.mix$age == 2,],pch = 16, col = my.cols, cex = 2, main = "alzheimer 6weeks", ylim = c(0,0.3))
pdf("CIBERSORT_Inflammatory_cells_beeswarm_alzheimer.pdf", width = 9, height = 6)
beeswarm(Microglia + Macrophages + Monocytes ~ condition, data = alz.mix,pch = 16, col = my.cols, cex = 2, main = "alzheimer all", ylim = c(0,0.3))
beeswarm(Microglia + Macrophages + Monocytes ~ condition, data = alz.mix[alz.mix$age == 6,],pch = 16, col = my.cols, cex = 2, main = "alzheimer 6weeks", ylim = c(0,0.3))
beeswarm(Microglia + Macrophages + Monocytes ~ condition, data = alz.mix[alz.mix$age == 2,],pch = 16, col = my.cols, cex = 2, main = "alzheimer 6weeks", ylim = c(0,0.3))
dev.off()
wilcox.test(c(alz.mix$Microglia + alz.mix$Macrophages + alz.mix$Monocytes)[alz.mix$condition %in% 'CTL'],
c(alz.mix$Microglia + alz.mix$Macrophages + alz.mix$Monocytes)[!(alz.mix$condition %in% 'CTL')],
alternative = "less")
#p-value = 0.02056; all ages
library(bitops)
# only older mice
wilcox.test(c(alz.mix$Microglia + alz.mix$Macrophages + alz.mix$Monocytes)[bitAnd(alz.mix$condition %in% 'CTL',alz.mix$age == 6) > 0],
c(alz.mix$Microglia + alz.mix$Macrophages + alz.mix$Monocytes)[bitAnd(!(alz.mix$condition %in% 'CTL'),alz.mix$age == 6) > 0],
alternative = "less")
wilcox.test(c(alz.mix$Microglia + alz.mix$Macrophages + alz.mix$Monocytes)[bitAnd(alz.mix$condition %in% 'CTL',alz.mix$age == 2) > 0],
c(alz.mix$Microglia + alz.mix$Macrophages + alz.mix$Monocytes)[bitAnd(!(alz.mix$condition %in% 'CTL'),alz.mix$age == 2) > 0],
alternative = "less")
setwd('/Volumes/BB_Backup_3//RNAseq_datasets_for_Deconvolution/Process_for_deconvolution/CiBERSORT_plotting')
library('pheatmap')
ciber.training <- read.csv('../2017-01-18/Training_CIBERSORT.Output_Job43.csv',row.names=1)
ciber.liver <- read.csv('../2017-01-18/Liver_CIBERSORT.Output_Job47.csv',row.names=1)
ciber.heart <- read.csv('../2017-01-18/Heart_CIBERSORT.Output_Job48.csv',row.names=1)
ciber.NPCs <- read.csv('../2017-01-18/NPCs_CIBERSORT.Output_Job46.csv',row.names=1)
ciber.OB <- read.csv('../2017-01-18/OB_CIBERSORT.Output_Job45.csv',row.names=1)
ciber.Cereb <- read.csv('../2017-01-18/Cerebellum_Cerebellum_CIBERSORT.Output_Job44.csv',row.names=1)
ciber.mix <- read.csv('../InSilicoMixtures/Mixtures_CIBERSORT.Output_Job49.csv',row.names=1)
colnames(ciber.liver)
# [1] "Input.Sample"        "Adipocytes"          "aNSCs"               "Astrocytes"          "Endothelial_cells"   "Erythrocytes"        "Granulocytes"
# [8] "Macrophages"         "Microglia"           "Monocytes"           "Neurons"             "NK_cells"            "NPCs"                "Oligodendrocytes"
# [15] "qNSCs"               "T_cells"             "Cardiomyocytes"      "Hepatocytes"         "B_cells"             "Cardiac_Fibroblasts" "Dermal_Fibroblasts"
# [22] "Ependymal"           "P.value"             "Pearson.Correlation" "RMSE"
my.cell.cols.order <- c("Cardiomyocytes",
"Hepatocytes",
"aNSCs","NPCs","qNSCs",
"Astrocytes","Oligodendrocytes","Neurons","Ependymal",
"Cardiac_Fibroblasts", "Dermal_Fibroblasts" ,
"Monocytes","Macrophages","Microglia","Granulocytes",
"B_cells","T_cells","NK_cells",
"Endothelial_cells",
"Adipocytes",
"Erythrocytes"
)
# beeplot wiht
library('beeswarm')
ciber.liver$age <- factor(c(rep("3m",3),rep("12m",3),rep("29m",3)))
ciber.heart$age <- factor(c(rep("3m",3),rep("12m",3),rep("29m",3)))
ciber.NPCs$age <- factor(c(rep("3m",2),rep("12m",2),rep("29m",2)))
ciber.OB$age <- factor(c(rep("3m",3),rep("12m",2),rep("29m",3)))
ciber.Cereb$age <- factor(c(rep("3m",3),rep("12m",3),rep("29m",3)))
beeswarm(Microglia + Macrophages + Monocytes ~ age, data = ciber.heart,pch = 16, col = my.cols, cex = 2, main = "Heart", ylim = c(0,0.05))
my.cols <- c("coral","blueviolet","dodgerblue")
beeswarm(Microglia + Macrophages + Monocytes ~ age, data = ciber.heart,pch = 16, col = my.cols, cex = 2, main = "Heart", ylim = c(0,0.05))
ciber.liver$age <- c(rep(3,3),rep(12,3),rep(29,3))
ciber.heart$age <- c(rep(3,3),rep(12,3),rep(29,3))
ciber.NPCs$age <- c(rep(3,2),rep(12,2),rep(29,2))
ciber.OB$age <- c(rep(3,3),rep(12,2),rep(29,3))
ciber.Cereb$age <- c(rep(3,3),rep(12,3),rep(29,3))
ciber.Cereb
wilcox.test(c(ciber.Cereb$Microglia + ciber.Cereb$Macrophages + ciber.Cereb$Monocytes)[ciber.Cereb$age %in% '3'],
c(ciber.Cereb$Microglia + ciber.Cereb$Macrophages + ciber.Cereb$Monocytes)[ciber.Cereb$age %in% '29'],
alternative = "less")
wilcox.test(c(ciber.heart$Microglia + ciber.heart$Macrophages + ciber.heart$Monocytes)[ciber.heart$age %in% '3'],
c(ciber.heart$Microglia + ciber.heart$Macrophages + ciber.heart$Monocytes)[ciber.heart$age %in% '29'],
alternative = "less")
wilcox.test(c(ciber.liver$Microglia + ciber.liver$Macrophages + ciber.liver$Monocytes)[ciber.liver$age %in% '3'],
c(ciber.liver$Microglia + ciber.liver$Macrophages + ciber.liver$Monocytes)[ciber.liver$age %in% '29'],
alternative = "less")
wilcox.test(c(ciber.OB$Microglia + ciber.OB$Macrophages + ciber.OB$Monocytes)[ciber.OB$age %in% '3'],
c(ciber.OB$Microglia + ciber.OB$Macrophages + ciber.OB$Monocytes)[ciber.OB$age %in% '29'],
alternative = "less")
wilcox.test(c(ciber.Cereb$B_cells)[ciber.Cereb$age %in% '3'],
c(ciber.Cereb$B_cells)[ciber.Cereb$age %in% '29'],
alternative = "less")
?wilcox.test
wilcox.test(c(ciber.heart$B_cells)[ciber.heart$age %in% '3'],
c(ciber.heart$B_cells)[ciber.heart$age %in% '29'],
alternative = "less")
#p-value = 0.1
wilcox.test(c(ciber.liver$B_cells)[ciber.liver$age %in% '3'],
c(ciber.liver$B_cells)[ciber.liver$age %in% '29'],
alternative = "less")
#p-value = 0.65
wilcox.test(c(ciber.OB$B_cells)[ciber.OB$age %in% '3'],
c(ciber.OB$B_cells)[ciber.OB$age %in% '29'],
alternative = "less")
