correction
This commit is contained in:
@@ -96,10 +96,8 @@ server <- function(input, output) {
|
||||
colnames(t_maps$label)<-c("x", "y")
|
||||
t_maps[["brackets"]]<-as.data.frame(matrix(nrow = 0, ncol=4))
|
||||
colnames(t_maps$brackets)<-c("y1", "y2", "x1", "x2")
|
||||
}
|
||||
|
||||
set.seed(123)
|
||||
if (input$positive == T){
|
||||
dades$stats<<-t_stats
|
||||
}else{
|
||||
if (input$test == "T-test (adj Holm)"){
|
||||
t_stats<-multi_stats(t, "value", "variable", "Groups", stat.test = "ttest")
|
||||
}
|
||||
@@ -111,20 +109,23 @@ server <- function(input, output) {
|
||||
t_stats<-t_stats %>% filter(p.signif != "ns")
|
||||
|
||||
t_maps<-generate_labstats(t_stats, t, "value", "variable", "Groups")
|
||||
}
|
||||
|
||||
ggplot(melt(t_substr, id=c("Mice", ctrl, "Groups")), aes(variable, value))+
|
||||
labs(x="", y="Spots/2.5*10^5 cells")+
|
||||
# geom_errorbar(stat="summary", position=position_dodge(width=0.9), width=0.5, aes(fill=Groups))+
|
||||
geom_hline(data=mock_mean, aes(color=Groups, yintercept = `.`))+
|
||||
# geom_bar(stat="summary", position="dodge", color="black", aes(fill=Groups))+
|
||||
geom_boxplot(color="black", aes(fill=Groups), alpha=0.4, outlier.alpha = 0)+
|
||||
geom_jitter(position=position_jitterdodge(jitter.width = 0.2), shape=21, aes(fill=Groups), size=3)+
|
||||
# geom_quasirandom(position = position_quasirandom(), shape=21)+
|
||||
scale_x_discrete(limits=colnames(t_substr)[!colnames(t_substr) %in% c("Mice", "Groups", ctrl, mock)])+
|
||||
geom_segment(data=t_maps$brackets, aes(x=x1, xend=x2, y=y1, yend=y2), color="black")+
|
||||
geom_text(data=t_stats, aes(t_maps$label$x, t_maps$label$y, label=p.signif), color="black")+
|
||||
theme_bw()+
|
||||
theme(axis.text.x=element_text(angle=45, hjust=1))
|
||||
set.seed(123)
|
||||
if (input$positive == T){
|
||||
ggplot(melt(t_substr, id=c("Mice", ctrl, "Groups")), aes(variable, value))+
|
||||
labs(x="", y="Spots/2.5*10^5 cells")+
|
||||
# geom_errorbar(stat="summary", position=position_dodge(width=0.9), width=0.5, aes(fill=Groups))+
|
||||
geom_hline(data=mock_mean, aes(color=Groups, yintercept = `.`))+
|
||||
# geom_bar(stat="summary", position="dodge", color="black", aes(fill=Groups))+
|
||||
geom_boxplot(color="black", aes(fill=Groups), alpha=0.4, outlier.alpha = 0)+
|
||||
geom_jitter(position=position_jitterdodge(jitter.width = 0.2), shape=21, aes(fill=Groups), size=3)+
|
||||
# geom_quasirandom(position = position_quasirandom(), shape=21)+
|
||||
scale_x_discrete(limits=colnames(t_substr)[!colnames(t_substr) %in% c("Mice", "Groups", ctrl, mock)])+
|
||||
geom_segment(data=t_maps$brackets, aes(x=x1, xend=x2, y=y1, yend=y2), color="black")+
|
||||
geom_text(data=t_stats, aes(t_maps$label$x, t_maps$label$y, label=p.signif), color="black")+
|
||||
theme_bw()+
|
||||
theme(axis.text.x=element_text(angle=45, hjust=1))
|
||||
}else{
|
||||
ids<-if(ctrl %in% colnames(t_substr)){c("Mice", ctrl, "Groups")}else{c("Mice", "Groups")}
|
||||
ggplot(melt(t_substr, id=ids), aes(variable, value))+
|
||||
|
||||
Reference in New Issue
Block a user