opt_home.R 32 KB
Newer Older
jlopez's avatar
Proto    
jlopez committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

output$dtrcranpackage <- DT::renderDataTable({
  
  
  result <- allCRAN
  
  return(result)
}, filter='top', escape = FALSE, rownames= FALSE,server = TRUE)

output$dtrbioconductorpackage <- DT::renderDataTable({
  result <- allBIO
  
  return(result)
}, filter='top', escape = FALSE, rownames= FALSE,server = TRUE)

output$dtrgithubpackage <- DT::renderDataTable({
  result <- data.frame(Package=character(),
                             Version=character())
  
  return(result)
}, filter='top', escape = FALSE, rownames= FALSE,server = TRUE)

jlopez's avatar
jlopez committed
23
24
25
26
27
28
29
30
31
32
33
output$dtbiocontainer <- DT::renderDataTable({
  result <- data.frame(Tool=character(),
                       Version=character(),
                       Description=character())

  result <- getBioconductorPackage()
  
  
  return(result)
}, filter='top', escape = FALSE, rownames= FALSE,server = TRUE)

jlopez's avatar
jlopez committed
34
35
36
37
38
39
40
41
42
43
44
45
46
getWorkflows

output$dtWorkflows <- DT::renderDataTable({
  result <- data.frame(Workflow=character(),
                       Author=character(),
                       Version=character(),
                       Description=character())
  
  result <- getWorkflows()
  
  
  return(result)
}, filter='top', escape = FALSE, rownames= FALSE,server = TRUE)
jlopez's avatar
jlopez committed
47
48


jlopez's avatar
jlopez committed
49
50
51
52
53
54
createHeader <- function() {
  
  result <- ""
  
  if(input$containerType == "singularity") {
    result <- "Bootstrap: docker"
jlopez's avatar
jlopez committed
55
    result <- paste0(result, "\nFrom: ",  input$fromTemplate)
jlopez's avatar
jlopez committed
56
57
    result <- paste(result, "IncludeCmd: yes", sep = "\n")
  } else { # else docker
jlopez's avatar
jlopez committed
58
    result <- paste0("FROM ", input$fromTemplate)
jlopez's avatar
jlopez committed
59
  }
jlopez's avatar
jlopez committed
60

jlopez's avatar
jlopez committed
61
62
63
  result <- paste0(result, "\n")
  return(result)
}
jlopez's avatar
Proto    
jlopez committed
64

jlopez's avatar
jlopez committed
65
createEnv <- function(result) {
jlopez's avatar
jlopez committed
66
  
jlopez's avatar
jlopez committed
67
68
69
70
71
72
73
  Rversion = "3.4.3" 
  if(input$rtemplate == "source2") {
    Rversion = "3.4.4" 
  }else if(input$rtemplate == "source3") {
    Rversion = "3.5.0" 
  }
  
jlopez's avatar
jlopez committed
74
75
76
  if(input$containerType == "singularity") {
      result <- paste(result, "%environment", sep = "\n")
    
jlopez's avatar
Fix    
jlopez committed
77
      if(input$rtemplate == "none" || input$fromTemplate == "r-base") {
jlopez's avatar
jlopez committed
78
79
80
81
82
83
84
        
      } else if(input$rtemplate == "base") {
        result <- paste(result, "\tR_VERSION=3.2.5", sep = "\n")
        result <- paste(result, "\texport R_VERSION", sep = "\n")
        result <- paste(result, "\tR_CONFIG_DIR=/etc/R/", sep = "\n")
        result <- paste(result, "\texport R_CONFIG_DIR", sep = "\n")
      } else {
jlopez's avatar
jlopez committed
85
86

        result <- paste0(result, "\n\tR_VERSION=", Rversion)
jlopez's avatar
jlopez committed
87
88
89
90
91
        result <- paste(result, "\texport R_VERSION", sep = "\n")
        result <- paste(result, "\tR_CONFIG_DIR=/etc/R/", sep = "\n")
        result <- paste(result, "\texport R_CONFIG_DIR", sep = "\n")
      }
      
jlopez's avatar
jlopez committed
92
93
      
      haveB <- FALSE 
jlopez's avatar
jlopez committed
94
      if(!is.null(input$dtbiocontainer_rows_all)) {
jlopez's avatar
jlopez committed
95
        haveB <- TRUE
jlopez's avatar
jlopez committed
96
97
        result <- paste(result, "\texport PATH=/opt/conda/bin:$PATH", sep = "\n")
        result <- paste(result, "\texport PATH=/opt/biotools/bin:$PATH", sep = "\n")
jlopez's avatar
jlopez committed
98
99
        result <- paste(result, "\texport ROOTSYS=/opt/biotools/root", sep = "\n")
        result <- paste(result, "\texport LD_LIBRARY_PATH='$LD_LIBRARY_PATH:$ROOTSYS/lib'", sep = "\n")
jlopez's avatar
jlopez committed
100
101
        
        result <- createPathBiocontainer(result)
jlopez's avatar
jlopez committed
102
      }
jlopez's avatar
jlopez committed
103
      
jlopez's avatar
jlopez committed
104
105
106
107
108
109
110
111
112
113
114
115
      if(!is.null(input$dtWorkflows_rows_all)) {
        if(!haveB) {
          result <- paste(result, "\texport PATH=/opt/conda/bin:$PATH", sep = "\n")
          result <- paste(result, "\texport PATH=/opt/biotools/bin:$PATH", sep = "\n")
          result <- paste(result, "\texport ROOTSYS=/opt/biotools/root", sep = "\n")
          result <- paste(result, "\texport LD_LIBRARY_PATH='$LD_LIBRARY_PATH:$ROOTSYS/lib'", sep = "\n")
        }

        result <- paste(result, "\texport PATH=/opt/workflows/bin:$PATH", sep = "\n")
        result <- createPathWorkflow(result)
      }
      
jlopez's avatar
jlopez committed
116
      
jlopez's avatar
jlopez committed
117
  } else {
jlopez's avatar
Fix    
jlopez committed
118
      if(input$rtemplate == "none" || input$fromTemplate == "r-base") {
jlopez's avatar
jlopez committed
119
120
        
      } else if(input$rtemplate == "base") {
jlopez's avatar
jlopez committed
121
        result <- paste0(result, "ENV R_VERSION=", Rversion)
jlopez's avatar
jlopez committed
122
123
124
125
126
127
128
129
130
131
132
        result <- paste(result, "RUN export R_VERSION", sep = "\n")
        result <- paste(result, "ENV R_CONFIG_DIR=/etc/R/", sep = "\n")
        result <- paste(result, "RUN export R_CONFIG_DIR", sep = "\n")
        
      } else {
        result <- paste(result, "ENV R_VERSION=3.4.3", sep = "\n")
        result <- paste(result, "RUN export R_VERSION", sep = "\n")
        result <- paste(result, "ENV R_CONFIG_DIR=/etc/R/", sep = "\n")
        result <- paste(result, "RUN export R_CONFIG_DIR", sep = "\n")
      }
      
jlopez's avatar
jlopez committed
133
      haveB <- FALSE
jlopez's avatar
jlopez committed
134
      if(!is.null(input$dtbiocontainer_rows_all)) {
jlopez's avatar
jlopez committed
135
        haveB <- TRUE
jlopez's avatar
jlopez committed
136
137
        result <- paste(result, "RUN export PATH=/opt/conda/bin:$PATH", sep = "\n")
        result <- paste(result, "RUN export PATH=/opt/biotools/bin:$PATH", sep = "\n")
jlopez's avatar
jlopez committed
138
139
140
        result <- paste(result, "RUN export ROOTSYS=/opt/biotools/root", sep = "\n")
        result <- paste(result, "RUN export LD_LIBRARY_PATH='$LD_LIBRARY_PATH:$ROOTSYS/lib'", sep = "\n")
        
jlopez's avatar
jlopez committed
141
        result <- createPathBiocontainer(result)
jlopez's avatar
jlopez committed
142
      }
jlopez's avatar
jlopez committed
143
144
145
146
147
148
149
150
151
152
153
    
      if(!is.null(input$dtWorkflows_rows_all)) {
        if(!haveB) {
          result <- paste(result, "RUN export PATH=/opt/conda/bin:$PATH", sep = "\n")
          result <- paste(result, "RUN export PATH=/opt/biotools/bin:$PATH", sep = "\n")
          result <- paste(result, "RUN export ROOTSYS=/opt/biotools/root", sep = "\n")
          result <- paste(result, "RUN export LD_LIBRARY_PATH='$LD_LIBRARY_PATH:$ROOTSYS/lib'", sep = "\n")
        }
        result <- paste(result, "RUN export PATH=/opt/workflows/bin:$PATH", sep = "\n")
        result <- createPathWorkflow(result)
      }
jlopez's avatar
jlopez committed
154
155
156
157
158
159
160
161
162
163
  }

  result <- paste0(result, "\n")
  return(result)
}

