|
@ -104,6 +104,10 @@ server <- function(input, output) { |
|
|
taula$Minor<-taula$Minor |
|
|
taula$Minor<-taula$Minor |
|
|
taula["Volume"]<-((taula$Major*taula$Minor*taula$Minor)*(pi/6)) |
|
|
taula["Volume"]<-((taula$Major*taula$Minor*taula$Minor)*(pi/6)) |
|
|
} |
|
|
} |
|
|
|
|
|
if ("TS" %in% colnames(taula)){ |
|
|
|
|
|
taula<-dcast(taula, Cage+`ID animal`+`ID tumor`+Group~TS, value.var = "0") |
|
|
|
|
|
taula["Volume"]<-taula$`TS-Deep`*taula$`TS-Length`*taula$`TS-Width`*pi/6 |
|
|
|
|
|
} |
|
|
dades$taula<-taula |
|
|
dades$taula<-taula |
|
|
dades$groups<-read.xlsx(input$file_sizes$datapath, sheet = 2, colName=F)[,1] |
|
|
dades$groups<-read.xlsx(input$file_sizes$datapath, sheet = 2, colName=F)[,1] |
|
|
if (readxl::excel_sheets(input$file_sizes$datapath) %>% length > 2){ |
|
|
if (readxl::excel_sheets(input$file_sizes$datapath) %>% length > 2){ |
|
@ -126,7 +130,7 @@ server <- function(input, output) { |
|
|
output$lowcut<-renderUI({ |
|
|
output$lowcut<-renderUI({ |
|
|
if (!is.null(dades$taula)){ |
|
|
if (!is.null(dades$taula)){ |
|
|
cut.max<-round(max(dades$taula$Volume, na.rm = T), 2) |
|
|
cut.max<-round(max(dades$taula$Volume, na.rm = T), 2) |
|
|
step<-round(max(dades$taula$Volume, na.rm = T)/20, 2) |
|
|
|
|
|
|
|
|
step<-round(max(dades$taula$Volume, na.rm = T)/100, 2) |
|
|
sliderInput("lowcut", "Corte inferior", min=0, max=cut.max, step=step, value=0) |
|
|
sliderInput("lowcut", "Corte inferior", min=0, max=cut.max, step=step, value=0) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
@ -199,7 +203,7 @@ server <- function(input, output) { |
|
|
test.list[data]<-summary(res.aov)[[1]][[4]][1] |
|
|
test.list[data]<-summary(res.aov)[[1]][[4]][1] |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
index<-which(unlist(lvn.list) == min(unlist(lvn.list)[which(unlist(pval.list) %in% sort(unlist(pval.list), decreasing = T)[1:20])])) |
|
|
|
|
|
|
|
|
index<-which(unlist(lvn.list) == min(unlist(lvn.list)[which(unlist(pval.list) %in% sort(unlist(pval.list), decreasing = T)[1:20])]))[1] |
|
|
# print(df_sex) |
|
|
# print(df_sex) |
|
|
df_def[[sex.var]]<-merge(df_sex %>% select(-group), ind.list[[index]]) |
|
|
df_def[[sex.var]]<-merge(df_sex %>% select(-group), ind.list[[index]]) |
|
|
} |
|
|
} |
|
@ -211,8 +215,10 @@ server <- function(input, output) { |
|
|
} |
|
|
} |
|
|
df_def<-merge( |
|
|
df_def<-merge( |
|
|
if(!is.null(dades$sex)){merge(dades$taula, dades$sex)}else{dades$taula %>% add_column(sex="undefined")} %>% select(-Group), |
|
|
if(!is.null(dades$sex)){merge(dades$taula, dades$sex)}else{dades$taula %>% add_column(sex="undefined")} %>% select(-Group), |
|
|
df_def[,c("ID animal", "group")] %>% unique, all=T, by="ID animal") %>% |
|
|
|
|
|
select(c(`ID animal`, `sex`,`ID tumor`, Volume, Cage, Major, Minor, group)) |
|
|
|
|
|
|
|
|
df_def[,c("ID animal", "group")] %>% unique, all=T, by="ID animal") |
|
|
|
|
|
if("DPV" %in% colnames(df_def)){df_def<-select(df_def, c(`ID animal`, `sex`,`ID tumor`, Volume, Cage, Major, Minor, group))} |
|
|
|
|
|
if("TS-Deep" %in% colnames(df_def)){df_def<-select(df_def, c(`ID animal`, `sex`,`ID tumor`, Volume, Cage, `TS-Deep`,`TS-Length`,`TS-Width`, group))} |
|
|
|
|
|
|
|
|
df_def[!paste0(df_def$`ID animal`, df_def$`ID tumor`) %in% paste0(df$`ID animal`, df$`ID tumor`),"group"]<-NA |
|
|
df_def[!paste0(df_def$`ID animal`, df_def$`ID tumor`) %in% paste0(df$`ID animal`, df$`ID tumor`),"group"]<-NA |
|
|
dades$db<-df_def |
|
|
dades$db<-df_def |
|
|
|
|
|
|
|
|