Commit 2b73472e authored by mmassaviol's avatar mmassaviol
Browse files

Global update (shiny app, dockerfile)

Shiny app with dowload config file button
Dockerfile with a base from docker hub
parent 1e740e63
FROM rocker/r-ver:3.5.3
ENV PATH /opt/biotools/bin:$PATH
ENV ROOTSYS /opt/biotools/root
ENV LD_LIBRARY_PATH '$LD_LIBRARY_PATH:$ROOTSYS/lib'
RUN apt-get update
RUN apt-get install -yq tzdata
RUN apt-get install -y locales
RUN locale-gen "en_US.UTF-8"
RUN export LC_ALL=en_US.UTF-8
RUN export LANG=en_US.UTF-8
RUN apt-get install -y curl wget apt-utils
RUN apt-get install -y gcc fort77 aptitude
RUN aptitude install -y g++ xorg-dev libreadline-dev gfortran
RUN apt-get install -y libssl-dev libxml2-dev libpcre3-dev liblzma-dev libbz2-dev libcurl4-openssl-dev liblapack3 git nano graphviz python3 python3-pip
RUN apt-get install -y autotools-dev automake cmake grep sed dpkg fuse zip build-essential pkg-config bzip2 ca-certificates libglib2.0-0 libxext6 libsm6 libxrender1 mercurial subversion zlib1g-dev libncurses5-dev libncursesw5-dev
RUN apt-get clean
RUN if [ ! -d "/opt/biotools" ];then mkdir /opt/biotools; fi
RUN if [ ! -d "/opt/biotools/bin" ];then mkdir /opt/biotools/bin; fi
RUN chmod 777 -R /opt/biotools/
ENV PATH /opt/biotools/bin:$PATH
RUN pip3 install snakemake==5.4.0 oyaml
RUN pip3 install multiqc==1.7
RUN fic=$(find /usr/ -name stacks.py) && sed -i 's/out_dict\[s_name\] = cdict/out_dict\[content\[0\]\] = cdict/' $fic
RUN Rscript -e 'install.packages("yaml",Ncpus=8,repos="https://cloud.r-project.org/")'
RUN Rscript -e 'install.packages("DT",Ncpus=8,repos="https://cloud.r-project.org/")'
RUN Rscript -e 'install.packages("shiny",Ncpus=8,repos="https://cloud.r-project.org/")'
RUN Rscript -e 'install.packages("shinydashboard",Ncpus=8,repos="https://cloud.r-project.org/")'
RUN Rscript -e 'install.packages("shinyjs",Ncpus=8,repos="https://cloud.r-project.org/")'
RUN Rscript -e 'install.packages("shinyFiles",Ncpus=8,repos="https://cloud.r-project.org/")'
RUN Rscript -e 'install.packages("BiocManager",Ncpus=8,repos="https://cloud.r-project.org/")'
FROM mmassaviol/mbb_workflows_base:latest
COPY files /workflow
COPY sagApp /sagApp
......
# Ignore everything in this directory
*
# Except this file
!.gitignore
import oyaml as yaml
import shutil
def read_yaml(filepath):
try:
......@@ -15,4 +16,11 @@ def write_yaml(filepath,data):
with open(filepath, 'w') as file:
yaml.dump(data, file, default_flow_style=False)
except IOError as e:
print("Error in file opening:", e)
\ No newline at end of file
print("Error in file opening:", e)
def copy_dir(src,dst):
try:
shutil.copytree(src,dst)
except FileExistsError:
shutil.rmtree(dst, ignore_errors=True)
shutil.copytree(src,dst)
\ No newline at end of file
......@@ -6,12 +6,18 @@ MenuGauche = sidebarMenu(id="sidebarmenu",
menuItem("K-mer analysis", tabName="kmer_analysis", icon=icon("pencil", lib="font-awesome"), newtab=FALSE),
menuItem("Rule Graph", tabName="RULEGRAPH", icon=icon("gear", lib="font-awesome"), newtab=FALSE),
menuItem("Draw workflow graph", tabName="RULEGRAPH", icon=icon("gear", lib="font-awesome"), newtab=FALSE),
tags$br(),
downloadButton("DownloadParams", "Download config file", class="btn btn-light", style="color:black;margin: 6px 5px 6px 15px;"),
tags$br(),
tags$br(),
numericInput("cores", label = "Threads available", min = 1, max = 24, step = 1, width = "auto", value = 16),
selectInput("force_from", label = "Start again from a step : ", selected = "none", choices = list('none'='none','Preprocessing'='preprocessing','K-mer analysis'='kmer_analysis',"All"="all")), tags$br(),
selectInput("force_from", label = "Start again from a step : ", selected = "none", choices = list('No'='none','Preprocessing'='preprocessing','K-mer analysis'='kmer_analysis')), tags$br(),
actionButton("RunPipeline", "Run pipeline", icon("play"), class="btn btn-info"),
actionButton("StopPipeline", "Stop pipeline", icon("stop"), class="btn btn-secondary"),
......
......@@ -215,6 +215,13 @@ observeEvent(input$unlock,{
input_list <- reactiveValuesToList(input)
toggle_inputs(input_list,T,F)
})
output$DownloadParams <- downloadHandler(
filename = function() {
paste0("params", Sys.Date(), ".yaml", sep="")
},
content = function(file) {
save_params(file)
})
source("./server/opt_global.R", local=T)
......
FROM rocker/r-ver:3.5.3
ENV PATH /opt/biotools/bin:$PATH
ENV ROOTSYS /opt/biotools/root
ENV LD_LIBRARY_PATH '$LD_LIBRARY_PATH:$ROOTSYS/lib'
RUN apt-get update
RUN apt-get install -yq tzdata
RUN apt-get install -y locales
RUN locale-gen "en_US.UTF-8"
RUN export LC_ALL=en_US.UTF-8
RUN export LANG=en_US.UTF-8
RUN apt-get install -y curl wget apt-utils
RUN apt-get install -y gcc fort77 aptitude
RUN aptitude install -y g++ xorg-dev libreadline-dev gfortran
RUN apt-get install -y libssl-dev libxml2-dev libpcre3-dev liblzma-dev libbz2-dev libcurl4-openssl-dev liblapack3 git nano graphviz python3 python3-pip
RUN apt-get install -y autotools-dev automake cmake grep sed dpkg fuse zip build-essential pkg-config bzip2 ca-certificates libglib2.0-0 libxext6 libsm6 libxrender1 mercurial subversion zlib1g-dev libncurses5-dev libncursesw5-dev
RUN apt-get clean
RUN if [ ! -d "/opt/biotools" ];then mkdir /opt/biotools; fi
RUN if [ ! -d "/opt/biotools/bin" ];then mkdir /opt/biotools/bin; fi
RUN chmod 777 -R /opt/biotools/
ENV PATH /opt/biotools/bin:$PATH
RUN pip3 install snakemake==5.4.0 oyaml
RUN pip3 install multiqc==1.7
RUN fic=$(find /usr/ -name stacks.py) && sed -i 's/out_dict\[s_name\] = cdict/out_dict\[content\[0\]\] = cdict/' $fic
RUN Rscript -e 'install.packages("yaml",Ncpus=8,repos="https://cloud.r-project.org/")'
RUN Rscript -e 'install.packages("DT",Ncpus=8,repos="https://cloud.r-project.org/")'
RUN Rscript -e 'install.packages("shiny",Ncpus=8,repos="https://cloud.r-project.org/")'
RUN Rscript -e 'install.packages("shinydashboard",Ncpus=8,repos="https://cloud.r-project.org/")'
RUN Rscript -e 'install.packages("shinyjs",Ncpus=8,repos="https://cloud.r-project.org/")'
RUN Rscript -e 'install.packages("shinyFiles",Ncpus=8,repos="https://cloud.r-project.org/")'
RUN Rscript -e 'install.packages("BiocManager",Ncpus=8,repos="https://cloud.r-project.org/")'
FROM mmassaviol/mbb_workflows_base:latest
COPY files /workflow
COPY sagApp /sagApp
......
# Ignore everything in this directory
*
# Except this file
!.gitignore
import oyaml as yaml
import shutil
def read_yaml(filepath):
try:
......@@ -15,4 +16,11 @@ def write_yaml(filepath,data):
with open(filepath, 'w') as file:
yaml.dump(data, file, default_flow_style=False)
except IOError as e:
print("Error in file opening:", e)
\ No newline at end of file
print("Error in file opening:", e)
def copy_dir(src,dst):
try:
shutil.copytree(src,dst)
except FileExistsError:
shutil.rmtree(dst, ignore_errors=True)
shutil.copytree(src,dst)
\ No newline at end of file
......@@ -4,12 +4,18 @@ MenuGauche = sidebarMenu(id="sidebarmenu",
menuItem("Interop read metrics", tabName="interop_read_metrics", icon=icon("pencil", lib="font-awesome"), newtab=FALSE),
menuItem("Rule Graph", tabName="RULEGRAPH", icon=icon("gear", lib="font-awesome"), newtab=FALSE),
menuItem("Draw workflow graph", tabName="RULEGRAPH", icon=icon("gear", lib="font-awesome"), newtab=FALSE),
tags$br(),
downloadButton("DownloadParams", "Download config file", class="btn btn-light", style="color:black;margin: 6px 5px 6px 15px;"),
tags$br(),
tags$br(),
numericInput("cores", label = "Threads available", min = 1, max = 24, step = 1, width = "auto", value = 16),
selectInput("force_from", label = "Start again from a step : ", selected = "none", choices = list('none'='none','Interop read metrics'='interop_read_metrics',"All"="all")), tags$br(),
selectInput("force_from", label = "Start again from a step : ", selected = "none", choices = list('No'='none','Interop read metrics'='interop_read_metrics')), tags$br(),
actionButton("RunPipeline", "Run pipeline", icon("play"), class="btn btn-info"),
actionButton("StopPipeline", "Stop pipeline", icon("stop"), class="btn btn-secondary"),
......
......@@ -212,6 +212,13 @@ observeEvent(input$unlock,{
input_list <- reactiveValuesToList(input)
toggle_inputs(input_list,T,F)
})
output$DownloadParams <- downloadHandler(
filename = function() {
paste0("params", Sys.Date(), ".yaml", sep="")
},
content = function(file) {
save_params(file)
})
source("./server/opt_global.R", local=T)
......
FROM rocker/r-ver:3.5.3
ENV PATH /opt/biotools/bin:$PATH
ENV ROOTSYS /opt/biotools/root
ENV LD_LIBRARY_PATH '$LD_LIBRARY_PATH:$ROOTSYS/lib'
RUN apt-get update
RUN apt-get install -yq tzdata
RUN apt-get install -y locales
RUN locale-gen "en_US.UTF-8"
RUN export LC_ALL=en_US.UTF-8
RUN export LANG=en_US.UTF-8
RUN apt-get install -y curl wget apt-utils
RUN apt-get install -y gcc fort77 aptitude
RUN aptitude install -y g++ xorg-dev libreadline-dev gfortran
RUN apt-get install -y libssl-dev libxml2-dev libpcre3-dev liblzma-dev libbz2-dev libcurl4-openssl-dev liblapack3 git nano graphviz python3 python3-pip
RUN apt-get install -y autotools-dev automake cmake grep sed dpkg fuse zip build-essential pkg-config bzip2 ca-certificates libglib2.0-0 libxext6 libsm6 libxrender1 mercurial subversion zlib1g-dev libncurses5-dev libncursesw5-dev
RUN apt-get clean
RUN if [ ! -d "/opt/biotools" ];then mkdir /opt/biotools; fi
RUN if [ ! -d "/opt/biotools/bin" ];then mkdir /opt/biotools/bin; fi
RUN chmod 777 -R /opt/biotools/
ENV PATH /opt/biotools/bin:$PATH
RUN pip3 install snakemake==5.4.0 oyaml
RUN pip3 install multiqc==1.7
RUN fic=$(find /usr/ -name stacks.py) && sed -i 's/out_dict\[s_name\] = cdict/out_dict\[content\[0\]\] = cdict/' $fic
RUN Rscript -e 'install.packages("yaml",Ncpus=8,repos="https://cloud.r-project.org/")'
RUN Rscript -e 'install.packages("DT",Ncpus=8,repos="https://cloud.r-project.org/")'
RUN Rscript -e 'install.packages("shiny",Ncpus=8,repos="https://cloud.r-project.org/")'
RUN Rscript -e 'install.packages("shinydashboard",Ncpus=8,repos="https://cloud.r-project.org/")'
RUN Rscript -e 'install.packages("shinyjs",Ncpus=8,repos="https://cloud.r-project.org/")'
RUN Rscript -e 'install.packages("shinyFiles",Ncpus=8,repos="https://cloud.r-project.org/")'
RUN Rscript -e 'install.packages("BiocManager",Ncpus=8,repos="https://cloud.r-project.org/")'
FROM mmassaviol/mbb_workflows_base:latest
COPY files /workflow
COPY sagApp /sagApp
......
......@@ -137,7 +137,7 @@ rule minimap2_overlap_self:
reads_overlaps = config["results_dir"] + "/" + config["minimap2_overlap_self_output_dir"] + "/reads.paf.gz",
params:
output_dir = config["results_dir"] + "/" + config["minimap2_overlap_self_output_dir"]+ "/",
pacbio_oxfordNanopore = config["minimap2_overlap_self_pacbio_oxfordNanopore"],
pacbio_oxfordNanopore = config["pacbio_oxfordNanopore"],
log:
config["results_dir"] + "/logs/minimap2_overlap_self/minimap2_overlap_self_log.txt"
threads:
......@@ -177,7 +177,7 @@ rule minimap2_reference:
reads_mapping = config["results_dir"] + "/" + config["minimap2_reference_output_dir"] + "/reads.paf.gz",
params:
output_dir = config["results_dir"] + "/" + config["minimap2_reference_output_dir"]+ "/",
pacbio_oxfordNanopore = config["minimap2_overlap_self_pacbio_oxfordNanopore"],
pacbio_oxfordNanopore = config["pacbio_oxfordNanopore"],
log:
config["results_dir"] + "/logs/minimap2_reference/minimap2_reference_log.txt"
threads:
......
......@@ -2,11 +2,11 @@ pipeline: Long_Read_Assembly
params:
results_dir: /Results
sample_dir: /Data
pacbio_oxfordNanopore: ont
SeOrPe: SE
find_overlaps: minimap2_overlap_self
minimap2_overlap_self_output_dir: minimap2_overlap_self
minimap2_overlap_self_threads: 4
minimap2_overlap_self_pacbio_oxfordNanopore: bwtsw
assembly: miniasm
miniasm_output_dir: miniasm
mapping: minimap2_reference
......@@ -60,6 +60,8 @@ params_info:
type: output_dir
sample_dir:
type: input_dir
pacbio_oxfordNanopore:
type: radio
SeOrPe:
type: radio
minimap2_overlap_self_threads:
......@@ -67,11 +69,6 @@ params_info:
rule: minimap2_overlap_self
type: numeric
label: Number of threads to use
minimap2_overlap_self_pacbio_oxfordNanopore:
tool: minimap2_overlap_self
rule: minimap2_overlap_self
type: radio
label: Sequencing used to produce reads
minimap2_reference_threads:
tool: minimap2_reference
rule: minimap2_reference
......
# Ignore everything in this directory
*
# Except this file
!.gitignore
import oyaml as yaml
import shutil
def read_yaml(filepath):
try:
......@@ -15,4 +16,11 @@ def write_yaml(filepath,data):
with open(filepath, 'w') as file:
yaml.dump(data, file, default_flow_style=False)
except IOError as e:
print("Error in file opening:", e)
\ No newline at end of file
print("Error in file opening:", e)
def copy_dir(src,dst):
try:
shutil.copytree(src,dst)
except FileExistsError:
shutil.rmtree(dst, ignore_errors=True)
shutil.copytree(src,dst)
\ No newline at end of file
......@@ -14,12 +14,18 @@ MenuGauche = sidebarMenu(id="sidebarmenu",
menuItem("Assembly Quality", tabName="assembly_quality", icon=icon("pencil", lib="font-awesome"), newtab=FALSE),
menuItem("Rule Graph", tabName="RULEGRAPH", icon=icon("gear", lib="font-awesome"), newtab=FALSE),
menuItem("Draw workflow graph", tabName="RULEGRAPH", icon=icon("gear", lib="font-awesome"), newtab=FALSE),
tags$br(),
downloadButton("DownloadParams", "Download config file", class="btn btn-light", style="color:black;margin: 6px 5px 6px 15px;"),
tags$br(),
tags$br(),
numericInput("cores", label = "Threads available", min = 1, max = 24, step = 1, width = "auto", value = 16),
selectInput("force_from", label = "Start again from a step : ", selected = "none", choices = list('none'='none','Find overlaps'='find_overlaps','Assembly'='assembly','Mapping'='mapping','Correction'='correction','Polishing'='polishing','Assembly Quality'='assembly_quality',"All"="all")), tags$br(),
selectInput("force_from", label = "Start again from a step : ", selected = "none", choices = list('No'='none','Find overlaps'='find_overlaps','Assembly'='assembly','Mapping'='mapping','Correction'='correction','Polishing'='polishing','Assembly Quality'='assembly_quality')), tags$br(),
actionButton("RunPipeline", "Run pipeline", icon("play"), class="btn btn-info"),
actionButton("StopPipeline", "Stop pipeline", icon("stop"), class="btn btn-secondary"),
......
......@@ -227,6 +227,13 @@ observeEvent(input$unlock,{
input_list <- reactiveValuesToList(input)
toggle_inputs(input_list,T,F)
})
output$DownloadParams <- downloadHandler(
filename = function() {
paste0("params", Sys.Date(), ".yaml", sep="")
},
content = function(file) {
save_params(file)
})
source("./server/opt_global.R", local=T)
......
......@@ -5,8 +5,6 @@ box(title = "Parameters :", width = 12, status = "primary", collapsible = TRUE,
hidden(textInput("selectfind_overlaps", label = "", value="minimap2_overlap_self")),box(title = "minimap2 overlap self", width = 12, status = "success", collapsible = TRUE, solidHeader = TRUE,
numericInput("minimap2_overlap_self_threads", label = "Number of threads to use", min = 1, max = NA, step = 1, width = "auto", value = 4),
radioButtons("minimap2_overlap_self_pacbio_oxfordNanopore", label = "Sequencing used to produce reads", choices = list("Pacbio" = "pb", "Oxford Nanopore" = "ont"), selected = "bwtsw", width = "auto"),
p("minimap2 overlap self: A versatile pairwise aligner for genomic and spliced nucleotide sequences"),
p("Website : ",a(href="https://lh3.github.io/minimap2/","https://lh3.github.io/minimap2/",target="_blank")),
......
......@@ -17,6 +17,8 @@ box(title = "Parameters :", width = 12, status = "primary", collapsible = TRUE,
)
,
radioButtons("pacbio_oxfordNanopore", label = "Sequencing used to produce reads", choices = list("Pacbio" = "pb", "Oxford Nanopore" = "ont"), selected = "ont", width = "auto"),
radioButtons("SeOrPe", label = "Single end reads (SE) or Paired end reads (PE): ", choices = list("Single end" = "SE", "Paired end" = "PE"), selected = "SE", width = "auto"),
textAreaInput("memo", label = "Text area for the user", value = "")
......
......@@ -13,6 +13,12 @@ save_params <- function(path_param){
res = paste0(res, paste("sample_dir:", paste0('"', input$sample_dir, '"'), "\n", sep = " "))
}
if(!is.na(as.numeric(input$pacbio_oxfordNanopore))) {
res = paste0(res, paste("pacbio_oxfordNanopore:", input$pacbio_oxfordNanopore, "\n", sep = " "))
} else {
res = paste0(res, paste("pacbio_oxfordNanopore:", paste0('"', input$pacbio_oxfordNanopore, '"'), "\n", sep = " "))
}
if(!is.na(as.numeric(input$SeOrPe))) {
res = paste0(res, paste("SeOrPe:", input$SeOrPe, "\n", sep = " "))
} else {
......@@ -33,12 +39,6 @@ save_params <- function(path_param){
res = paste0(res, paste("minimap2_overlap_self_threads:", paste0('"', input$minimap2_overlap_self_threads, '"'), "\n", sep = " "))
}
if(!is.na(as.numeric(input$minimap2_overlap_self_pacbio_oxfordNanopore))) {
res = paste0(res, paste("minimap2_overlap_self_pacbio_oxfordNanopore:", input$minimap2_overlap_self_pacbio_oxfordNanopore, "\n", sep = " "))
} else {
res = paste0(res, paste("minimap2_overlap_self_pacbio_oxfordNanopore:", paste0('"', input$minimap2_overlap_self_pacbio_oxfordNanopore, '"'), "\n", sep = " "))
}
# Page : assembly
res = paste0(res , paste("assembly:", paste0('"', input$selectassembly, '"'), "\n", sep = " "))
# Page : mapping
......
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