createLabel <- function(result) {
  
    if(input$containerType == "singularity") {
        result <- paste(result, "%labels", sep = "\n")
jlopez's avatar
jlopez committed
164
        result <- paste(result, "\tAuthor YourName", sep = "\n")
jlopez's avatar
jlopez committed
165
166
167
        result <- paste(result, "\tVersion v0.0.1", sep = "\n")
        result <- paste0(result, "\n\tbuild_date ", format(Sys.time(), "%Y %b %d")) 
    } else {
jlopez's avatar
jlopez committed
168
      result <- paste(result, "LABEL Author YourName", sep = "\n")
jlopez's avatar
jlopez committed
169
170
171
172
173
174
175
176
177
      result <- paste(result, "LABEL Version v0.0.1", sep = "\n")
      result <- paste0(result, "\n", "LABEL build_date ", format(Sys.time(), "%Y %b %d")) 
    }

    result <- paste0(result, "\n")
    return(result)
}

createExect <- function(result) {
jlopez's avatar
jlopez committed
178
  
jlopez's avatar
jlopez committed
179
180
181
182
183
184
185
186
187
    if(input$containerType == "singularity") {
        result <- paste(result, "%apprun run", sep = "\n")
        result <- paste(result, '\texec /bin/bash "$@"', sep = "\n")
        result <- paste0(result, "\n")
        result <- paste(result, "%runscript", sep = "\n")
        result <- paste(result, '\texec /bin/bash "$@"', sep = "\n")
    } else {
        result <- paste(result, "CMD exec /bin/bash \"$@\"", sep = "\n")
    }
jlopez's avatar
Proto    
jlopez committed
188
  
jlopez's avatar
jlopez committed
189
190
191
192
193
    result <- paste0(result, "\n")
    return(result)
}

createLibPrePost <- function(result) {
jlopez's avatar
Proto    
jlopez committed
194
  
jlopez's avatar
jlopez committed
195
196
197
198
199
200
  if(input$containerType == "singularity") {
      result <- paste(result, "%post", sep = "\n")
      result <- paste(result, "\tapt-get update", sep = "\n")
      result <- paste(result, "\tapt-get install -y wget libblas3 libblas-dev liblapack-dev liblapack3 curl", sep = "\n")
      result <- paste(result, "\tapt-get install -y gcc fort77 aptitude", sep = "\n")
      result <- paste(result, "\taptitude install -y g++ xorg-dev libreadline-dev  gfortran", sep = "\n")
jlopez's avatar
Update    
jlopez committed
201
      result <- paste(result, "\tapt-get install -y libssl-dev libxml2-dev libpcre3-dev liblzma-dev libbz2-dev libcurl4-openssl-dev git", sep = "\n")
jlopez's avatar
jlopez committed
202
      result <- paste(result, "\tapt-get update", sep = "\n")
jlopez's avatar
jlopez committed
203
  } else {
jlopez's avatar
jlopez committed
204
205
206
207
208
209
      result <- paste(result, "RUN apt-get update", sep = "\n")
      result <- paste(result, "RUN apt-get install -y wget libblas3 libblas-dev liblapack-dev liblapack3 curl", sep = "\n")
      result <- paste(result, "RUN apt-get install -y gcc fort77 aptitude", sep = "\n")
      result <- paste(result, "RUN aptitude install -y g++ xorg-dev libreadline-dev  gfortran", sep = "\n")
      result <- paste(result, "RUN apt-get install -y libssl-dev libxml2-dev libpcre3-dev liblzma-dev libbz2-dev libcurl4-openssl-dev openjdk-8-jre", sep = "\n")
      result <- paste(result, "RUN apt-get update", sep = "\n")
jlopez's avatar
jlopez committed
210
211
      result <- paste(result, "ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64", sep = "\n")
      
jlopez's avatar
jlopez committed
212
213
  }
  
jlopez's avatar
jlopez committed
214
215
216
217
  result <- paste0(result, "\n")
  return(result)
}

