Commit 7b916868 authored by mmassaviol's avatar mmassaviol
Browse files

Add snakemake command in the dry run

parent dc32eefd
......@@ -653,8 +653,9 @@ generate_pages_server <- function() {
res <- res + '\t\tsave_params(path_param)\n'
res <- res + '\n'
res <- res + '\t\tforce = force_rule(input$force_from)\n'
res <- res + '\t\tcommand = paste0("Command line to run the workflow:<br/>","snakemake -s /workflow/Snakefile --configfile ", paste0(input$results_dir,"/params.yml") ,\t" -d ", input$results_dir ,\t" --cores ", input$cores, " all ", force, " -n -p<br/>This snakemake command needs the Snakefile and the params file of the workflow (remove -n for execution)<br/><br/>What will be done :<br/>")\n'
res <- res + '\t\tdry_out = system(paste0("snakemake -s /workflow/Snakefile --configfile ", paste0(input$results_dir,"/params.yml") ,\t" -d ", input$results_dir ,\t" --cores ", input$cores, " all ", force, " -n -p"),wait = T, intern=T)\n'
res <- res + '\t\tdryUI = tags$p(HTML(paste(dry_out, collapse = "<br/>")))\n'
res <- res + '\t\tdryUI = tags$p(HTML(paste0(command, paste(dry_out, collapse = "<br/>"))))\n'
res <- res + '\n'
res <- res + '\t\toutput$dry_run_div = renderUI(dryUI)\n'
res <- res + '\t\ttoggle_inputs(input_list,T,F)\n'
......@@ -712,8 +713,9 @@ generate_pages_server <- function() {
res <- res + '\t\trerun = if (input$rerun_incomplete) "--rerun-incomplete" else ""\n'
## DRY RUN
res <- res + '\t\t\tcommand = paste0("Command line to run the workflow:<br/>","snakemake -s /workflow/Snakefile --configfile ", paste0(input$results_dir,"/params.yml") ,\t" -d ", input$results_dir ,\t" --cores ", input$cores, " all ", force, " -n -p<br/>This snakemake command needs the Snakefile and the params file of the workflow (remove -n for execution)<br/><br/>What will be done :<br/>")\n'
res <- res + '\t\t\tsystem(paste0("snakemake -s /workflow/Snakefile --configfile ", paste0(input$results_dir,"/params.yml") ," -d ", input$results_dir ," --cores ", input$cores, " all ", force, " ", rerun, " -n -p > ", input$results_dir, "/Run_Summary_mqc.html"),wait = T)\n'
res <- res + '\t\t\tsystem(paste0("sed -i \'1 i\\\\<pre> \' ",input$results_dir,"/Run_Summary_mqc.html"))\n'
res <- res + '\t\t\tsystem(paste0("sed -i \'1 i\\\\<pre>",command,"\' ",input$results_dir,"/Run_Summary_mqc.html"))\n'
res <- res + '\t\tsystem2("python3",paste0("-u -m snakemake -s /workflow/Snakefile --configfile ", paste0(input$results_dir,"/params.yml") ,\t" -d ", input$results_dir ,\t" --cores ", input$cores, " all ", force, " ",rerun),wait = FALSE, stdout = paste0(input$results_dir,"/logs/runlog.txt"), stderr = paste0(input$results_dir,"/logs/runlog.txt"))\n'
res <- res + '\t\ttags$iframe(src="results/multiqc_report.html",width="100%", height="900px")},\n'
......
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