From e927d7d210c6a6b70bac7fc946a10961f649bc45 Mon Sep 17 00:00:00 2001 From: laurencekuhl Date: Thu, 17 Oct 2024 11:52:32 +0200 Subject: [PATCH] Add the function --- .../utils_nfcore_crisprseq_pipeline/main.nf | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/subworkflows/local/utils_nfcore_crisprseq_pipeline/main.nf b/subworkflows/local/utils_nfcore_crisprseq_pipeline/main.nf index be2b17c..570ca8c 100644 --- a/subworkflows/local/utils_nfcore_crisprseq_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_crisprseq_pipeline/main.nf @@ -468,3 +468,29 @@ def methodsDescriptionText(mqc_methods_yaml) { return description_html.toString() } +def validateParametersScreening() { + if(params.rra && params.mle_design_matrix) { + warning "mle_design_matrix will only be used for the MAGeCK MLE computations" + } + + if(params.fasta && params.count_table) { + error "Please provide either a fasta file or a count_table" + } + + if(params.fasta && !params.library) { + error "Please provide a fasta file and the library file" + } + + if(params.day0_label && params.mle_design_matrix) { + warning "MAGeCK MLE module will be run twice, once with the design matrix and once with day0-label" + } + + if(params.rra && params.mle_design_matrix) { + warning "mle_design_matrix will only be used for the MAGeCK MLE computations" + } + + if(params.rra && !params.contrasts) { + error "Please also provide the contrasts table to compare the samples for MAGeCK RRA" + } +} +