library(tidyverse)
library(reshape2)
library(ggpubr)
library(lubridate)
chim.df = read.csv("./data/aml.all.df.csv")
names(chim.df)
## [1] "ID" "dot" "dor" "txage" "relapse" "sex"
## [7] "rstatprtx" "ghgp" "tbi" "agvhd" "test" "bdate"
## [13] "btime" "rtime" "rbin" "bmc_cdw" "bmc_cd3" "bmc_cd15"
## [19] "bmc_cd34" "pdate" "ptime" "pbc_cdw" "pbc_cd3" "pbc_cd15"
## [25] "pbc_cd34"
chim.df$ID = as.factor(chim.df$ID)
Remove plot relapse samples
plot.df = chim.df[which(chim.df$pdate < chim.df$dor | is.na(chim.df$dor)), ]
ggboxplot(plot.df, x = "relapse", y = "pbc_cdw",
color = "relapse", add = "jitter", main = "PB CD (Whole)") +
stat_compare_means(label.y = 20, method = "wilcox.test") +
scale_y_continuous(limits = c(0,100))
ggscatter(plot.df, x = "ptime", y = "pbc_cdw", col = "relapse", main = "PB CD (Whole)",
add = "reg.line")
p1 = ggline(plot.df, x = "ptime", y = "pbc_cdw", col = "ID",
facet.by = "relapse", numeric.x.axis = TRUE, main = "PB CD (Whole)")
ggpar(p1, legend = "none")
ggboxplot(plot.df, x = "test", y = "pbc_cdw", fill = "relapse", main = "PB CD (Whole)")
ggboxplot(plot.df, x = "relapse", y = "pbc_cd3",
color = "relapse", add = "jitter", main = "PB CD3") +
stat_compare_means(label.y = 20, method = "wilcox.test") +
scale_y_continuous(limits = c(0,100))
ggscatter(plot.df, x = "ptime", y = "pbc_cd3", col = "relapse", main = "PB CD3",
add = "reg.line")
p1 = ggline(plot.df, x = "ptime", y = "pbc_cd3", col = "ID",
facet.by = "relapse", numeric.x.axis = TRUE, main = "PB CD3")
ggpar(p1, legend = "none")
ggboxplot(plot.df, x = "test", y = "pbc_cd3", fill = "relapse", main = "PB CD3")
ggboxplot(plot.df, x = "relapse", y = "pbc_cd15",
color = "relapse", add = "jitter", main = "PB CD15") +
stat_compare_means(label.y = 20, method = "wilcox.test") +
scale_y_continuous(limits = c(0,100))
ggscatter(plot.df, x = "ptime", y = "pbc_cd15", col = "relapse", main = "PB CD15",
add = "reg.line")
p1 = ggline(plot.df, x = "ptime", y = "pbc_cd15", col = "ID",
facet.by = "relapse", numeric.x.axis = TRUE, main = "PB CD15")
ggpar(p1, legend = "none")
ggboxplot(plot.df, x = "test", y = "pbc_cd15", fill = "relapse", main = "PB CD15")
ggboxplot(plot.df, x = "relapse", y = "pbc_cd34",
color = "relapse", add = "jitter", main = "PB CD34") +
stat_compare_means(label.y = 20, method = "wilcox.test") +
scale_y_continuous(limits = c(0,100))
ggscatter(plot.df, x = "ptime", y = "pbc_cd34", col = "relapse", main = "PB CD34",
add = "reg.line")
p1 = ggline(plot.df, x = "ptime", y = "pbc_cd34", col = "ID",
facet.by = "relapse", numeric.x.axis = TRUE, main = "PB CD34")
ggpar(p1, legend = "none")
ggboxplot(plot.df, x = "test", y = "pbc_cd34", fill = "relapse", main = "PB CD34")
plot2.df = melt(plot.df, measure.vars = c("pbc_cdw", "pbc_cd3", "pbc_cd15", "pbc_cd34"),
variable.name = "marker", value.name = "prop")
ggboxplot(plot2.df, x = "relapse", y = "prop",
fill = "marker", main = "PB All markers") +
scale_y_continuous(limits = c(0,100))
ggboxplot(plot2.df, x = "test", y = "prop", fill = "marker",
facet.by = "relapse", main = "PB All markers")
Stanford Medicine, dcshyr@stanford.edu↩︎
University of Utah, simon.brewer@geog.utah.edu↩︎