jlopez's avatar
jlopez committed
218
#' Use for create install R from RBase content
jlopez's avatar
jlopez committed
219
220
createRBase <- function(result) {
  
jlopez's avatar
jlopez committed
221
222
  result <- paste(result, '############### Install R From RBase ##############', sep = "\n")
  
jlopez's avatar
jlopez committed
223
224
225
226
  if(input$containerType == "singularity") {
      result <- paste(result, "\tapt-get install -y r-base r-base-dev", sep = "\n")
  } else {
    result <- paste(result, "RUN apt-get install -y r-base r-base-dev", sep = "\n")
jlopez's avatar
jlopez committed
227
228
  }
  
jlopez's avatar
jlopez committed
229
230
231
  result <- paste0(result, "\n")
  return(result)
}
jlopez's avatar
jlopez committed
232

jlopez's avatar
jlopez committed
233
#' Use for create install R from Source content
jlopez's avatar
jlopez committed
234
235
236
createRSource <- function(result, Rversion) {
  
  result <- paste(result, '############### Install R From Source ##############', sep = "\n")
jlopez's avatar
Proto    
jlopez committed
237
  
jlopez's avatar
jlopez committed
238
239
  if(input$containerType == "singularity") {
      result <- paste(result, '\tcd $HOME', sep = "\n")
jlopez's avatar
jlopez committed
240
241
242
      result <- paste0(result, '\n\twget https://cran.rstudio.com/src/base/R-3/R-', Rversion, '.tar.gz')
      result <- paste0(result, '\n\ttar xvf R-', Rversion, '.tar.gz')
      result <- paste0(result, '\n\tcd R-', Rversion)
jlopez's avatar
jlopez committed
243
244
245
246
247
      result <- paste(result, "\t./configure --enable-R-static-lib --with-blas --with-lapack --enable-R-shlib=yes ", sep = "\n") 
      result <- paste(result, "\tmake", sep = "\n") 
      result <- paste(result, "\tmake install", sep = "\n") 
  } else {
    result <- paste(result, 'RUN cd $HOME \\', sep = "\n")
jlopez's avatar
jlopez committed
248
249
250
    result <- paste0(result, '\n\t&& wget https://cran.rstudio.com/src/base/R-3/R-', Rversion, '.tar.gz \\')
    result <- paste0(result, '\n\t&& tar xvf R-', Rversion, '.tar.gz \\')
    result <- paste0(result, '\n\t&& cd R-', Rversion, ' \\')
jlopez's avatar
jlopez committed
251
252
253
254
    result <- paste(result, "\t&& ./configure --enable-R-static-lib --with-blas --with-lapack --enable-R-shlib=yes \\", sep = "\n") 
    result <- paste(result, "\t&& make \\", sep = "\n") 
    result <- paste(result, "\t&& make install \\", sep = "\n") 
  }
jlopez's avatar
Proto    
jlopez committed
255
  
jlopez's avatar
jlopez committed
256
257
258
259
  result <- paste0(result, "\n")
  return(result)
}

jlopez's avatar
jlopez committed
260
#' Use for create install R from CRAN content
jlopez's avatar
jlopez committed
261
createRCran <- function(result) {
jlopez's avatar
Proto    
jlopez committed
262
  
jlopez's avatar
jlopez committed
263
264
  result <- paste(result, '############### Install R From CRAN ##############', sep = "\n")
  
jlopez's avatar
jlopez committed
265
266
267
268
269
270
271
272
273
274
275
276
277
  if(input$containerType == "singularity") {
      result <- paste(result, "\tapt-get install -y software-properties-common", sep = "\n")
      result <- paste(result, "\tadd-apt-repository 'deb http://cloud.r-project.org/bin/linux/ubuntu xenial/'", sep = "\n")
      result <- paste(result, "\tapt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9", sep = "\n")
      result <- paste(result, "\tapt-get update", sep = "\n")
      result <- paste(result, "\tapt-get install -y r-base r-base-dev", sep = "\n")
  } else {
      result <- paste(result, "RUN apt-get install -y software-properties-common", sep = "\n")
      result <- paste(result, "RUN add-apt-repository 'deb http://cloud.r-project.org/bin/linux/ubuntu xenial/'", sep = "\n")
      result <- paste(result, "RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9", sep = "\n")
      result <- paste(result, "RUN apt-get update", sep = "\n")
      result <- paste(result, "RUN apt-get install -y r-base r-base-dev", sep = "\n")
  }
jlopez's avatar
Proto    
jlopez committed
278
  
jlopez's avatar
jlopez committed
279
280
281
282
  result <- paste0(result, "\n")
  return(result)
}

