From 3258b2e70fc0b10d92ae9dfdde62dcc613f81727 Mon Sep 17 00:00:00 2001 From: hoelzer Date: Sun, 11 Feb 2024 18:03:31 +0100 Subject: [PATCH 1/7] fix typo --- main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.nf b/main.nf index d98c6f9..66f8e21 100644 --- a/main.nf +++ b/main.nf @@ -155,7 +155,7 @@ def helpMSG() { --evalue Evalue for DIAMOND protein search [default: $params.evalue] --seqidentity Sequence identity for DIAMOD alignments [default: $params.seqidentity] --alnlength Alignment length for DIAMOND hits [default: $params.alnlength] - --blastp Use BLASTP instead of DIAMOND for protein alignment (slower, as in the original 2014 publication) [default: $params.blastp] + --blastp Use BLASTP instead of DIAMOND for protein alignment (slower but as in the original 2014 publication) [default: $params.blastp] ${c_dim}Nextflow options: -with-report rep.html cpu / ram usage (may cause errors) From 555f7ec946f516a5b793acdf2f09c66dd1b4867f Mon Sep 17 00:00:00 2001 From: hoelzer Date: Sun, 11 Feb 2024 20:59:21 +0100 Subject: [PATCH 2/7] extend execution warnings when non-default POCP params are used --- main.nf | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/main.nf b/main.nf index 66f8e21..7f6759e 100644 --- a/main.nf +++ b/main.nf @@ -13,10 +13,54 @@ println "Starting time: $nextflow.timestamp" println "Workdir location:" println " $workflow.workDir\u001B[0m" println " " +// error codes +if (params.profile) { exit 1, "--profile is WRONG use -profile" } +if ( !workflow.revision ) { + println "\033[0;33mWARNING: It is recommended to use a stable relese version via -r." + println "Use 'nextflow info hoelzer/pocp' to check for available release versions.\033[0m\n" +} +// help if (params.help) { exit 0, helpMSG() } +// input error codes if (params.genomes == '' && params.proteins == '') {exit 1, "input missing, use either [--genomes] or [--proteins]"} if (params.genomes != '' && params.proteins != '') {exit 1, "provide one input, use either [--genomes] or [--proteins]"} if (params.genome && params.protein) {exit 1, "provide only one input, use either [--genome] or [--protein]"} +// print if default params are used: +if (params.evalue == '1e-5' && params.seqidentity == 0.4 && params.alnlength == 0.5 && !params.blastp ) { + if ( !workflow.revision ) { + println "\u001B[32mPOCP-nf was executed \033[0;31mwithout a stable release version\033[0m\u001B[32m and default paramters (e-value ${params.evalue}, sequence identity ${params.seqidentity}, alignment length ${params.alnlength}), according to the original definition by Qin et al. (2014)." + } else { + println "\u001B[32mPOCP-nf was executed in version ${workflow.revision} with default paramters (e-value ${params.evalue}, sequence identity ${params.seqidentity}, alignment length ${params.alnlength}), according to the original definition by Qin et al. (2014)." + } + println "" + println "\033[0m" + // print if NO default params are used +} else { + if ( !workflow.revision ) { + println "\033[0;31mPOCP-nf was executed without a stable release version and non-default paramters" + println "" + println "e-value used:\t\t${params.evalue}\t(original definition: 1e-5)" + println "Sequence identity used:\t${params.seqidentity}\t(original definition: 0.4)" + println "Alignment length used:\t${params.alnlength}\t(original definition: 0.5)" + println "" + println "in comparison to the original definition by Qin et al. (2014)." + } else { + println "\033[0;31mPOCP-nf was executed in version ${workflow.revision} with non-default paramters" + println "" + println "e-value used:\t\t${params.evalue}\t(original definition: 1e-5)" + println "Sequence identity used:\t${params.seqidentity}\t(original definition: 0.4)" + println "Alignment length used:\t${params.alnlength}\t(original definition: 0.5)" + println "" + println "in comparison to the original definition by Qin et al. (2014)." + } + println "" + println "This will change your POCP results." + println "If you really want to use adjusted parameters, you must report them together with the used version of POCP-nf to ensure reproducibility!" + println "" + println "\033[0m" +} + + // genomes fasta input & --list support if (params.genomes && params.list) { genome_input_ch = Channel From 1155c3ebb7609755f74a7dc1fc95795fbe6fa2c8 Mon Sep 17 00:00:00 2001 From: hoelzer Date: Sun, 11 Feb 2024 21:00:20 +0100 Subject: [PATCH 3/7] extend execution warnings when non-default POCP params are used --- main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.nf b/main.nf index 7f6759e..83db645 100644 --- a/main.nf +++ b/main.nf @@ -30,7 +30,7 @@ if (params.evalue == '1e-5' && params.seqidentity == 0.4 && params.alnlength == if ( !workflow.revision ) { println "\u001B[32mPOCP-nf was executed \033[0;31mwithout a stable release version\033[0m\u001B[32m and default paramters (e-value ${params.evalue}, sequence identity ${params.seqidentity}, alignment length ${params.alnlength}), according to the original definition by Qin et al. (2014)." } else { - println "\u001B[32mPOCP-nf was executed in version ${workflow.revision} with default paramters (e-value ${params.evalue}, sequence identity ${params.seqidentity}, alignment length ${params.alnlength}), according to the original definition by Qin et al. (2014)." + println "\u001B[32mPOCP-nf was executed in version '${workflow.revision}' with default paramters (e-value ${params.evalue}, sequence identity ${params.seqidentity}, alignment length ${params.alnlength}), according to the original definition by Qin et al. (2014)." } println "" println "\033[0m" @@ -45,7 +45,7 @@ if (params.evalue == '1e-5' && params.seqidentity == 0.4 && params.alnlength == println "" println "in comparison to the original definition by Qin et al. (2014)." } else { - println "\033[0;31mPOCP-nf was executed in version ${workflow.revision} with non-default paramters" + println "\033[0;31mPOCP-nf was executed in version '${workflow.revision}' with non-default paramters" println "" println "e-value used:\t\t${params.evalue}\t(original definition: 1e-5)" println "Sequence identity used:\t${params.seqidentity}\t(original definition: 0.4)" From 41f3be323589f14898b4e4ad5ebb097c37d6f317 Mon Sep 17 00:00:00 2001 From: hoelzer Date: Sun, 11 Feb 2024 21:01:11 +0100 Subject: [PATCH 4/7] extend execution warnings when non-default POCP params are used --- main.nf | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/main.nf b/main.nf index 83db645..2e23e52 100644 --- a/main.nf +++ b/main.nf @@ -37,21 +37,19 @@ if (params.evalue == '1e-5' && params.seqidentity == 0.4 && params.alnlength == // print if NO default params are used } else { if ( !workflow.revision ) { - println "\033[0;31mPOCP-nf was executed without a stable release version and non-default paramters" + println "\033[0;31mPOCP-nf was executed without a stable release version and non-default paramters in comparison to the original definition by Qin et al. (2014)." println "" println "e-value used:\t\t${params.evalue}\t(original definition: 1e-5)" println "Sequence identity used:\t${params.seqidentity}\t(original definition: 0.4)" println "Alignment length used:\t${params.alnlength}\t(original definition: 0.5)" println "" - println "in comparison to the original definition by Qin et al. (2014)." } else { - println "\033[0;31mPOCP-nf was executed in version '${workflow.revision}' with non-default paramters" + println "\033[0;31mPOCP-nf was executed in version '${workflow.revision}' with non-default paramters in comparison to the original definition by Qin et al. (2014)." println "" println "e-value used:\t\t${params.evalue}\t(original definition: 1e-5)" println "Sequence identity used:\t${params.seqidentity}\t(original definition: 0.4)" println "Alignment length used:\t${params.alnlength}\t(original definition: 0.5)" println "" - println "in comparison to the original definition by Qin et al. (2014)." } println "" println "This will change your POCP results." From b8894ad770e980d5481dad291f18b6f05456c164 Mon Sep 17 00:00:00 2001 From: hoelzer Date: Sun, 11 Feb 2024 21:03:12 +0100 Subject: [PATCH 5/7] extend execution warnings when non-default POCP params are used --- main.nf | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/main.nf b/main.nf index 2e23e52..2484dc4 100644 --- a/main.nf +++ b/main.nf @@ -28,23 +28,27 @@ if (params.genome && params.protein) {exit 1, "provide only one input, use eithe // print if default params are used: if (params.evalue == '1e-5' && params.seqidentity == 0.4 && params.alnlength == 0.5 && !params.blastp ) { if ( !workflow.revision ) { - println "\u001B[32mPOCP-nf was executed \033[0;31mwithout a stable release version\033[0m\u001B[32m and default paramters (e-value ${params.evalue}, sequence identity ${params.seqidentity}, alignment length ${params.alnlength}), according to the original definition by Qin et al. (2014)." + println "\u001B[32mPOCP-nf was executed \033[0;31mwithout a stable release version\033[0m\u001B[32m and default paramters according to the original publication by Qin et al. (2014)." } else { - println "\u001B[32mPOCP-nf was executed in version '${workflow.revision}' with default paramters (e-value ${params.evalue}, sequence identity ${params.seqidentity}, alignment length ${params.alnlength}), according to the original definition by Qin et al. (2014)." + println "\u001B[32mPOCP-nf was executed in version '${workflow.revision}' with default paramters according to the original publication by Qin et al. (2014)." } println "" + println "e-value used:\t\t${params.evalue}" + println "Sequence identity used:\t${params.seqidentity}" + println "Alignment length used:\t${params.alnlength}" + println "" println "\033[0m" // print if NO default params are used } else { if ( !workflow.revision ) { - println "\033[0;31mPOCP-nf was executed without a stable release version and non-default paramters in comparison to the original definition by Qin et al. (2014)." + println "\033[0;31mPOCP-nf was executed without a stable release version and non-default paramters in comparison to the original publication by Qin et al. (2014)." println "" println "e-value used:\t\t${params.evalue}\t(original definition: 1e-5)" println "Sequence identity used:\t${params.seqidentity}\t(original definition: 0.4)" println "Alignment length used:\t${params.alnlength}\t(original definition: 0.5)" println "" } else { - println "\033[0;31mPOCP-nf was executed in version '${workflow.revision}' with non-default paramters in comparison to the original definition by Qin et al. (2014)." + println "\033[0;31mPOCP-nf was executed in version '${workflow.revision}' with non-default paramters in comparison to the original publication by Qin et al. (2014)." println "" println "e-value used:\t\t${params.evalue}\t(original definition: 1e-5)" println "Sequence identity used:\t${params.seqidentity}\t(original definition: 0.4)" From 8d361b52241d49ec062501d462105b530b4bb479 Mon Sep 17 00:00:00 2001 From: hoelzer Date: Sun, 11 Feb 2024 21:04:33 +0100 Subject: [PATCH 6/7] extend execution warnings when non-default POCP params are used --- main.nf | 3 --- 1 file changed, 3 deletions(-) diff --git a/main.nf b/main.nf index 2484dc4..ff2bbcc 100644 --- a/main.nf +++ b/main.nf @@ -36,7 +36,6 @@ if (params.evalue == '1e-5' && params.seqidentity == 0.4 && params.alnlength == println "e-value used:\t\t${params.evalue}" println "Sequence identity used:\t${params.seqidentity}" println "Alignment length used:\t${params.alnlength}" - println "" println "\033[0m" // print if NO default params are used } else { @@ -46,14 +45,12 @@ if (params.evalue == '1e-5' && params.seqidentity == 0.4 && params.alnlength == println "e-value used:\t\t${params.evalue}\t(original definition: 1e-5)" println "Sequence identity used:\t${params.seqidentity}\t(original definition: 0.4)" println "Alignment length used:\t${params.alnlength}\t(original definition: 0.5)" - println "" } else { println "\033[0;31mPOCP-nf was executed in version '${workflow.revision}' with non-default paramters in comparison to the original publication by Qin et al. (2014)." println "" println "e-value used:\t\t${params.evalue}\t(original definition: 1e-5)" println "Sequence identity used:\t${params.seqidentity}\t(original definition: 0.4)" println "Alignment length used:\t${params.alnlength}\t(original definition: 0.5)" - println "" } println "" println "This will change your POCP results." From 4ac63714c33763ba8e7b43673dadcc17c574d81d Mon Sep 17 00:00:00 2001 From: hoelzer Date: Sun, 11 Feb 2024 21:10:46 +0100 Subject: [PATCH 7/7] extend execution warnings when non-default POCP params are used --- main.nf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.nf b/main.nf index ff2bbcc..bcdbe27 100644 --- a/main.nf +++ b/main.nf @@ -33,9 +33,9 @@ if (params.evalue == '1e-5' && params.seqidentity == 0.4 && params.alnlength == println "\u001B[32mPOCP-nf was executed in version '${workflow.revision}' with default paramters according to the original publication by Qin et al. (2014)." } println "" - println "e-value used:\t\t${params.evalue}" - println "Sequence identity used:\t${params.seqidentity}" - println "Alignment length used:\t${params.alnlength}" + println "e-value:\t\t${params.evalue}" + println "Sequence identity:\t${params.seqidentity}" + println "Alignment length:\t${params.alnlength}" println "\033[0m" // print if NO default params are used } else {