Compare commits
2 Commits
2f676e7632
...
e9700a606e
| Author | SHA1 | Date | |
|---|---|---|---|
| e9700a606e | |||
| 549a963928 |
@@ -42,6 +42,7 @@ ui <- fluidPage(
|
||||
selectInput(inputId = "vacc", "Experimento de Vacunación", selected = "No", choices = c("Sí","No")),
|
||||
uiOutput('cutoffUI'),
|
||||
checkboxInput("filter_stats","Filtrar Estadística"),
|
||||
checkboxInput("increase_volume","Usar Incremento de Volumen"),
|
||||
downloadButton("downloadVolume", "Descargar Volúmenes")
|
||||
),
|
||||
mainPanel(
|
||||
@@ -63,6 +64,8 @@ ui <- fluidPage(
|
||||
sliderInput("width", "Ancho", min=1000, max=20000, step=1000, value=10000),
|
||||
sliderInput("height", "Altura", min=1000, max=20000, step=1000, value=6000),
|
||||
textInput("colors", label="Colors", value=""),
|
||||
textInput("xaxis", label="Etiqueta Eje X", value=""),
|
||||
textInput("yaxis", label="Etiqueta Eje Y", value=""),
|
||||
sliderInput("errorbar-width", "% Ancho errorbars", min=0.0, max=1, step=0.05, value=0.05),
|
||||
sliderInput("line-size", "Tamaño línea", min=0.1, max=3, step=0.1, value=0.5),
|
||||
sliderInput("point-size", "Tamaño puntos", min=1, max=10, step=1, value=3),
|
||||
@@ -380,6 +383,15 @@ server <- function(input, output) {
|
||||
if (!"Volume" %in% colnames(table)){table<-rename(table, "Volume"=value)}
|
||||
table<-table %>% filter(!is.na(Group))
|
||||
table$Timepoint<-factor(table$Timepoint, levels=mixedsort(as.numeric(as.character(unique(table$Timepoint)))))
|
||||
if (input$increase_volume){
|
||||
timepoints<-unique(table$Timepoint)
|
||||
table<-table %>% select(-Major, -Minor) %>%
|
||||
spread(Timepoint, Volume) %>%
|
||||
mutate(across(all_of(timepoints), function(x){(x*100/`0`)-100})) %>%
|
||||
gather(Timepoint, Volume, -Cage, -`ID animal`, -`ID tumor`, -Group) %>%
|
||||
mutate(Volume=case_when(Volume < 0 ~ 0, T~Volume))
|
||||
}
|
||||
table$Timepoint<-factor(table$Timepoint, levels=mixedsort(as.numeric(as.character(unique(table$Timepoint)))))
|
||||
analysis$taula_def<-table
|
||||
analysis$taula_vol<-dcast(table, Cage+`ID animal`+`ID tumor`~Timepoint,value.var = "Volume")
|
||||
table_plot<-dcast(dcast(table %>% filter(!is.na(Volume)), `ID animal`+Group+Timepoint~., value.var = "Volume", fun.aggregate = mean), Group~Timepoint)
|
||||
@@ -390,6 +402,7 @@ server <- function(input, output) {
|
||||
if (!is.null(input$file_analy) & !is.null(analysis$taula_def)){
|
||||
observeEvent(analysis$taula_def, {})
|
||||
table<-analysis$taula_def
|
||||
|
||||
if (input$vacc == "Sí"){
|
||||
ggplot(table, aes(as.numeric(as.character(Timepoint)), Volume, color=Group, group=Group))+
|
||||
geom_errorbar(stat="summary", width=0.05)+
|
||||
@@ -647,6 +660,12 @@ server <- function(input, output) {
|
||||
if (input$theme == "BW"){
|
||||
g<-g+theme_bw(base_size = input$`font-size`)
|
||||
}
|
||||
if (input$xaxis != ""){
|
||||
g<-g+xlab(input$xaxis)
|
||||
}
|
||||
if (input$yaxis != ""){
|
||||
g<-g+ylab(input$yaxis)
|
||||
}
|
||||
if (input$theme == "Classic"){
|
||||
g<-g+theme_classic(base_size = input$`font-size`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user