jlopez's avatar
jlopez committed
283
#' Use for create CRAN content
jlopez's avatar
jlopez committed
284
createCRANPackage <- function(result) {
jlopez's avatar
Proto    
jlopez committed
285
  
jlopez's avatar
jlopez committed
286
287
  
  
jlopez's avatar
jlopez committed
288
  selectCRAN <- input$selectedCRAN
jlopez's avatar
jlopez committed
289
  sizeCRAN <- length(selectCRAN)
jlopez's avatar
Proto    
jlopez committed
290
291
  
  
jlopez's avatar
jlopez committed
292
293
294
295
  if(!is.null(sizeCRAN)) {
    if(sizeCRAN < length(allCRAN[,"Package"])) { 
      if(sizeCRAN >= 1) { 
        
jlopez's avatar
jlopez committed
296
297
        result <- paste(result, '############### Install CRAN Package ##############', sep = "\n")
        
jlopez's avatar
jlopez committed
298
        if(input$containerType == "singularity") {
jlopez's avatar
jlopez committed
299
          listRCRAN <- '\tR --slave -e "install.packages( c('
jlopez's avatar
jlopez committed
300
        } else {
jlopez's avatar
jlopez committed
301
          listRCRAN <- 'RUN R --slave -e "install.packages( c('
jlopez's avatar
jlopez committed
302
303
304
305
        }
        
        for (pkg in 1:sizeCRAN){
          if(pkg < sizeCRAN) {
jlopez's avatar
jlopez committed
306
            listRCRAN <- paste0(listRCRAN, "'",selectCRAN[pkg],"', ")
jlopez's avatar
jlopez committed
307
          } else {
jlopez's avatar
jlopez committed
308
            listRCRAN <- paste0(listRCRAN, "'",selectCRAN[pkg],"'), repos='https://cloud.r-project.org'))\"")
jlopez's avatar
jlopez committed
309
310
311
312
313
314
315
316
          }
        }
        
        result <- paste(result, listRCRAN, sep = "\n")
        result <- paste0(result, "\n")
      }
    }
  }
jlopez's avatar
Proto    
jlopez committed
317
  
jlopez's avatar
jlopez committed
318
319
320
  return(result)
}

jlopez's avatar
jlopez committed
321
#' Use for create Github content
jlopez's avatar
jlopez committed
322
createGithubPackage <- function(result) {
jlopez's avatar
Proto    
jlopez committed
323
  
jlopez's avatar
jlopez committed
324
  if(!is.null(input$rgithubpackagelist)) {
jlopez's avatar
Proto    
jlopez committed
325
  
jlopez's avatar
jlopez committed
326
327
    selectGithub <- input$rgithubpackagelist
    sizeGITHUB <- length(selectGithub)
jlopez's avatar
jlopez committed
328
    
jlopez's avatar
jlopez committed
329
330
    if(sizeGITHUB >= 1) {
      
jlopez's avatar
jlopez committed
331
332
333
      result <- paste(result, '############### Install Github Package ##############', sep = "\n")
      
      
jlopez's avatar
jlopez committed
334
335
336
337
338
339
340
341
342
343
344
345
      if(input$containerType == "singularity") {
        listRGITHUB <- '\tR --slave -e "install_github(c('
      } else {
        listRGITHUB <- 'RUN R --slave -e "install_github(c('
      }
      
      
      for (pkg in 1:sizeGITHUB){
        if(pkg < sizeGITHUB) {
          listRGITHUB <- paste0(listRGITHUB, '\'',selectGithub[pkg],'\', ')
        } else {
          listRGITHUB <- paste0(listRGITHUB, '\'',selectGithub[pkg],'\'))"')
jlopez's avatar
jlopez committed
346
        }
jlopez's avatar
jlopez committed
347
348
349
350
351
      }
      result <- paste(result, listRGITHUB, sep = "\n")
      
    }
  }
jlopez's avatar
Proto    
jlopez committed
352
  
jlopez's avatar
jlopez committed
353

jlopez's avatar
Fix bug    
jlopez committed
354
  
jlopez's avatar
jlopez committed
355
356
357
  result <- paste0(result, "\n")
  return(result)
}
jlopez's avatar
jlopez committed
358

jlopez's avatar
jlopez committed
359
#' Use for create Bioconductor content
jlopez's avatar
jlopez committed
360
createBioconductorPackage <- function(result) {
jlopez's avatar
jlopez committed
361
  
jlopez's avatar
jlopez committed
362
  selectBIO <- input$selectedConductor
jlopez's avatar
jlopez committed
363
364
  sizeBIO <- length(selectBIO)
  
jlopez's avatar
jlopez committed
365
366
  
  
jlopez's avatar
jlopez committed
367
368
369
  if(!is.null(sizeBIO)) {
    if(sizeBIO < length(allBIO[,"Package"])) { 
      if(sizeBIO >= 1) { 
jlopez's avatar
jlopez committed
370
        
jlopez's avatar
jlopez committed
371
372
373
        result <- paste(result, '############### Install Bioconductor Package ##############', sep = "\n")
        
        
jlopez's avatar
jlopez committed
374
375
        if(input$containerType == "singularity") {
          result <- paste(result, '\tR --slave -e "source(\'https://bioconductor.org/biocLite.R\'); biocLite(); "', sep = "\n")
jlopez's avatar
jlopez committed
376
          listRBIO <- '\tR --slave -e "source(\'https://bioconductor.org/biocLite.R\'); biocLite('
jlopez's avatar
jlopez committed
377
378
        } else {
          result <- paste(result, 'RUN R --slave -e "source(\'https://bioconductor.org/biocLite.R\'); biocLite(); "', sep = "\n")
jlopez's avatar
jlopez committed
379
          listRBIO <- 'RUN R --slave -e "source(\'https://bioconductor.org/biocLite.R\'); biocLite('
jlopez's avatar
jlopez committed
380
        }
jlopez's avatar
jlopez committed
381
      
jlopez's avatar
jlopez committed
382
383
384
385
386
387
388
        for (pkg in 1:sizeBIO){
          if(pkg < sizeBIO) {
            listRBIO <- paste0(listRBIO, '\'',selectBIO[pkg],'\', ')
          } else {
            listRBIO <- paste0(listRBIO, '\'',selectBIO[pkg],'\')"')
          }
        }
jlopez's avatar
jlopez committed
389
        
jlopez's avatar
jlopez committed
390
391
392
393
394
        result <- paste(result, listRBIO, sep = "\n")
        result <- paste0(result, "\n")
      }
    }
  }
jlopez's avatar
jlopez committed
395
  
jlopez's avatar
jlopez committed
396
397
  return(result)
}
jlopez's avatar
jlopez committed
398

jlopez's avatar
jlopez committed
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432

createPathWorkflow <- function(result) {
  
  if(input$containerType == "singularity") {
    selectBioTool <- input$selectedWorkflows
    for (tool in selectBioTool){
      
      to <- getInstallToolEnvWorkflows(tool, input$containerType)
      
      if(is.character(to)) {
        result <- paste0(result, "\n\t", to)
      }
      
    }
    
  } else {
    selectBioTool <- input$selectedWorkflows
    for (tool in selectBioTool){
      
      to <- getInstallToolEnvWorkflows(tool, input$containerType)
      
      if(is.character(to)) {
        result <- paste0(result, "\nRUN ", to)
      }
      
    }
    
  }
  
  return(result)
  
}


