International Rice Research Institute commited on
Commit
714ca21
·
verified ·
1 Parent(s): f9c285f

Update app.R

Browse files
Files changed (1) hide show
  1. app.R +9 -13
app.R CHANGED
@@ -6,13 +6,11 @@ library(tidyr)
6
  library(vcfR)
7
  library(ggplot2)
8
 
9
- # At the top of your app.R file, before ui definition
10
- options(shiny.maxRequestSize = 1000*1024^2)
11
  # QTL-seq Analysis Function
12
  qtlseq <- function(input_csv = NULL,
13
- output_table = "output_file.table",
14
  delta_snp_plot = NULL,
15
- qtlseq_csv = NULL,
16
  refAlleleFreq = 0.20,
17
  minTotalDepth = 100,
18
  maxTotalDepth = 400,
@@ -76,9 +74,9 @@ qtlseq <- function(input_csv = NULL,
76
  axis.title = element_text(face = "bold")
77
  )
78
 
79
- ggsave("deltaSNPIndex.png", plot = p, dpi = 600, width = 12, height = 10, units = "in")
80
 
81
- getQTLTable(SNPset = df_filt1, alpha = alpha, export = TRUE, fileName = "BSA_QTLseq.csv")
82
 
83
  return(list(QTLseqResults = df_filt1, GprimeResults = df_filt, plot = p))
84
  }
@@ -422,7 +420,7 @@ server <- function(input, output, session) {
422
 
423
  output$qtlSummary <- renderTable({
424
  req(results$data)
425
- qtl_table <- read.csv("BSA_QTLseq.csv")
426
  head(qtl_table, 10)
427
  })
428
 
@@ -436,7 +434,7 @@ server <- function(input, output, session) {
436
  paste("deltaSNPIndex_", Sys.Date(), ".png", sep = "")
437
  },
438
  content = function(file) {
439
- file.copy("deltaSNPIndex.png", file)
440
  }
441
  )
442
 
@@ -445,7 +443,7 @@ server <- function(input, output, session) {
445
  paste("BSA_QTLseq_", Sys.Date(), ".csv", sep = "")
446
  },
447
  content = function(file) {
448
- file.copy("BSA_QTLseq.csv", file)
449
  }
450
  )
451
 
@@ -454,13 +452,11 @@ server <- function(input, output, session) {
454
  paste("QTLseq_results_", Sys.Date(), ".zip", sep = "")
455
  },
456
  content = function(file) {
457
- files <- c("deltaSNPIndex.png", "BSA_QTLseq.csv", "output_file.table")
458
  zip(file, files[file.exists(files)])
459
  }
460
  )
461
  }
462
 
463
  # Run the application
464
- shinyApp(ui = ui, server = server)
465
-
466
-
 
6
  library(vcfR)
7
  library(ggplot2)
8
 
 
 
9
  # QTL-seq Analysis Function
10
  qtlseq <- function(input_csv = NULL,
11
+ output_table = "/tmp/output_file.table",
12
  delta_snp_plot = NULL,
13
+ qtlseq_csv = "/tmp/BSA_QTLseq.csv",
14
  refAlleleFreq = 0.20,
15
  minTotalDepth = 100,
16
  maxTotalDepth = 400,
 
74
  axis.title = element_text(face = "bold")
75
  )
76
 
77
+ ggsave("/tmp/deltaSNPIndex.png", plot = p, dpi = 600, width = 12, height = 10, units = "in")
78
 
79
+ getQTLTable(SNPset = df_filt1, alpha = alpha, export = TRUE, fileName = qtlseq_csv)
80
 
81
  return(list(QTLseqResults = df_filt1, GprimeResults = df_filt, plot = p))
82
  }
 
420
 
421
  output$qtlSummary <- renderTable({
422
  req(results$data)
423
+ qtl_table <- read.csv("/tmp/BSA_QTLseq.csv")
424
  head(qtl_table, 10)
425
  })
426
 
 
434
  paste("deltaSNPIndex_", Sys.Date(), ".png", sep = "")
435
  },
436
  content = function(file) {
437
+ file.copy("/tmp/deltaSNPIndex.png", file)
438
  }
439
  )
440
 
 
443
  paste("BSA_QTLseq_", Sys.Date(), ".csv", sep = "")
444
  },
445
  content = function(file) {
446
+ file.copy("/tmp/BSA_QTLseq.csv", file)
447
  }
448
  )
449
 
 
452
  paste("QTLseq_results_", Sys.Date(), ".zip", sep = "")
453
  },
454
  content = function(file) {
455
+ files <- c("/tmp/deltaSNPIndex.png", "/tmp/BSA_QTLseq.csv", "/tmp/output_file.table")
456
  zip(file, files[file.exists(files)])
457
  }
458
  )
459
  }
460
 
461
  # Run the application
462
+ shinyApp(ui = ui, server = server)