Pequeñas correcciones.
This commit is contained in:
@@ -131,14 +131,21 @@ server <- function(input, output) {
|
|||||||
t_maps<-generate_labstats(t_stats, t, "value", "variable", "Groups")
|
t_maps<-generate_labstats(t_stats, t, "value", "variable", "Groups")
|
||||||
dades$maps<<-t_maps
|
dades$maps<<-t_maps
|
||||||
}
|
}
|
||||||
print(t_substr)
|
if (length(unique(dades$taula[,"Groups"])) < 2){
|
||||||
|
dades$stats<<-1
|
||||||
|
}
|
||||||
|
|
||||||
dades$final<<-if(ctrl %in% colnames(t_substr)){t_substr %>% select(-cctrl)}else{t_substr}
|
c(ctrl, mock)[c(ctrl, mock) %in% colnames(t_substr)]
|
||||||
# dades$final<<-if(ctrl %in% colnames(t_substr)){t_substr %>% select(-c(ctrl, mock))}else{t_substr %>% select(-mock)}
|
dades$final<<-t_substr %>% select(-c(ctrl, mock)[c(ctrl, mock) %in% colnames(t_substr)])
|
||||||
|
|
||||||
set.seed(123)
|
set.seed(123)
|
||||||
if (input$positive == T){
|
if (input$positive == T){
|
||||||
ggplot(melt(t_substr, id=c("Mice", ctrl, "Groups")), aes(variable, value))+
|
ids=c("Mice", "Groups", c(ctrl, mock)[c(ctrl, mock) %in% colnames(t_substr)])
|
||||||
|
validate(
|
||||||
|
need(exists("mock_mean"), "No se puede elegir positividad con múltiples mocks")
|
||||||
|
)
|
||||||
|
if (exists("mock_mean")){
|
||||||
|
ggplot(melt(t_substr, id=ids), aes(variable, value))+
|
||||||
labs(x="", y="Spots/2.5*10^5 cells")+
|
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_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_hline(data=mock_mean, aes(color=Groups, yintercept = `.`))+
|
||||||
@@ -151,8 +158,10 @@ server <- function(input, output) {
|
|||||||
geom_text(data=t_stats, aes(t_maps$label$x, t_maps$label$y, label=p.signif), color="black")+
|
geom_text(data=t_stats, aes(t_maps$label$x, t_maps$label$y, label=p.signif), color="black")+
|
||||||
theme_bw()+
|
theme_bw()+
|
||||||
theme(axis.text.x=element_text(angle=45, hjust=1))
|
theme(axis.text.x=element_text(angle=45, hjust=1))
|
||||||
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
ids<-if(ctrl %in% colnames(t_substr)){c("Mice", ctrl, "Groups")}else{c("Mice", "Groups")}
|
ids=c("Mice", "Groups", c(ctrl, mock)[c(ctrl, mock) %in% colnames(t_substr)])
|
||||||
ggplot(melt(t_substr, id=ids), aes(variable, value))+
|
ggplot(melt(t_substr, id=ids), aes(variable, value))+
|
||||||
labs(x="", y="Spots/2.5*10^5 cells")+
|
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_errorbar(stat="summary", position=position_dodge(width=0.9), width=0.5, aes(fill=Groups))+
|
||||||
@@ -174,6 +183,11 @@ server <- function(input, output) {
|
|||||||
observeEvent(dades$stats, {})
|
observeEvent(dades$stats, {})
|
||||||
t_stats<-dades$stats
|
t_stats<-dades$stats
|
||||||
if (!is.null(dades$stats)){
|
if (!is.null(dades$stats)){
|
||||||
|
if (t_stats == 1){
|
||||||
|
validate(
|
||||||
|
need(t_stats == 1, "Con un sólo grupo no se puede hacer estadística")
|
||||||
|
)
|
||||||
|
}else{
|
||||||
return(
|
return(
|
||||||
t_stats %>%
|
t_stats %>%
|
||||||
flextable() %>%
|
flextable() %>%
|
||||||
@@ -185,6 +199,7 @@ server <- function(input, output) {
|
|||||||
) %>%
|
) %>%
|
||||||
htmltools_value()
|
htmltools_value()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
output$expPlotUI<- renderUI({
|
output$expPlotUI<- renderUI({
|
||||||
|
|||||||
Reference in New Issue
Block a user