jlopez's avatar
jlopez committed
433
createPathBiocontainer <- function(result) {
jlopez's avatar
jlopez committed
434

jlopez's avatar
jlopez committed
435
436
437
  if(input$containerType == "singularity") {
    selectBioTool <- input$selectedBiocontainer
    for (tool in selectBioTool){
jlopez's avatar
jlopez committed
438
    
jlopez's avatar
jlopez committed
439
      to <- getInstallToolEnvBioContainer(tool, input$containerType)
jlopez's avatar
jlopez committed
440
    
jlopez's avatar
jlopez committed
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
      if(is.character(to)) {
        result <- paste0(result, "\n\t", to)
      }
  
    }
    
  } else {
    selectBioTool <- input$selectedBiocontainer
    for (tool in selectBioTool){
      
      to <- getInstallToolEnvBioContainer(tool, input$containerType)
      
      if(is.character(to)) {
        result <- paste0(result, "\nRUN ", to)
      }
      
    }
    
  }
  
  return(result)
  
jlopez's avatar
jlopez committed
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
}
#' Use for create Workflows content
createWorkflows <- function(result, haveR, haveConda) {
  
  if(input$containerType == "singularity") {
    selectWorkflows <- input$selectedWorkflows
    
    result <- paste0(result, "\n")
    
    if(!haveConda) {
    
        result <- paste(result, "\tapt-get install -y  autotools-dev automake cmake curl grep sed dpkg fuse git zip openjdk-8-jre build-essential pkg-config python python-dev python-pip bzip2 ca-certificates libglib2.0-0 libxext6 libsm6 libxrender1 mercurial subversion zlib1g-dev libncurses5-dev libncursesw5-dev", sep = "\n")
        result <- paste(result, "\tapt-get update", sep = "\n")
        
        result <- paste0(result, "\n")
        
        result <- paste(result, "\techo \'export PATH=/opt/conda/bin:$PATH\' > /etc/profile.d/conda.sh && \\",
                        "\twget --quiet https://repo.continuum.io/miniconda/Miniconda2-4.0.5-Linux-x86_64.sh -O ~/miniconda.sh && \\",
                        "\t/bin/bash ~/miniconda.sh -b -p /opt/conda && \\",
                        "\trm ~/miniconda.sh", sep = "\n")
        
        result <- paste0(result, "\n")
        
        result <- paste(result, "\tTINI_VERSION=`curl https://github.com/krallin/tini/releases/latest | grep -o \"/v.*\\\"\" | sed \'s:^..\\(.*\\).$:\\1:\'` && \\",
                        "\tcurl -L \"https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini_${TINI_VERSION}.deb\" > tini.deb && \\",
                        "\tdpkg -i tini.deb && \\",
                        "\trm tini.deb && \\",
                        "\tapt-get clean", sep = "\n")
        
        result <- paste0(result, "\n")
        
        result <- paste(result, '\tif [ ! -d "/opt/biotools" ];then mkdir /opt/biotools; fi', sep = "\n")
        result <- paste(result, '\tif [ ! -d "/opt/biotools/bin" ];then mkdir /opt/biotools/bin; fi', sep = "\n")
        result <- paste(result, "\tchmod 777 -R /opt/biotools/", sep = "\n")
        result <- paste(result, "\texport PATH=/opt/biotools/bin:$PATH", sep = "\n")
        
        result <- paste(result, "\tchmod 777 -R /opt/conda/", sep = "\n")
        result <- paste(result, "\texport PATH=/opt/conda/bin:$PATH", sep = "\n")
        
        if(!haveR) {
          result <- paste(result, "\tconda config --add channels r", sep = "\n")
        }
        
        result <- paste(result, "\tconda config --add channels bioconda", sep = "\n")
        result <- paste(result, "\tconda upgrade conda", sep = "\n")
        
        result <- paste0(result, "\n")
    
    }
    
    result <- paste(result, '\tif [ ! -d "/opt/workflows" ];then mkdir /opt/workflows; fi', sep = "\n")
    result <- paste(result, '\tif [ ! -d "/opt/workflows/bin" ];then mkdir /opt/workflows/bin; fi', sep = "\n")
    result <- paste(result, "\tchmod 777 -R /opt/workflows/", sep = "\n")
    result <- paste(result, "\texport PATH=/opt/workflows/bin:$PATH", sep = "\n")
    
    for (tool in selectWorkflows){
      
      result <- paste(result, '############### Install Workflow tools ##############', sep = "\n")
      
      
      result <- paste(result, getInstallToolPackageWorkflow(tool, input$containerType), sep="\n\n")
    }
  } else {
    selectBioTool <- input$selectedBiocontainer
    
    result <- paste0(result, "\n")
    
    if(!haveConda) {
    
        result <- paste(result, "RUN apt-get install -y  autotools-dev automake cmake curl grep sed dpkg fuse git zip openjdk-8-jre build-essential pkg-config python python-dev python-pip bzip2 ca-certificates libglib2.0-0 libxext6 libsm6 libxrender1 mercurial subversion zlib1g-dev libncurses5-dev libncursesw5-dev", sep = "\n")
        result <- paste(result, "RUN apt-get update", sep = "\n")
        
        result <- paste0(result, "\n")
        
        result <- paste(result, "RUN echo \'export PATH=/opt/conda/bin:$PATH\' > /etc/profile.d/conda.sh && \\",
                        "\twget --quiet https://repo.continuum.io/miniconda/Miniconda2-4.0.5-Linux-x86_64.sh -O ~/miniconda.sh && \\",
                        "\t/bin/bash ~/miniconda.sh -b -p /opt/conda && \\",
                        "\trm ~/miniconda.sh", sep = "\n")
        
        result <- paste0(result, "\n")
        
        result <- paste(result, "RUN TINI_VERSION=`curl https://github.com/krallin/tini/releases/latest | grep -o \"/v.*\\\"\" | sed \'s:^..\\(.*\\).$:\\1:\'` && \\",
                        "\tcurl -L \"https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini_${TINI_VERSION}.deb\" > tini.deb && \\",
                        "\tdpkg -i tini.deb && \\",
                        "\trm tini.deb && \\",
                        "\tapt-get clean", sep = "\n")
        
        result <- paste0(result, "\n")
        
        result <- paste(result, "RUN mkdir /opt/biotools", sep = "\n")
        result <- paste(result, "RUN mkdir /opt/biotools/bin", sep = "\n")
        result <- paste(result, "RUN chmod 777 -R /opt/biotools/", sep = "\n")
        result <- paste(result, "ENV PATH=/opt/biotools/bin:${PATH}", sep = "\n")
        
        result <- paste(result, "RUN chmod 777 -R /opt/conda/", sep = "\n")
        result <- paste(result, "ENV PATH=/opt/conda/bin:${PATH}", sep = "\n")
        
        if(!haveR) {
          result <- paste(result, "RUN conda config --add channels r", sep = "\n")
        }
        
        result <- paste(result, "RUN conda config --add channels bioconda", sep = "\n")
        result <- paste(result, "RUN conda upgrade conda", sep = "\n")
        
        result <- paste0(result, "\n")
    
    }
    
    result <- paste(result, "RUN mkdir /opt/workflows", sep = "\n")
    result <- paste(result, "RUN mkdir /opt/workflows/bin", sep = "\n")
    result <- paste(result, "RUN chmod 777 -R /opt/workflows/", sep = "\n")
    result <- paste(result, "ENV PATH=/opt/workflows/bin:${PATH}", sep = "\n")
    
    for (tool in selectBioTool){
      
      result <- paste(result, '############### Install Workflow ##############', sep = "\n")
      
      
      result <- paste0(result, "\nRUN ", getInstallToolPackageWorkflow(tool, input$containerType))
    }
    
  }
  
  result <- paste0(result, "\n")
  return(result)
  
jlopez's avatar
jlopez committed
589
590
}

