Compare commits
3 Commits
8357293f6a
...
ffc930ce5f
| Author | SHA1 | Date | |
|---|---|---|---|
| ffc930ce5f | |||
| add3f573e2 | |||
| b2d885c2c6 |
+12
-10
@@ -148,19 +148,19 @@ server <- function(input, output) {
|
||||
df<-df[!is.na(df$Volume),]
|
||||
up_cuttof<-input$upcut
|
||||
low_cuttof<-input$lowcut
|
||||
print(up_cuttof)
|
||||
# print(up_cuttof)
|
||||
df<-df[df$Volume < up_cuttof & df$Volume >= low_cuttof,]
|
||||
df<-merge(df, dades$sex)
|
||||
|
||||
# df["Mouse"]<-gsub("[a-zA-Z]", "", df$MouseID)
|
||||
print(df$Volume)
|
||||
# print(df$Volume)
|
||||
s<-shapiro.test(df$Volume)[[2]]
|
||||
|
||||
ngroup<-length(dades$groups)
|
||||
df_def<-list()
|
||||
print(head(df))
|
||||
# print(head(df))
|
||||
for (sex.var in c("male","female")){
|
||||
print(sex.var)
|
||||
# print(sex.var)
|
||||
df_sex<-df %>% filter(`sex` == sex.var)
|
||||
ind.list<-list()
|
||||
pval.list<-list()
|
||||
@@ -191,7 +191,7 @@ server <- function(input, output) {
|
||||
}
|
||||
}
|
||||
index<-which(unlist(lvn.list) == min(unlist(lvn.list)[which(unlist(pval.list) %in% sort(unlist(pval.list), decreasing = T)[1:20])]))
|
||||
print(df_sex)
|
||||
# print(df_sex)
|
||||
df_def[[sex.var]]<-merge(df_sex %>% select(-group), ind.list[[index]])
|
||||
}
|
||||
# df_def<-do.call(rbind, c(df_def, make.row.names=F))
|
||||
@@ -317,14 +317,16 @@ server <- function(input, output) {
|
||||
analysis$taula_vol<-NULL
|
||||
observe({
|
||||
if (!is.null(input$file_analy)){
|
||||
analysis$taula<-read.xlsx(input$file_analy$datapath, sheet = 1, check.names = F, sep.names = " ") %>% select(-sex)
|
||||
table<-read.xlsx(input$file_analy$datapath, sheet = 1, check.names = F, sep.names = " ")
|
||||
if ("sex" %in% colnames(table)){table<-select(table, -sex)}
|
||||
analysis$taula<-table
|
||||
}
|
||||
})
|
||||
output$cutoffUI<-renderUI({
|
||||
if (!is.null(analysis$taula_def)){
|
||||
observeEvent(analysis$taula_def, {})
|
||||
max_val<-max(analysis$taula_def$Volume, na.rm = T)
|
||||
print(max_val)
|
||||
# print(max_val)
|
||||
sliderInput("cutoff", "Cutoff para Survival", min=0, max=round(max_val), step=round(max_val)/200, value=max_val)
|
||||
}
|
||||
})
|
||||
@@ -345,7 +347,7 @@ server <- function(input, output) {
|
||||
}
|
||||
table<-melt(table, id=colnames(table)[colnames(table) %in% col_nodays], variable.name = "Timepoint")
|
||||
table$Timepoint<-gsub("[A-Za-z ]","",table$Timepoint)
|
||||
print(table)
|
||||
# print(table)
|
||||
if ("DPV" %in% colnames(table)){
|
||||
table<-dcast(table, Cage+`ID animal`+`ID tumor`+Group+Timepoint~DPV, value.var = "value")
|
||||
table$Major<-table$Major
|
||||
@@ -396,7 +398,7 @@ server <- function(input, output) {
|
||||
if (!is.null(input$file_analy) & !is.null(analysis$taula_def)){
|
||||
observeEvent(analysis$taula_def, {})
|
||||
table<-analysis$taula_def
|
||||
print(table , )
|
||||
print(table)
|
||||
if (input$vacc == "Sí"){
|
||||
ggplot(table, aes(as.numeric(as.character(Timepoint)), Volume, color=Group, group=`ID animal`))+
|
||||
# geom_errorbar(stat="summary", width=0.05)+
|
||||
@@ -408,7 +410,7 @@ server <- function(input, output) {
|
||||
labs(x="Days after tumor challenge")+
|
||||
theme_bw()
|
||||
}else{
|
||||
ggplot(table, aes(Timepoint, Volume, color=Group, group=`ID animal`))+
|
||||
ggplot(table, aes(Timepoint, Volume, color=Group, group=paste0(`ID animal`, `ID tumor`)))+
|
||||
# geom_errorbar(stat="summary", width=0.05)+
|
||||
geom_line()+
|
||||
geom_point()+
|
||||
|
||||
Reference in New Issue
Block a user