Skip to content

Commit

Permalink
ECHO v 3.21: small bugfix for inputting one row
Browse files Browse the repository at this point in the history
  • Loading branch information
delosh653 authored Oct 9, 2019
1 parent ed2f9df commit 2f6d762
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions ECHO Shiny App/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ ui <- fluidPage(
"All images created by ECHO using data from:",tags$br(),
"Hurley, J. et al. 2014. PNAS. 111 (48) 16995-17002. Analysis of clock-regulated genes in Neurospora reveals widespread posttranscriptional control of metabolic potential. doi:10.1073/pnas.1418963111 ",
tags$br(),tags$br(),
tags$p("ECHO Version 3.2")
tags$p("ECHO Version 3.21")
))
)),

Expand Down Expand Up @@ -544,8 +544,7 @@ server <- function(input,output){ # aka the code behind the results
colnames(add_row) <- colnames(genes)
genes <- rbind(genes,add_row)
add_one <- TRUE # marker for appropriate displays for progress bar
}
else{
} else{
add_one <- FALSE # marker for appropriate displays for progress bar
}

Expand Down Expand Up @@ -637,13 +636,6 @@ server <- function(input,output){ # aka the code behind the results

start.time <- Sys.time() # begin counting time

# if more than one replicate or requested, an exact distribution is needed
#if (num_reps > 1 ){
# create exact distribution for pvalues
# jtklist <- jtkdist(length(timen), reps = num_reps)
# jtk.alt <- list() # preallocate pvalue distribution for missing data
#}

# prepare for parallelism
cores <- detectCores() # dectect how many processors
cl <- makeCluster(cores[1]-1) # not to overload your computer, need one for OS
Expand Down Expand Up @@ -675,6 +667,7 @@ server <- function(input,output){ # aka the code behind the results

stopCluster(cl) # stop using the clusters


# renaming columns of the final results
if (!run_conf){
colnames(total_results) <- c("Gene Name","Convergence","Iterations","Amplitude.Change.Coefficient","Oscillation Type","Initial.Amplitude","Radian.Frequency","Period","Phase Shift","Hours Shifted","Equilibrium Value", "Tau", "P-Value", paste(rep("Original TP",length(rep(timen, each = num_reps))),rep(timen, each = num_reps),rep(".",length(rep(timen, each = num_reps))),rep(c(1:num_reps), length(timen)),sep=""), paste(rep("Fitted TP",length(timen)),timen,sep=""))
Expand All @@ -686,6 +679,7 @@ server <- function(input,output){ # aka the code behind the results
# remove the fake row I added if there is only one gene
if (add_one){
total_results <- total_results[-nrow(total_results),]
beta <- beta[1]
}

# add slope
Expand Down Expand Up @@ -732,7 +726,7 @@ server <- function(input,output){ # aka the code behind the results
"harm_cut"=input$harm_cut,
"over_cut"=input$over_cut,
"seed"=input$seed,
"v_num"=3.2) # VERSION NUMBER
"v_num"=3.21) # VERSION NUMBER

# jtk run -----

Expand Down

0 comments on commit 2f6d762

Please sign in to comment.