jlopez's avatar
jlopez committed
591
#' Use for create Biocontainer content
jlopez's avatar
jlopez committed
592
createBiocontainer <- function(result, haveR) {
jlopez's avatar
jlopez committed
593

jlopez's avatar
jlopez committed
594
  if(input$containerType == "singularity") {
jlopez's avatar
jlopez committed
595
    selectBioTool <- input$selectedBiocontainer
jlopez's avatar
jlopez committed
596
597
598
    
    result <- paste0(result, "\n")
    
jlopez's avatar
jlopez committed
599
    result <- paste(result, "\tapt-get install -y  autotools-dev automake cmake curl grep sed dpkg fuse git zip openjdk-8-jre build-essential pkg-config python python-dev python-pip bzip2 ca-certificates libglib2.0-0 libxext6 libsm6 libxrender1 mercurial subversion zlib1g-dev libncurses5-dev libncursesw5-dev", sep = "\n")
jlopez's avatar
jlopez committed
600
    result <- paste(result, "\tapt-get update", sep = "\n")
jlopez's avatar
jlopez committed
601
602
603
604
    
    result <- paste0(result, "\n")
    
    result <- paste(result, "\techo \'export PATH=/opt/conda/bin:$PATH\' > /etc/profile.d/conda.sh && \\",
jlopez's avatar
jlopez committed
605
606
607
                    "\twget --quiet https://repo.continuum.io/miniconda/Miniconda2-4.0.5-Linux-x86_64.sh -O ~/miniconda.sh && \\",
                    "\t/bin/bash ~/miniconda.sh -b -p /opt/conda && \\",
                    "\trm ~/miniconda.sh", sep = "\n")
jlopez's avatar
jlopez committed
608
609
    
    result <- paste0(result, "\n")
jlopez's avatar
jlopez committed
610
    
jlopez's avatar
jlopez committed
611
    result <- paste(result, "\tTINI_VERSION=`curl https://github.com/krallin/tini/releases/latest | grep -o \"/v.*\\\"\" | sed \'s:^..\\(.*\\).$:\\1:\'` && \\",
jlopez's avatar
jlopez committed
612
613
614
615
                    "\tcurl -L \"https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini_${TINI_VERSION}.deb\" > tini.deb && \\",
                    "\tdpkg -i tini.deb && \\",
                    "\trm tini.deb && \\",
                    "\tapt-get clean", sep = "\n")
jlopez's avatar
jlopez committed
616
617
    
    result <- paste0(result, "\n")
jlopez's avatar
jlopez committed
618
  
khalid's avatar
khalid committed
619
620
    result <- paste(result, '\tif [ ! -d "/opt/biotools" ];then mkdir /opt/biotools; fi', sep = "\n")
    result <- paste(result, '\tif [ ! -d "/opt/biotools/bin" ];then mkdir /opt/biotools/bin; fi', sep = "\n")
jlopez's avatar
jlopez committed
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
    result <- paste(result, "\tchmod 777 -R /opt/biotools/", sep = "\n")
    result <- paste(result, "\texport PATH=/opt/biotools/bin:$PATH", sep = "\n")
    
    result <- paste(result, "\tchmod 777 -R /opt/conda/", sep = "\n")
    result <- paste(result, "\texport PATH=/opt/conda/bin:$PATH", sep = "\n")
    
    if(!haveR) {
      result <- paste(result, "\tconda config --add channels r", sep = "\n")
    }
    
    result <- paste(result, "\tconda config --add channels bioconda", sep = "\n")
    result <- paste(result, "\tconda upgrade conda", sep = "\n")
    
    result <- paste0(result, "\n")
    
    for (tool in selectBioTool){
jlopez's avatar
jlopez committed
637
638
639
640
      
      result <- paste(result, '############### Install BioContainer tools ##############', sep = "\n")
      
      
jlopez's avatar
jlopez committed
641
642
643
644
645
646
647
      result <- paste(result, getInstallToolPackageBioContainer(tool, input$containerType), sep="\n\n")
    }
  } else {
    selectBioTool <- input$selectedBiocontainer
    
    result <- paste0(result, "\n")
    
jlopez's avatar
jlopez committed
648
    result <- paste(result, "RUN apt-get install -y  autotools-dev automake cmake curl grep sed dpkg fuse git zip openjdk-8-jre build-essential pkg-config python python-dev python-pip bzip2 ca-certificates libglib2.0-0 libxext6 libsm6 libxrender1 mercurial subversion zlib1g-dev libncurses5-dev libncursesw5-dev", sep = "\n")
jlopez's avatar
jlopez committed
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
    result <- paste(result, "RUN apt-get update", sep = "\n")
    
    result <- paste0(result, "\n")
    
    result <- paste(result, "RUN echo \'export PATH=/opt/conda/bin:$PATH\' > /etc/profile.d/conda.sh && \\",
                    "\twget --quiet https://repo.continuum.io/miniconda/Miniconda2-4.0.5-Linux-x86_64.sh -O ~/miniconda.sh && \\",
                    "\t/bin/bash ~/miniconda.sh -b -p /opt/conda && \\",
                    "\trm ~/miniconda.sh", sep = "\n")
    
    result <- paste0(result, "\n")
    
    result <- paste(result, "RUN TINI_VERSION=`curl https://github.com/krallin/tini/releases/latest | grep -o \"/v.*\\\"\" | sed \'s:^..\\(.*\\).$:\\1:\'` && \\",
                    "\tcurl -L \"https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini_${TINI_VERSION}.deb\" > tini.deb && \\",
                    "\tdpkg -i tini.deb && \\",
                    "\trm tini.deb && \\",
                    "\tapt-get clean", sep = "\n")
    
    result <- paste0(result, "\n")
    
    result <- paste(result, "RUN mkdir /opt/biotools", sep = "\n")
    result <- paste(result, "RUN mkdir /opt/biotools/bin", sep = "\n")
    result <- paste(result, "RUN chmod 777 -R /opt/biotools/", sep = "\n")
jlopez's avatar
jlopez committed
671
    result <- paste(result, "ENV PATH=/opt/biotools/bin:${PATH}", sep = "\n")
jlopez's avatar
jlopez committed
672
673
    
    result <- paste(result, "RUN chmod 777 -R /opt/conda/", sep = "\n")
jlopez's avatar
jlopez committed
674
    result <- paste(result, "ENV PATH=/opt/conda/bin:${PATH}", sep = "\n")
jlopez's avatar
jlopez committed
675
676
677
678
679
680
681
682
683
684
685
    
    if(!haveR) {
      result <- paste(result, "RUN conda config --add channels r", sep = "\n")
    }
    
    result <- paste(result, "RUN conda config --add channels bioconda", sep = "\n")
    result <- paste(result, "RUN conda upgrade conda", sep = "\n")
    
    result <- paste0(result, "\n")
    
    for (tool in selectBioTool){
jlopez's avatar
jlopez committed
686
687
688
689
      
      result <- paste(result, '############### Install BioContainer tools ##############', sep = "\n")
      
      
jlopez's avatar
jlopez committed
690
      result <- paste0(result, "\nRUN ", getInstallToolPackageBioContainer(tool, input$containerType))
jlopez's avatar
jlopez committed
691
    }
jlopez's avatar
jlopez committed
692
    
jlopez's avatar
jlopez committed
693
694
  }
  
jlopez's avatar
jlopez committed
695
696
697
698
    result <- paste0(result, "\n")
    return(result)
}

jlopez's avatar
jlopez committed
699
#' Use for create Singularity or Dockerfile
jlopez's avatar
jlopez committed
700
701
702
703
704
705
706
707
708
createContentFile <- function() {
  
  haveR = FALSE

  result <- createHeader()
  result <- createEnv(result)
  result <- createLabel(result)
  result <- createLibPrePost(result)

jlopez's avatar
Fix    
jlopez committed
709
  if(input$rtemplate != "none" && input$fromTemplate != "r-base") {
jlopez's avatar
jlopez committed
710
711
712
    
      haveR = TRUE
    
jlopez's avatar
jlopez committed
713
714
715
716
717
718
719
720
721
      if(input$rtemplate == "source" || input$rtemplate == "source2" || input$rtemplate == "source3") {
          Rversion = "3.4.3" 
          if(input$rtemplate == "source2") {
            Rversion = "3.4.4" 
          }else if(input$rtemplate == "source3") {
            Rversion = "3.5.0" 
          }
        
          result <- createRSource(result, Rversion)
jlopez's avatar
jlopez committed
722
723
724
725
726
727
      } else if(input$rtemplate == "base") {
          result <- createRBase(result)
      } else if(input$rtemplate == "cran") {
          result <- createRCran(result)
      }
      
jlopez's avatar
jlopez committed
728
729
  }
      
jlopez's avatar
jlopez committed
730
731
732
733
      result <- createCRANPackage(result)
      result <- createBioconductorPackage(result)
      result <- createGithubPackage(result)

jlopez's avatar
jlopez committed
734
  haveBiocontainer <- FALSE
jlopez's avatar
jlopez committed
735
  if(!is.null(input$selectedBiocontainer)) {
jlopez's avatar
jlopez committed
736
    haveBiocontainer <- TRUE
jlopez's avatar
jlopez committed
737
738
739
    result <- createBiocontainer(result, haveR)
  }
  
jlopez's avatar
jlopez committed
740
741
  result <- createWorkflows(result, haveR, haveBiocontainer)
  
jlopez's avatar
jlopez committed
742
  result <- createExect(result)
jlopez's avatar
jlopez committed
743
  
jlopez's avatar
Proto    
jlopez committed
744
  result <- paste(result, input$customDataContainer, sep = "\t\n")
jlopez's avatar
jlopez committed
745
  
jlopez's avatar
Proto    
jlopez committed
746
747
748
  return(result)
}

jlopez's avatar
jlopez committed
749
observeEvent(input$createContainer, {
jlopez's avatar
jlopez committed
750
751

  js$collapse("boxPackage")
jlopez's avatar
Proto    
jlopez committed
752
753
754
  
  show("downloadContainerFile")
  
jlopez's avatar
jlopez committed
755
756
757
758
759
760
  result <- createContentFile()
  
  updateTextAreaInput(session, "previewContainer",
                      label = "",
                      value = result)
  
jlopez's avatar
Proto    
jlopez committed
761
762
})

