Commit e235b6ba authored by mmassaviol's avatar mmassaviol
Browse files

Update Genome_Profile workflow

parent 0bda3f8f
......@@ -56,11 +56,6 @@ def jellyfish_count_inputs():
inputs["read2"] = expand(raw_reads()["read2"],sample=SAMPLES)
return inputs
def genomescope_inputs():
inputs = dict()
inputs["kmer_histo"] = rules.jellyfish_histo.output.kmer_histo
return inputs
def prepare_report_inputs():
inputs = list()
for step in STEPS:
......@@ -96,9 +91,6 @@ def multiqc_inputs():
def step_outputs(step):
outputs = list()
if (step == "kmer_counting"):
if (config[step] == "jellyfish"):
outputs = rules.jellyfish_histo.output
if (step == "kmer_analysis"):
if (config[step] == "genomescope"):
......@@ -244,22 +236,22 @@ rule jellyfish_histo:
rule genomescope:
input:
**genomescope_inputs(),
kmer_histo = rules.jellyfish_histo.output.kmer_histo
output:
GenomeScope_Profile = config["results_dir"] + "/" + config["genomescope_output_dir"] + "/GenomeScope_Profile_mqc.png",
GenomeScope_Profile_log_scale = config["results_dir"] + "/" + config["genomescope_output_dir"] + "/GenomeScope_Profile_log_scale_mqc.png",
Summary = config["results_dir"] + "/" + config["genomescope_output_dir"] + "/GenomeScope_Summary_mqc.csv"
params:
output_dir = config["results_dir"] + "/" + config["genomescope_output_dir"],
kmer_len = config["genomescope_kmer_len"],
kmer_len = config["jellyfish_count_kmer_len"],
reads_len = config["genomescope_reads_len"]
log:
config["results_dir"]+'/logs/genomescope/genomescope_log.txt'
shell:
"Rscript /opt/biotools/genomescope.R "
"{input.kmer_histo} "
"{params.kmer_len} " # kmer length
"{params.reads_len} " # reads length
"{params.kmer_len} "
"{params.reads_len} "
"{params.output_dir} "
"|& tee {log};"
# prepare mqc custom content
......
......@@ -16,7 +16,7 @@ params:
fastp_overrepresentation_analysis: true
fastp_SE_output_dir: fastp_SE
null_output_dir: ''
kmer_counting: jellyfish
kmer_analysis: genomescope
jellyfish_count_output_dir: jellyfish
reads: ''
jellyfish_threads: 4
......@@ -25,11 +25,9 @@ params:
jellyfish_count_hash_size: 100000000
jellyfish_histo_output_dir: jellyfish
kmer_counts: counts.jf
kmer_analysis: genomescope
genomescope_output_dir: genomescope
kmer_histo: kmer_histo_jf.hist
genomescope_kmer_len: 21
genomescope_reads_len: 300
genomescope_reads_len: 150
samples: []
groups: []
steps:
......@@ -39,11 +37,6 @@ steps:
- fastp
- 'null'
default: 'null'
- title: K-mer counting
name: kmer_counting
tools:
- jellyfish
default: jellyfish
- title: K-mer analysis
name: kmer_analysis
tools:
......@@ -106,31 +99,26 @@ params_info:
type: checkbox
label: enable overrepresented sequence analysis.
jellyfish_threads:
tool: jellyfish
tool: genomescope
rule: jellyfish_histo
type: numeric
label: Number of threads to use
jellyfish_count_canonical_kmer:
tool: jellyfish
tool: genomescope
rule: jellyfish_count
type: checkbox
label: '-C : Save in the hash only canonical k-mers, while the count is the number
of occurrences of both a k-mer and it reverse complement'
jellyfish_count_kmer_len:
tool: jellyfish
tool: genomescope
rule: jellyfish_count
type: numeric
label: K-mers length
jellyfish_count_hash_size:
tool: jellyfish
tool: genomescope
rule: jellyfish_count
type: numeric
label: Kmer size estimation
genomescope_kmer_len:
tool: genomescope
rule: genomescope
type: numeric
label: K-mers length
genomescope_reads_len:
tool: genomescope
rule: genomescope
......@@ -165,7 +153,7 @@ outputs:
description: "Reads pr\xE9process\xE9s"
'null':
'null': []
jellyfish:
genomescope:
jellyfish_count:
- name: kmer_counts
file: counts.jf
......@@ -174,7 +162,6 @@ outputs:
- name: kmer_histo
file: kmer_histo_jf.hist
description: Jellyfish kmer histogram
genomescope:
genomescope:
- name: GenomeScope_Profile
file: /GenomeScope_Profile_mqc.png
......@@ -188,5 +175,4 @@ outputs:
multiqc:
fastp: fastp
'null': custom
jellyfish: jellyfish
genomescope: custom
......@@ -4,8 +4,6 @@ MenuGauche = sidebarMenu(id="sidebarmenu",
menuItem("Preprocessing", tabName="preprocessing", icon=icon("pencil", lib="font-awesome"), newtab=FALSE),
menuItem("K-mer counting", tabName="kmer_counting", icon=icon("pencil", lib="font-awesome"), newtab=FALSE),
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),
......@@ -13,7 +11,7 @@ MenuGauche = sidebarMenu(id="sidebarmenu",
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 counting'='kmer_counting','K-mer analysis'='kmer_analysis',"All"="all")), tags$br(),
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(),
actionButton("RunPipeline", "Run pipeline", icon("play"), class="btn btn-info"),
actionButton("StopPipeline", "Stop pipeline", icon("stop"), class="btn btn-secondary"),
......
......@@ -3,9 +3,15 @@ tabkmer_analysis = fluidPage(
box(title = "Parameters :", width = 12, status = "primary", collapsible = TRUE, solidHeader = TRUE,
hidden(textInput("selectkmer_analysis", label = "", value="genomescope")),box(title = "GenomeScope", width = 12, status = "success", collapsible = TRUE, solidHeader = TRUE,
numericInput("genomescope_kmer_len", label = "K-mers length", min = 1, max = NA, step = 1, width = "auto", value = 21),
numericInput("jellyfish_threads", label = "Number of threads to use", min = 1, max = NA, step = 1, width = "auto", value = 4),
numericInput("genomescope_reads_len", label = "Read length", min = 1, max = NA, step = 1, width = "auto", value = 300),
checkboxInput("jellyfish_count_canonical_kmer", label = "-C : Save in the hash only canonical k-mers, while the count is the number of occurrences of both a k-mer and it reverse complement", value = TRUE),
numericInput("jellyfish_count_kmer_len", label = "K-mers length", min = 1, max = NA, step = 1, width = "auto", value = 21),
numericInput("jellyfish_count_hash_size", label = "Kmer size estimation", min = 1, max = NA, step = 1, width = "auto", value = 100000000),
numericInput("genomescope_reads_len", label = "Read length", min = 1, max = NA, step = 1, width = "auto", value = 150),
p("GenomeScope: Fast genome analysis from unassembled short reads"),
......
......@@ -81,8 +81,8 @@ save_params <- function(path_param){
res = paste0(res, paste("fastp_overrepresentation_analysis:", "false", "\n", sep = " "))
}
# Page : kmer_counting
res = paste0(res , paste("kmer_counting:", paste0('"', input$selectkmer_counting, '"'), "\n", sep = " "))
# Page : kmer_analysis
res = paste0(res , paste("kmer_analysis:", paste0('"', input$selectkmer_analysis, '"'), "\n", sep = " "))
if(!is.na(as.numeric(input$jellyfish_threads))) {
res = paste0(res, paste("jellyfish_threads:", input$jellyfish_threads, "\n", sep = " "))
} else {
......@@ -107,14 +107,6 @@ save_params <- function(path_param){
res = paste0(res, paste("jellyfish_count_hash_size:", paste0('"', input$jellyfish_count_hash_size, '"'), "\n", sep = " "))
}
# Page : kmer_analysis
res = paste0(res , paste("kmer_analysis:", paste0('"', input$selectkmer_analysis, '"'), "\n", sep = " "))
if(!is.na(as.numeric(input$genomescope_kmer_len))) {
res = paste0(res, paste("genomescope_kmer_len:", input$genomescope_kmer_len, "\n", sep = " "))
} else {
res = paste0(res, paste("genomescope_kmer_len:", paste0('"', input$genomescope_kmer_len, '"'), "\n", sep = " "))
}
if(!is.na(as.numeric(input$genomescope_reads_len))) {
res = paste0(res, paste("genomescope_reads_len:", input$genomescope_reads_len, "\n", sep = " "))
} else {
......
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