Commit 2aa2a0b8 authored by Amine  GHOZLANE's avatar Amine GHOZLANE
Browse files

Add parameters for raw data submission

parent 3e3e2e53
...@@ -415,7 +415,29 @@ CreateJSON <- function(input,values){ ...@@ -415,7 +415,29 @@ CreateJSON <- function(input,values){
"host"=input$HostName, "host"=input$HostName,
"type"=input$DataTypeMasque, "type"=input$DataTypeMasque,
"mail"=values$login_email, "mail"=values$login_email,
"contaminant"= path_fasta "contaminant"= path_fasta,
"phredthres" = input$phredthres,
"mincorrect" = input$mincorrect,
"minreadlength" = input$minreadlength,
"dreptype" = input$dreptype,
"maxampliconlength" = input$maxampliconlength,
"minampliconlength" = input$minampliconlength,
"minabundance" = input$minabundance,
"clusteringthreshold" = input$clusteringthreshold,
"clusteringstrand" = input$clusteringstrand,
"annotationstrand" = input$annotationstrand,
"aKmin" = input$annotationKingdomthreshold,
"aPmin" = input$annotationPhylumthreshold[1],
"aPmax" = input$annotationPhylumthreshold[2],
"aCmin" = input$annotationClassthreshold[1],
"aCmax" = input$annotationClassthreshold[2],
"aOmin" = input$annotationOrderthreshold[1],
"aOmax" = input$annotationOrderthreshold[2],
"aFmin" = input$annotationFamilythreshold[1],
"aFmax" = input$annotationFamilythreshold[2],
"aGmin" = input$annotationGenusthreshold[1],
"aGmax" = input$annotationGenusthreshold[2],
"aSmin" = input$annotationSpeciethreshold
) )
df %>% jsonlite::toJSON() %>% write_lines(values$json_name) df %>% jsonlite::toJSON() %>% write_lines(values$json_name)
...@@ -432,7 +454,30 @@ CreateJSON <- function(input,values){ ...@@ -432,7 +454,30 @@ CreateJSON <- function(input,values){
"type"=input$DataTypeMasque, "type"=input$DataTypeMasque,
"mail"=values$login_email, "mail"=values$login_email,
"contaminant"= path_fasta, "contaminant"= path_fasta,
"pattern_R1"= input$R1files "pattern_R1"= input$R1files,
"phredthres" = input$phredthres,
"mincorrect" = input$mincorrect,
"minoverlap" = input$minoverlap,
"minreadlength" = input$minreadlength,
"dreptype" = input$dreptype,
"maxampliconlength" = input$maxampliconlength,
"minampliconlength" = input$minampliconlength,
"minabundance" = input$minabundance,
"clusteringthreshold" = input$clusteringthreshold,
"clusteringstrand" = input$clusteringstrand,
"annotationstrand" = input$annotationstrand,
"aKmin" = input$annotationKingdomthreshold,
"aPmin" = input$annotationPhylumthreshold[1],
"aPmax" = input$annotationPhylumthreshold[2],
"aCmin" = input$annotationClassthreshold[1],
"aCmax" = input$annotationClassthreshold[2],
"aOmin" = input$annotationOrderthreshold[1],
"aOmax" = input$annotationOrderthreshold[2],
"aFmin" = input$annotationFamilythreshold[1],
"aFmax" = input$annotationFamilythreshold[2],
"aGmin" = input$annotationGenusthreshold[1],
"aGmax" = input$annotationGenusthreshold[2],
"aSmin" = input$annotationSpeciethreshold
) )
df %>% jsonlite::toJSON() %>% write_lines(values$json_name) df %>% jsonlite::toJSON() %>% write_lines(values$json_name)
} }
......
...@@ -28,7 +28,7 @@ shinyServer(function(input, output,session) { ...@@ -28,7 +28,7 @@ shinyServer(function(input, output,session) {
observe(if(input$AddRegScatter) info("By adding the regression line, you will lose interactivity.")) observe(if(input$AddRegScatter) info("By adding the regression line, you will lose interactivity."))
## Reactive target ## Reactive target
values <- reactiveValues(TargetWorking = target,labeled=NULL,fastq_names_only=NULL,R1fastQ=NULL,R2fastQ=NULL, values <- reactiveValues(TargetWorking = target,labeled=NULL,fastq_names_only=NULL,fastq_size_only=NULL,R1fastQ=NULL,R2fastQ=NULL,
json_name=json_name,num=0,pass=pass,login_email = NULL,is.valid =NULL, json_name=json_name,num=0,pass=pass,login_email = NULL,is.valid =NULL,
biom_masque = NULL,tree_masque=NULL, masque_key = NULL, count_table_masque = NULL, biom_masque = NULL,tree_masque=NULL, masque_key = NULL, count_table_masque = NULL,
rdp_annot_masque = NULL, rdp_thres_masque = NULL, rdp_annot_masque = NULL, rdp_thres_masque = NULL,
...@@ -206,7 +206,48 @@ shinyServer(function(input, output,session) { ...@@ -206,7 +206,48 @@ shinyServer(function(input, output,session) {
return(res) return(res)
}) })
observe({
val <- input$annotationKingdomthreshold
# Control the value, min, max, and step.
# Step size is 2 when input value is even; 1 when value is odd.
updateSliderInput(session, "annotationPhylumthreshold", value = input$annotationPhylumthreshold,
min = val, max = 1, step = 0.005)
})
observe({
val <- input$annotationPhylumthreshold[2]
# Control the value, min, max, and step.
# Step size is 2 when input value is even; 1 when value is odd.
updateSliderInput(session, "annotationClassthreshold", value = input$annotationClassthreshold,
min = val, max = 1, step = 0.005)
})
observe({
val <- input$annotationClassthreshold[2]
# Control the value, min, max, and step.
# Step size is 2 when input value is even; 1 when value is odd.
updateSliderInput(session, "annotationOrderthreshold", value = input$annotationOrderthreshold,
min = val, max = 1, step = 0.005)
})
observe({
val <- input$annotationOrderthreshold[2]
# Control the value, min, max, and step.
# Step size is 2 when input value is even; 1 when value is odd.
updateSliderInput(session, "annotationFamilythreshold", value = input$annotationFamilythreshold,
min = val, max = 1, step = 0.005)
})
observe({
val <- input$annotationFamilythreshold[2]
# Control the value, min, max, and step.
# Step size is 2 when input value is even; 1 when value is odd.
updateSliderInput(session, "annotationGenusthreshold", value = input$annotationGenusthreshold,
min = val, max = 1, step = 0.005)
})
observe({
val <- input$annotationGenusthreshold[2]
# Control the value, min, max, and step.
# Step size is 2 when input value is even; 1 when value is odd.
updateSliderInput(session, "annotationSpeciethreshold", value = input$annotationSpeciethreshold,
min = val, max = 1, step = 0.005)
})
## Input data ## Input data
dataInput <-reactive({ dataInput <-reactive({
...@@ -726,11 +767,13 @@ shinyServer(function(input, output,session) { ...@@ -726,11 +767,13 @@ shinyServer(function(input, output,session) {
observeEvent(input$dir,{ observeEvent(input$dir,{
inFiles <- input$dir inFiles <- input$dir
print(inFiles)
if (!is.null(inFiles)){ if (!is.null(inFiles)){
# values$fastq_names_only = unique(paste(values$fastq_names_only,inFiles$name)) # values$fastq_names_only = unique(paste(values$fastq_names_only,inFiles$name))
values$paths_fastq_tmp = rbind(isolate(values$paths_fastq_tmp),inFiles) values$paths_fastq_tmp = rbind(isolate(values$paths_fastq_tmp),inFiles)
values$fastq_names_only = isolate(unique(values$paths_fastq_tmp[,"name"])) values$fastq_names_only = isolate(unique(values$paths_fastq_tmp[,"name"]))
values$fastq_size_only = isolate(unique(values$paths_fastq_tmp[,"size"]))
print(values$fastq_size_only)
} }
}) })
......
...@@ -13,7 +13,7 @@ sidebar <- dashboardSidebar( ...@@ -13,7 +13,7 @@ sidebar <- dashboardSidebar(
menuItem("Home", tabName = "Home", icon = icon("home")), menuItem("Home", tabName = "Home", icon = icon("home")),
menuItem("Tutorial", tabName = "Tutorial", icon = icon("book")), menuItem("Tutorial", tabName = "Tutorial", icon = icon("book")),
menuItem("Download/Install", tabName = "Download", icon = icon("download")), menuItem("Download/Install", tabName = "Download", icon = icon("download")),
menuItem("Raw data (Beta)", tabName = "RawData", icon = icon("upload")), menuItem("Raw data", tabName = "RawData", icon = icon("upload")),
menuItem("Upload your data", tabName = "Upload", icon = icon("upload")), menuItem("Upload your data", tabName = "Upload", icon = icon("upload")),
#bookmarkButton(), #bookmarkButton(),
menuItemOutput("dymMenu"), menuItemOutput("dymMenu"),
...@@ -64,10 +64,17 @@ body <- dashboardBody( ...@@ -64,10 +64,17 @@ body <- dashboardBody(
p("Carine Rey, ", "Hugo Varet,", "Julien Tap, ","Anna Zhukova.") p("Carine Rey, ", "Hugo Varet,", "Julien Tap, ","Anna Zhukova.")
), ),
tabPanel("Citing SHAMAN", tabPanel("Citing SHAMAN",
p("No papers about SHAMAN have been published yet, but a manuscript is in preparation.",style = "font-family: 'times'; font-si16pt"), p("If you use SHAMAN for your project, please cite our first application of SHAMAN in Quereda et al. 2016.",style = "font-family: 'times'; font-si16pt"),
p("Publication using SHAMAN :",style = "font-family: 'times'; font-si18pt; font-style: strong"), p("Publication using SHAMAN :",style = "font-family: 'times'; font-si18pt; font-style: strong"),
p(a("Characteristics of Fecal Microbiota in Pediatric Crohn’s Disease and Their Dynamic Changes During Infliximab Therapy.", href="https://www.ncbi.nlm.nih.gov/pubmed/29194468"), "Wang Y, Gao X, Ghozlane A, Hu H, Li X, Xiao Y, Li D, Yu G, Zhang T; Journal of Crohn's & colitis 2017",style = "font-family: 'times'; font-si16pt"),
p(a("Carryover effects of larval exposure to different environmental bacteria drive adult trait variation in a mosquito vector.", href="https://www.ncbi.nlm.nih.gov/pubmed/28835919"), "Dickson LB, Jiolle D, Minard G, Moltini-Conclois I, Volant S, Ghozlane A, Bouchier C, Ayala D, Paupy C, Moro CV, Lambrechts L; Science Advances 2017",style = "font-family: 'times'; font-si16pt"),
p(a("A bacteriocin from epidemic Listeria strains alters the host intestinal microbiota to favor infection.", href="http://www.ncbi.nlm.nih.gov/pubmed/27140611"), "Quereda JJ, Dussurget O, Nahori MA, Ghozlane A, Volant S, Dillies MA, Regnault B, Kennedy S, Mondot S, Villoing B, Cossart P, Pizarro-Cerda J.; PNAS 2016",style = "font-family: 'times'; font-si16pt"), p(a("A bacteriocin from epidemic Listeria strains alters the host intestinal microbiota to favor infection.", href="http://www.ncbi.nlm.nih.gov/pubmed/27140611"), "Quereda JJ, Dussurget O, Nahori MA, Ghozlane A, Volant S, Dillies MA, Regnault B, Kennedy S, Mondot S, Villoing B, Cossart P, Pizarro-Cerda J.; PNAS 2016",style = "font-family: 'times'; font-si16pt"),
p("If you have any comments, questions or suggestions, or need help to use SHAMAN, please contact authors", a("here", href="mailto:shaman@pasteur.fr"),".", style = "font-family: 'times'; font-si16pt; color:red") p("Reporting bugs, ask for help",style = "font-family: 'times'; font-si18pt; font-style: strong"),
p("If you have any comments, questions or suggestions, or need help to use SHAMAN, please contact us at", a("shaman@pasteur.fr", href="mailto:shaman@pasteur.fr"),"and please provide us with enough information that we can recreate the problem. Useful things to include are:", style = "font-family: 'times'; font-si16pt;"),
tags$ul(
tags$li("Input data (or examples, a small test case sufficient to recreate the problem)"),
tags$li("Information about which system your are using: web version, docker or R installation")
)
)))), )))),
column(width=3, column(width=3,
box( box(
...@@ -96,11 +103,15 @@ body <- dashboardBody( ...@@ -96,11 +103,15 @@ body <- dashboardBody(
) )
) )
), ),
tabItem(tabName = "Tutorial", tabItem(tabName = "Tutorial",
div(style="width:100% ; max-width: 1200px", div(style="width:100% ; max-width: 1200px",
tabBox(title="How to use SHAMAN", id="tabset1", width =NULL, tabBox(title="How to use SHAMAN", id="tabset1", width =NULL,
tabPanel("Introduction", tabPanel("Introduction",
p("First check out our user guide:"),
tags$ul(
tags$li(a("User's guide", href="Userguide.pdf")),
tags$li(a("Writing a target file for the experimental design", href="experimental_design_guide.pdf"))
),
p(" You can test SHAMAN with the dataset from", a("[Tap et al. 2015]",href="http://www.ncbi.nlm.nih.gov/pubmed/26235304"), p(" You can test SHAMAN with the dataset from", a("[Tap et al. 2015]",href="http://www.ncbi.nlm.nih.gov/pubmed/26235304"),
", which is available", a("here",target="_blank",href="Alimintest.zip"),"."), ", which is available", a("here",target="_blank",href="Alimintest.zip"),"."),
p("The zip archive contains 4 different files :", br(), p("The zip archive contains 4 different files :", br(),
...@@ -322,6 +333,9 @@ body <- dashboardBody( ...@@ -322,6 +333,9 @@ body <- dashboardBody(
column(width=6,checkboxInput("primer", "Specify the primer"), column(width=6,checkboxInput("primer", "Specify the primer"),
bsTooltip("primer", "If no, default values are chosen","bottom", options = list(container = "body")) bsTooltip("primer", "If no, default values are chosen","bottom", options = list(container = "body"))
), ),
column(width=6,checkboxInput("options", "More workflow options"),
bsTooltip("options", "If no, default values are chosen","bottom", options = list(container = "body"))
),
conditionalPanel(condition="input.primer && input.PairedOrNot=='y'", conditionalPanel(condition="input.primer && input.PairedOrNot=='y'",
column(width=12, column(width=12,
textInput("R1primer",label = "Forward primer",value = "TCGTCGGCAGCGTCAGATGTGTATAAGAGACAGCCTACGGGNGGCWGCAG"), textInput("R1primer",label = "Forward primer",value = "TCGTCGGCAGCGTCAGATGTGTATAAGAGACAGCCTACGGGNGGCWGCAG"),
...@@ -332,6 +346,34 @@ body <- dashboardBody( ...@@ -332,6 +346,34 @@ body <- dashboardBody(
column(width=12, column(width=12,
textInput("primerSingle",label = "Primer",value = "TCGTCGGCAGCGTCAGATGTGTATAAGAGACAGCCTACGGGNGGCWGCAG") textInput("primerSingle",label = "Primer",value = "TCGTCGGCAGCGTCAGATGTGTATAAGAGACAGCCTACGGGNGGCWGCAG")
) )
),
conditionalPanel(condition="input.options",
column(width=4, h3("Read processing"),
sliderInput("phredthres", "Phred quality score cutoff to trim off low-quality read ends",
min = 0, max = 40, value = 20),
sliderInput("mincorrect", "Minimum allowed percentage of correctly called nucleotides per reads",
min = 50, max = 100, value = 80),
numericInput("minreadlength", "Minimum read length", 50,step=1,min=50),
conditionalPanel(condition="input.options && input.PairedOrNot=='y'", numericInput("minoverlap", "Minimum overlap size", 10,step=1,min=1))
),
column(width=4, h3("OTU processing"),
selectInput("dreptype", "Dereplication ", choices = list("Prefix" = "--derep_prefix", "Full length" = "--derep_fulllength"), selected = "--derep_prefix"),
numericInput("maxampliconlength", "Maximum OTU length (0 is no limit)", 0,step=1,min=0),
numericInput("minampliconlength", "Minimum OTU length", 50, step=1, min=35),
numericInput("minabundance", "Minimum abundance at dereplication", 4, step=1, min=2),
selectInput("clusteringstrand", "Clustering strand ", choices = list("Both" = "both", "Plus" = "plus"), selected = "both"),
sliderInput("clusteringthreshold", "Clustering threshold", min = 0, max = 1, value = 0.97)),
column(width=4, h3("OTU annotation"),
selectInput("annotationstrand", "Annotation strand ", choices = list("Both" = "both", "Plus" = "plus"), selected = "both"),
sliderInput("annotationKingdomthreshold", "Minimum identity for Kingdom annotation", min = 0, max = 1, value = 0.75, step = 0.005),
sliderInput("annotationPhylumthreshold", "Identity thresholds for Phylum annotation", min = 0, max = 1, value = c(0.75, 0.785), step = 0.005),
sliderInput("annotationClassthreshold", "Identity thresholds for Class annotation", min = 0, max = 1, value = c(0.785, 0.82), step = 0.005),
sliderInput("annotationOrderthreshold", "Identity thresholds for Order annotation", min = 0, max = 1, value = c(0.82, 0.865), step = 0.005),
sliderInput("annotationFamilythreshold", "Identity thresholds for Family annotation", min = 0, max = 1, value = c(0.865, 0.945), step = 0.005),
sliderInput("annotationGenusthreshold", "Identity thresholds for Genus annotation", min = 0, max = 1, value = c(0.945, 0.98), step = 0.005),
sliderInput("annotationSpeciethreshold", "Minimum identity for Specie annotation", min = 0, max = 1, value = 0.98, step = 0.005)
)
) )
), ),
......
No preview for this file type
Markdown is supported
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