jlopez's avatar
jlopez committed
763
#createContainerPackage <- eventReactive(input$createContainer, {
jlopez's avatar
Proto    
jlopez committed
764

jlopez's avatar
jlopez committed
765
766
767
768
  #result <- createContentFile()
  
  #show("downloadContainerFile")
  
jlopez's avatar
Proto    
jlopez committed
769

jlopez's avatar
jlopez committed
770
771
772
773
774
775
776
777
778
  #HTML(result)

#})



#output$previewContainer <- renderText({
#  createContainerPackage()
#})
jlopez's avatar
Proto    
jlopez committed
779

jlopez's avatar
jlopez committed
780

jlopez's avatar
Proto    
jlopez committed
781
782
output$downloadContainerFile <- downloadHandler(
  filename = function() {
jlopez's avatar
jlopez committed
783
784
785
786
787
788
    name <- ""
    if(input$containerType == "singularity") {
      name <- paste("Singularity",input$imageName, sep = ".")
    } else {
      name <- paste("Dockerfile",input$imageName, sep = ".")
    }
jlopez's avatar
Proto    
jlopez committed
789
790
  },
  content = function(file) {
jlopez's avatar
jlopez committed
791
    result <- input$previewContainer
jlopez's avatar
Proto    
jlopez committed
792
793
794
795
    write(result,file=file)
  }
)

jlopez's avatar
jlopez committed
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
observe({
  
  if(is.null(input$dtbiocontainer_rows_selected)) {
    shinyjs::reset("formContainer")
  } else {
    i = 1
    selectBiocontainer <- list()
    for(x in input$dtbiocontainer_rows_selected) {
      selectBiocontainer[i] = paste(allBIOCONTAINER[[x]]$name, allBIOCONTAINER[[x]]$version, sep = "%")
      i = i + 1
    }
    selectBiocontainer <- c(unlist(selectBiocontainer))
    updateSelectizeInput(session,"selectedBiocontainer", choices = selectBiocontainer, selected = selectBiocontainer, options = list())
  }
})

jlopez's avatar
jlopez committed
812

jlopez's avatar
jlopez committed
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831


observe({
  
  if(is.null(input$dtWorkflows_rows_selected)) {
    shinyjs::reset("formWorkflows")
  } else {
    i = 1
    selectWorkflows <- list()
    for(x in input$dtWorkflows_rows_selected) {
      selectWorkflows[i] = paste(allWORKFLOWS[[x]]$name, allWORKFLOWS[[x]]$version, sep = "%")
      i = i + 1
    }
    selectWorkflows <- c(unlist(selectWorkflows))
    updateSelectizeInput(session,"selectedWorkflows", choices = selectWorkflows, selected = selectWorkflows, options = list())
  }
})


jlopez's avatar
jlopez committed
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
observe({
  
  if(is.null(input$dtrcranpackage_rows_selected)) {
    shinyjs::reset("formCRAN")
  } else {
    i = 1
    selectCRAN <<- list()
    for(x in input$dtrcranpackage_rows_selected) {
      selectCRAN[i] <<- as.character(allCRAN$Package[x])
      i = i + 1
    }
    #selectCRAN <- c(unlist(selectCRAN))
    updateSelectizeInput(session,"selectedCRAN", choices = selectCRAN, selected = selectCRAN, options = list())
    
  }
  
})

observe({
  
  if(is.null(input$dtrbioconductorpackage_rows_selected)) {
    shinyjs::reset("formBioconductor")
  } else {
    i = 1
    selectConductor <<- list()
    for(x in input$dtrbioconductorpackage_rows_selected) {
      selectConductor[i] <<-as.character(allBIO$Package[x])
      i = i + 1
    }

    updateSelectizeInput(session,"selectedConductor", choices = selectConductor, selected = selectConductor, options = list())
    
  }
  
})


jlopez's avatar
jlopez committed
869
870
871
872
873
observe({
  if(is.null(input$dtrgithubpackage_rows_selected)) {
    
    selectGithub <- input$rgithubpackagelist
    sizeGITHUB <- length(selectGithub)
jlopez's avatar
jlopez committed
874
    
jlopez's avatar
jlopez committed
875
876
877
878
879
880
881
882
883
884
    if(sizeGITHUB < 1) {
      shinyjs::reset("formGithub")
    }

  } else {
    i = 1
    selectG <- list()
    for(x in input$dtrgithubpackage_rows_selected) {
      selectG[i] = toString(allGITHUB$Package[[x]])
      i = i + 1
jlopez's avatar
jlopez committed
885
    }
jlopez's avatar
jlopez committed
886
    selectG <- c(unlist(selectG))
jlopez's avatar
jlopez committed
887
    
jlopez's avatar
jlopez committed
888
889
890
891
892
893
    selectGithub <- input$rgithubpackagelist
    sizeGITHUB <- length(selectGithub)
    
    if(sizeGITHUB > 1) {
      selectG <- c(selectG, selectGithub)
    }
jlopez's avatar
jlopez committed
894
  
jlopez's avatar
jlopez committed
895
896
    updateSelectizeInput(session,"rgithubpackagelist", choices = selectG, selected = selectG, options = list())
  }
jlopez's avatar
jlopez committed
897
})
jlopez's avatar
jlopez committed
898
899
900
901
902
903
904
905

observeEvent(input$findGithub, {
  
  name <- input$inputGithub
  
  if(!stri_isempty(name)) {
    allGITHUB <<- data.frame(Package = gh_suggest(name, keep_title = FALSE), Title = attr(gh_suggest(name, keep_title = TRUE), "title"))
    
jlopez's avatar
jlopez committed
906
    if(length(allGITHUB)  >= 1 ) {
jlopez's avatar
jlopez committed
907
908
909
910
    output$dtrgithubpackage <- DT::renderDataTable({
      result <- allGITHUB
      return(result)
    }, filter='top', escape = FALSE, rownames= FALSE,server = TRUE)
jlopez's avatar
jlopez committed
911
    }
jlopez's avatar
jlopez committed
912
913
914
915
916
  }
  
})