Commit 23671fd3 authored by svolant's avatar svolant
Browse files

Modif masque interface

parent f2b8aef9
options(download.file.method = 'wget')
if (!require("shinytoastr")){
source("https://install-github.me/mangothecat/shinytoastr")
library(shinytoastr)
}
if (!require("shinyWidgets")){
install.packages("shinyWidgets")
library(shinyWidgets)
}
if (!require("sendmailR")){
install.packages("sendmailR")
library(sendmailR)
}
if (!require("shinyBS")){
install.packages("shinyBS")
library(shinyBS)
......
......@@ -114,7 +114,6 @@ CheckTargetModel <- function(input,target,labeled,CT)
labels = rownames(target)
ind = which(colnames(CT)%in%labels)
# InterVar%in%
# uniq_column = (length(which(sapply(target[InterVar], function(x) length(unique(x))) == 1)) > 0)
# uniq_column_names = names(which(sapply(target[InterVar], function(x) length(unique(x))) == 1))
......@@ -238,20 +237,17 @@ CheckMasque <- function(input,values)
## Check password
if(is.null(Error) && input$password == ""){
Error = "<h6><strong>Empty key field </strong></h6>"
HowTo = "<h6><strong>Make sure that you have click the &laquo Get key &raquo button and that you have pasted the key sent by mail </strong></h6>"
}
if(is.null(Error) && input$password != ""){
pass = toupper(gsub(" ","",input$password))
if(!identical(pass,toupper(values$pass))){
Error = "<h6><strong>Invalid key </strong></h6>";
HowTo = "<h6><strong>Make sure that you have click the &laquo Get key &raquo button and that you have pasted the key sent by mail</strong></h6>"
}
# if(is.null(Error) && input$password == ""){
# Error = "<h6><strong>Empty key field </strong></h6>"
# HowTo = "<h6><strong>Make sure that you have click the &laquo Get key &raquo button and that you have pasted the key sent by mail </strong></h6>"
# }
#
if(is.null(Error) && is.null(values$login_email)){
Error = "<h6><strong>Invalid key </strong></h6>";
HowTo = "<h6><strong>Make sure that you have click the &laquo Get key &raquo button </strong></h6>"
}
## At least one fastq is detected
if(is.null(Error) && input$LoadFiles>0 && length(values$fastq_names_only)==0){
Error = "<h6><strong>The selected directory must contain at least one file in the following format : fastq, fastq.gz, or fq.</strong></h6>"
......@@ -359,7 +355,7 @@ CreateJSON <- function(input,values){
path_fastq_R1 = paste(tempdir(),"Masque_files_R1",sep= .Platform$file.sep)
path_fastq_R2 = paste(tempdir(),"Masque_files_R2",sep= .Platform$file.sep)
df = data.frame("paired"=FALSE,
df = data.frame("paired"=TRUE,
"path_R1"=path_fastq_R1,
"path_R2"=path_fastq_R2,
"host"=input$HostName,
......
......@@ -59,3 +59,37 @@ margin-bottom: -40px;
}
"
InfoBoxCSS <- "
.info-box:hover,
.info-box:hover .info-box-icon {
background-color: #aaa !important;
}
.info-box:active,
.info-box:active .info-box-icon {
background-color: #ccc !important;
}
"
withPopup <- function(tag,title="",img_src=NULL,width_img = "100%",height_img = "100%") {
if(!is.null(img_src)){
content <- div(title,style = "width: 120px; text-align: justify;",
img(src = img_src,width = width_img,height = height_img)
)
}
if(is.null(img_src)){
content <- div(title,style = "width: 120px; text-align: justify;")
}
tagAppendAttributes(
tag,
`data-toggle` = "popover",
`data-html` = "true",
`data-trigger` = "hover",
`data-content` = content
)
}
......@@ -16,3 +16,4 @@ source("Rfunctions/VisuPlot.R")
source("Rfunctions/CompPlot.R")
source("Rfunctions/DiffTable.R")
source('Rfunctions/directoryInput.R')
source('Rfunctions/internal_masque.R')
This diff is collapsed.
......@@ -25,7 +25,7 @@ sidebar <- dashboardSidebar(
body <- dashboardBody(
tags$style(type="text/css", Errorcss),
useToastr(),
useShinyjs(),
inlineCSS(appCSS),
div(
......@@ -221,10 +221,35 @@ body <- dashboardBody(
)
),
tabItem(tabName = "RawData",
tags$style(type='text/css', ".well { max-width: 20em; }"),
tags$style(type='text/css', ".well { max-width: 20em; }"),
# tags$head(tags$style(HTML(InfoBoxCSS))),
tags$head(tags$script("$(function() { $(\"[data-toggle='popover']\").popover(); })")),
fluidRow(
# column(width=3,valueBoxOutput("valueErrorPercent",width=NULL)),
# column(width=3,infoBoxOutput("InfoErrorCounts",width=NULL)),
# column(width=3,infoBoxOutput("InfoErrorTaxo",width=NULL)),
div(id="masque-infobox",
column(width=3,
withPopup(infoBoxOutput("infoBoxPass",width=NULL),
title="Once you have entered a valid email address, click on this button:",
img_src="helpPopPup/GetKey_button.png")
),
column(width=3,
withPopup(infoBoxOutput("infoBoxFastQ",width=NULL),
title="Once you have selected your working directory you must click on this button:",
img_src="helpPopPup/LoadFiles_button.png",width_img = "60%",height_img = "60%")
),
column(width=3,
infoBoxOutput("infoBoxFastQ_match",width=NULL)
),
column(width=3,
valueBoxOutput("progressBoxMasque",width=NULL)
)
)),
# fluidRow(
HTML('<center><h1>MASQUE : Metagenomic Analysis with a Quantitative pipeline</h1></center>'),
hr(),
# HTML('<center><h1>MASQUE : Metagenomic Analysis with a Quantitative pipeline</h1></center>'),
# column(width=8,
# div(style="background-color: white; padding-left:20px;",
# HTML('
......@@ -270,24 +295,17 @@ body <- dashboardBody(
# HTML('<center><h2 style="color:#053383;"><b>Start your analysis</b></h2></center>'),
# hr(),
fluidRow(
column(width=3,
box(title = "Enter the key",width=12,status="danger",
inlineCSS(list(.pwdGREEN = "background-color: #DDF0B3",.pwdRED = "background-color: #F0B2AD")),
uiOutput("pass_Arg"),
textInput("password","",value = NULL),
bsTooltip("password", 'Fill in the email field and click the "Get key" button',"bottom",trigger = "hover", options = list(container = "body")),
tags$style(type='text/css', "#password { width:100%; margin-top: 10px;}")
),
uiOutput("summary_box_masque")
),
# column(width=3,
# inlineCSS(gaugeCSS),
# gaugeOutput("gaugeMasque", width = "100%", height = "100%")
#
# ),
column(width=6,
box(title="About",width = 12, status = "primary",
column(width=9,
div(id="masque-form",
box(title="About",width = NULL, status = "primary",
column(width=6, radioButtons("DataTypeMasque",label = "Type of data",choices = c("16S/18S" = "16S_18S","23S/28S" = "23S_28S","ITS" = "ITS"),inline = TRUE)),
column(width=6, radioButtons("PairedOrNot",label = "Paired-end sequencing ?",choices = c('Yes'="y","No"="n"),selected = "n",inline = TRUE)),
......@@ -320,7 +338,7 @@ body <- dashboardBody(
)
),
box(title="Directory containing the FastQ files ",width = 12, status = "primary",
box(title="Directory containing the FastQ files ",width = NULL, status = "primary",
column(width=12,verbatimTextOutput("dirSel")),
br(),
column(width=12,
......@@ -336,8 +354,7 @@ body <- dashboardBody(
)
),
box(id="box-match",title=" Match the paired files (only for paired-end sequencing)",width = 12, status = "primary",
box(id="box-match",title=" Match the paired files (only for paired-end sequencing)",width = NULL, status = "primary",
column(width=6, textInput("R1files",label = "Suffix R1 (Forward)",value = "_R1"),
selectInput("R1filesList",label = "","",multiple =TRUE,selectize=FALSE)),
column(width=6,
......@@ -352,16 +369,61 @@ body <- dashboardBody(
),
div(style = "text-align:center;",
actionButton("submit", strong("Check and submit"), icon("chevron-circle-right"),class="btn-primary",style = "color: #fff"),
tags$style(type='text/css', "#submit { width:50%; margin-top: 5px;}")
tags$style(type='text/css', "#submit { width:50%; margin-top: 5px;}"),
receiveSweetAlert(messageId = "SuccessMasque")
)
),
div(id="project_over",style="text-align:center; display: none;",
HTML("<center><h1><strong>Computations are over</strong></h1></center>"),
actionButton("Check_project_over", h2("Check results"),icon=icon("check-circle fa-2x"),class="btn-primary",style = "color: #fff"),
tags$style(type='text/css', "#Check_project_over {margin-top: 15px;width:50%;}")
),
div(id="reload-project",style="display: none;",
actionButton("comeback",strong("Close and come back"),icon=icon("backward")),
uiOutput("masque_status_key")
),
column(width=3,
inlineCSS(gaugeCSS),
gaugeOutput("gaugeMasque", width = "100%", height = "100%"),
uiOutput("InfoMasque"),
uiOutput("InfoMasqueHowTo"),
uiOutput("MasqueToShaman_button")
))
div(id="current-project",style="display: none;",
uiOutput("masque_results")
),
div(id="project-over-wait",style="display: none;",
HTML('<center><h1><strong> Please wait during the creation of the files...</strong></h1> <br/> <em><h4> This can take about 30 seconds</h4> </em> </center>'),
tags$img(src = "gears.gif",id ="loading-spinner")
),
div(id="MasqueToShaman",style="display: none;",
box(title="Upload the results",width = 4, status = "success",
selectInput("masque_database","Select the database",choices=c("Silva" = "silva","Greengenes" = "greengenes")),
tags$style(type='text/css', "#masque-database { width:100%; margin-top: 5px;}"),
actionButton("RunResMasque",label = "Upload the results",icon=icon('upload')),
tags$style(type='text/css', "#RunResMasque { width:100%; margin-top: 15px;}")
)
)
),
column(width=3,
box(id="boxpass",title = strong("Enter the key"), width = NULL, background = "light-blue",
inlineCSS(list(.pwdGREEN = "background-color: #DDF0B3",.pwdRED = "background-color: #F0B2AD")),
uiOutput("pass_Arg"),
textInput("password","",value = NULL),
div(style = "text-align:right;",
actionButton("Check_project", "Check project",icon=icon("check-circle")),
tags$style(type='text/css', "#Check_project {margin-top: 15px;}")
),
bsTooltip("password", 'Fill in the email field and click the "Get key" button',"bottom",trigger = "hover", options = list(container = "body")),
tags$style(type='text/css', "#password { width:100%; margin-top: 10px;}")
),
tags$style(type='text/css', "#boxpass {margin-bottom: 0px;}"),
# valueBoxOutput("progressBoxMasque",width = 12),
# infoBox(title = "tete",icon= uiOutput("spinner_icon"),width=12),
uiOutput("summary_box_masque")
),
column(width=3,
# inlineCSS(gaugeCSS),
# gaugeOutput("gaugeMasque", width = "100%", height = "100%"),
uiOutput("InfoMasque"),
uiOutput("InfoMasqueHowTo")
# uiOutput("MasqueToShaman_button")
)
)
),
......@@ -432,9 +494,6 @@ body <- dashboardBody(
),
column(12,uiOutput("TabBoxData"))
),
#### Statistical analysis
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment