From 5b85276575ed6de972031034968e394f60b4a1c0 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Wed, 22 Mar 2023 20:34:14 +0000 Subject: [PATCH 1/7] Fix #368 --- CHANGELOG.md | 2 ++ bin/ivar_variants_to_vcf.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fe54284..be37458c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ Special thanks to the following for their code contributions to the release: - [Friederike Hanssen](https://github.com/FriederikeHanssen) - [Hugo Tavares](https://github.com/tavareshugo) +- [Jessica Wu](https://github.com/wutron) - [Matthew Wells](https://github.com/mattheww95) - [Maxime Garcia](https://github.com/maxulysse) - [Phil Ewels](https://github.com/ewels) @@ -29,6 +30,7 @@ Thank you to everyone else that has contributed by reporting bugs, enhancements - [[#348](https://github.com/nf-core/viralrecon/issues/348)] - Document full parameters of iVar consensus - [[#349](https://github.com/nf-core/viralrecon/issues/349)] - ERROR in Script plasmidID - [[#356](https://github.com/nf-core/viralrecon/issues/356)] - Add NEB SARS-CoV-2 primers +- [[#368](https://github.com/nf-core/viralrecon/issues/368)] - Incorrect depth from ivar variants reported in variants long table - Updated pipeline template to [nf-core/tools 2.7.2](https://github.com/nf-core/tools/releases/tag/2.7.2) - Add `tower.yml` for Report rendering in Nextflow Tower - Use `--skip_plasmidid` by default diff --git a/bin/ivar_variants_to_vcf.py b/bin/ivar_variants_to_vcf.py index c4d19319..d00b3988 100755 --- a/bin/ivar_variants_to_vcf.py +++ b/bin/ivar_variants_to_vcf.py @@ -126,7 +126,7 @@ def parse_ivar_line(line): QUAL = "." ## Determine FILTER field - INFO = f"DP={line[11]}" + INFO = f"DP={int(float(line[11]))}" pass_test = line[13] return ( From a584b82ef8074a98bdf037b7ca3e4297761a0c06 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Wed, 22 Mar 2023 21:29:56 +0000 Subject: [PATCH 2/7] Add more prominent warnings about using custom config to provide parameters --- README.md | 2 ++ docs/usage.md | 4 ++++ lib/NfcoreTemplate.groovy | 12 ++++++++++++ lib/WorkflowMain.groovy | 3 +++ 4 files changed, 21 insertions(+) diff --git a/README.md b/README.md index 1a3cf37d..d1ed68dc 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,8 @@ A number of improvements were made to the pipeline recently, mainly with regard 4. Start running your own analysis! + > - Parameters passed via custom config files including the `-c` Nextflow option will be ignored. Please provide pipeline parameters via the `-params-file` Nextflow option instead; see [docs](https://nf-co.re/usage/configuration?q=params#custom-configuration-files). + - Typical command for Illumina shotgun analysis: ```bash diff --git a/docs/usage.md b/docs/usage.md index c6e12a8b..0df6ade3 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -4,6 +4,10 @@ > _Documentation of pipeline parameters is generated automatically from the pipeline schema and can no longer be found in markdown files._ +## Pipeline parameters + +Parameters passed via custom config files including the `-c` Nextflow option will be ignored. Please provide pipeline parameters via the `-params-file` Nextflow option instead; see [docs](https://nf-co.re/usage/configuration?q=params#custom-configuration-files). + ## Samplesheet format ### Illumina diff --git a/lib/NfcoreTemplate.groovy b/lib/NfcoreTemplate.groovy index f2becc53..c82b684f 100755 --- a/lib/NfcoreTemplate.groovy +++ b/lib/NfcoreTemplate.groovy @@ -32,6 +32,18 @@ class NfcoreTemplate { } } + // + // Warn if using custom configs to provide pipeline parameters + // + public static void warnParamsProvidedInConfig(workflow, log) { + if (workflow.configFiles.size() > 1) { + log.warn "[$workflow.manifest.name] Multiple config files detected!\n" + + "Parameters passed via custom config files including the '-c' Nextflow option will be ignored.\n" + + "Please provide pipeline parameters via the '-params-file' Nextflow option instead.\n" + + "Docs: https://nf-co.re/usage/configuration?q=params#custom-configuration-files\n" + } + } + // // Generate version string // diff --git a/lib/WorkflowMain.groovy b/lib/WorkflowMain.groovy index 7523b0b8..5b61534c 100755 --- a/lib/WorkflowMain.groovy +++ b/lib/WorkflowMain.groovy @@ -62,6 +62,9 @@ class WorkflowMain { // Print parameter summary log to screen log.info paramsSummaryLog(workflow, params, log) + // Warn about using custom configs to provide pipeline parameters + NfcoreTemplate.warnParamsProvidedInConfig(workflow, log) + // Validate workflow parameters via the JSON schema if (params.validate_params) { NfcoreSchema.validateParameters(workflow, params, log) From 61124b2546e45085f6a7e7b8ae473b944bce1d66 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Wed, 22 Mar 2023 22:11:15 +0000 Subject: [PATCH 3/7] Reword warning --- lib/NfcoreTemplate.groovy | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/NfcoreTemplate.groovy b/lib/NfcoreTemplate.groovy index c82b684f..1be7a1b4 100755 --- a/lib/NfcoreTemplate.groovy +++ b/lib/NfcoreTemplate.groovy @@ -37,10 +37,13 @@ class NfcoreTemplate { // public static void warnParamsProvidedInConfig(workflow, log) { if (workflow.configFiles.size() > 1) { - log.warn "[$workflow.manifest.name] Multiple config files detected!\n" + - "Parameters passed via custom config files including the '-c' Nextflow option will be ignored.\n" + - "Please provide pipeline parameters via the '-params-file' Nextflow option instead.\n" + - "Docs: https://nf-co.re/usage/configuration?q=params#custom-configuration-files\n" + log.warn "=============================================================================\n" + + " Multiple config files detected!\n" + + " Please provide pipeline parameters via the CLI or Nextflow '-params-file' option.\n" + + " Custom config files including those provided by the '-c' Nextflow option can be\n" + + " used to provide any configuration except for parameters.\n\n" + + " Docs: https://nf-co.re/usage/configuration#custom-configuration-files\n" + + "===================================================================================" } } From 99d388effa8fa5e657f6466db93988f2e8fd0ae4 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Wed, 22 Mar 2023 22:23:36 +0000 Subject: [PATCH 4/7] Update message in README and usage docs --- README.md | 2 +- docs/usage.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d1ed68dc..48916436 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ A number of improvements were made to the pipeline recently, mainly with regard 4. Start running your own analysis! - > - Parameters passed via custom config files including the `-c` Nextflow option will be ignored. Please provide pipeline parameters via the `-params-file` Nextflow option instead; see [docs](https://nf-co.re/usage/configuration?q=params#custom-configuration-files). + > - Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those provided by the `-c` Nextflow option can be used to provide any configuration except for parameters; see [docs](https://nf-co.re/usage/configuration#custom-configuration-files). - Typical command for Illumina shotgun analysis: diff --git a/docs/usage.md b/docs/usage.md index 0df6ade3..1f27af21 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -6,7 +6,7 @@ ## Pipeline parameters -Parameters passed via custom config files including the `-c` Nextflow option will be ignored. Please provide pipeline parameters via the `-params-file` Nextflow option instead; see [docs](https://nf-co.re/usage/configuration?q=params#custom-configuration-files). +Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those provided by the `-c` Nextflow option can be used to provide any configuration except for parameters; see [docs](https://nf-co.re/usage/configuration#custom-configuration-files). ## Samplesheet format From e765818a26471d720976cb197e582fb004d5dd1f Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Wed, 22 Mar 2023 22:31:44 +0000 Subject: [PATCH 5/7] Add main for consistency in subworkflow path --- workflows/illumina.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflows/illumina.nf b/workflows/illumina.nf index 6ff119a9..7e93cf36 100644 --- a/workflows/illumina.nf +++ b/workflows/illumina.nf @@ -97,7 +97,7 @@ include { MOSDEPTH as MOSDEPTH_AMPLICON } from '../modules/nf-core/mosdepth/main // SUBWORKFLOW: Consisting entirely of nf-core/modules // include { FASTQ_ALIGN_BOWTIE2 } from '../subworkflows/nf-core/fastq_align_bowtie2/main' -include { BAM_MARKDUPLICATES_PICARD } from '../subworkflows/nf-core/bam_markduplicates_picard' +include { BAM_MARKDUPLICATES_PICARD } from '../subworkflows/nf-core/bam_markduplicates_picard/main' /* ======================================================================================== From 8e84699b89f7638438178dcfe6cf8e611be52a9b Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Thu, 23 Mar 2023 09:47:39 +0000 Subject: [PATCH 6/7] Update lib/NfcoreTemplate.groovy Co-authored-by: James A. Fellows Yates --- lib/NfcoreTemplate.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/NfcoreTemplate.groovy b/lib/NfcoreTemplate.groovy index 1be7a1b4..5b0ec202 100755 --- a/lib/NfcoreTemplate.groovy +++ b/lib/NfcoreTemplate.groovy @@ -37,13 +37,13 @@ class NfcoreTemplate { // public static void warnParamsProvidedInConfig(workflow, log) { if (workflow.configFiles.size() > 1) { - log.warn "=============================================================================\n" + + log.warn "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + " Multiple config files detected!\n" + " Please provide pipeline parameters via the CLI or Nextflow '-params-file' option.\n" + " Custom config files including those provided by the '-c' Nextflow option can be\n" + " used to provide any configuration except for parameters.\n\n" + " Docs: https://nf-co.re/usage/configuration#custom-configuration-files\n" + - "===================================================================================" + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" } } From d2a93a43c808a7b46c0b286b348c3eb0622b331b Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Thu, 23 Mar 2023 10:10:04 +0000 Subject: [PATCH 7/7] Change = to ~ everywhere - thanks for opening Pandora's box @jfy133 --- CHANGELOG.md | 1 + conf/modules_illumina.config | 4 ++-- conf/modules_nanopore.config | 4 ++-- conf/test_full_nanopore.config | 4 ++-- conf/test_full_sispa.config | 4 ++-- conf/test_nanopore.config | 4 ++-- conf/test_sispa.config | 4 ++-- lib/NfcoreTemplate.groovy | 4 ++-- lib/Utils.groovy | 4 ++-- lib/WorkflowCommons.groovy | 12 ++++++------ lib/WorkflowIllumina.groovy | 8 ++++---- lib/WorkflowMain.groovy | 8 ++++---- workflows/illumina.nf | 28 ++++++++++++++-------------- workflows/nanopore.nf | 28 ++++++++++++++-------------- 14 files changed, 59 insertions(+), 58 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be37458c..3eea9f38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ Special thanks to the following for their code contributions to the release: - [Friederike Hanssen](https://github.com/FriederikeHanssen) - [Hugo Tavares](https://github.com/tavareshugo) +- [James Fellows Yates](https://github.com/jfy133) - [Jessica Wu](https://github.com/wutron) - [Matthew Wells](https://github.com/mattheww95) - [Maxime Garcia](https://github.com/maxulysse) diff --git a/conf/modules_illumina.config b/conf/modules_illumina.config index 01bad525..05424060 100644 --- a/conf/modules_illumina.config +++ b/conf/modules_illumina.config @@ -1,7 +1,7 @@ /* -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Config file for defining DSL2 per module options and publishing paths -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Available keys to override module options: ext.args = Additional arguments appended to command in module. ext.args2 = Second set of arguments appended to command in module (multi-tool modules). diff --git a/conf/modules_nanopore.config b/conf/modules_nanopore.config index b09a18fa..5a4a277f 100644 --- a/conf/modules_nanopore.config +++ b/conf/modules_nanopore.config @@ -1,7 +1,7 @@ /* -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Config file for defining DSL2 per module options and publishing paths -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Available keys to override module options: ext.args = Additional arguments appended to command in module. ext.args2 = Second set of arguments appended to command in module (multi-tool modules). diff --git a/conf/test_full_nanopore.config b/conf/test_full_nanopore.config index 1526128d..2536ea4b 100644 --- a/conf/test_full_nanopore.config +++ b/conf/test_full_nanopore.config @@ -1,7 +1,7 @@ /* -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Nextflow config file for running full-size tests -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Defines input files and everything required to run a full size pipeline test. Use as follows: diff --git a/conf/test_full_sispa.config b/conf/test_full_sispa.config index d0802f17..90bc0842 100644 --- a/conf/test_full_sispa.config +++ b/conf/test_full_sispa.config @@ -1,7 +1,7 @@ /* -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Nextflow config file for running full-size tests -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Defines input files and everything required to run a full size pipeline test. Use as follows: diff --git a/conf/test_nanopore.config b/conf/test_nanopore.config index f4835015..406c8c3e 100644 --- a/conf/test_nanopore.config +++ b/conf/test_nanopore.config @@ -1,7 +1,7 @@ /* -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Nextflow config file for running minimal tests -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Defines input files and everything required to run a fast and simple pipeline test. Use as follows: diff --git a/conf/test_sispa.config b/conf/test_sispa.config index a7201b68..d3e39be8 100644 --- a/conf/test_sispa.config +++ b/conf/test_sispa.config @@ -1,7 +1,7 @@ /* -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Nextflow config file for running minimal tests -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Defines input files and everything required to run a fast and simple pipeline test. Use as follows: diff --git a/lib/NfcoreTemplate.groovy b/lib/NfcoreTemplate.groovy index 1be7a1b4..08d2922c 100755 --- a/lib/NfcoreTemplate.groovy +++ b/lib/NfcoreTemplate.groovy @@ -37,13 +37,13 @@ class NfcoreTemplate { // public static void warnParamsProvidedInConfig(workflow, log) { if (workflow.configFiles.size() > 1) { - log.warn "=============================================================================\n" + + log.warn "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + " Multiple config files detected!\n" + " Please provide pipeline parameters via the CLI or Nextflow '-params-file' option.\n" + " Custom config files including those provided by the '-c' Nextflow option can be\n" + " used to provide any configuration except for parameters.\n\n" + " Docs: https://nf-co.re/usage/configuration#custom-configuration-files\n" + - "===================================================================================" + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" } } diff --git a/lib/Utils.groovy b/lib/Utils.groovy index 8d030f4e..fd6095c7 100644 --- a/lib/Utils.groovy +++ b/lib/Utils.groovy @@ -33,7 +33,7 @@ class Utils { } if (channels_missing | channel_priority_violation) { - log.warn "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + + log.warn "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + " There is a problem with your Conda configuration!\n\n" + " You will need to set-up the conda-forge and bioconda channels correctly.\n" + " Please refer to https://bioconda.github.io/\n" + @@ -41,7 +41,7 @@ class Utils { " ${channels}\n" + " but the following channel order is required:\n" + " ${required_channels_in_order}\n" + - "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" } } } diff --git a/lib/WorkflowCommons.groovy b/lib/WorkflowCommons.groovy index a56bb031..a1ec9776 100755 --- a/lib/WorkflowCommons.groovy +++ b/lib/WorkflowCommons.groovy @@ -9,11 +9,11 @@ class WorkflowCommons { // private static void genomeExistsError(params, log) { if (params.genomes && params.genome && !params.genomes.containsKey(params.genome)) { - log.error "=============================================================================\n" + + log.error "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + " Genome '${params.genome}' not found in any config files provided to the pipeline.\n" + " Currently, the available genome keys are:\n" + " ${params.genomes.keySet().join(", ")}\n" + - "=============================================================================" + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" System.exit(1) } } @@ -74,14 +74,14 @@ class WorkflowCommons { ) } if (total != (left + right)) { - log.warn "=============================================================================\n" + + log.warn "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + " Please check the name field (column 4) in the file supplied via --primer_bed.\n\n" + " All of the values in that column do not end with those supplied by:\n" + " --primer_left_suffix : $primer_left_suffix\n" + " --primer_right_suffix: $primer_right_suffix\n\n" + " This information is required to collapse the primer intervals into amplicons\n" + " for the coverage plots generated by the pipeline.\n" + - "===================================================================================" + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" } } @@ -121,13 +121,13 @@ class WorkflowCommons { def intersect = bed_contigs.intersect(fai_contigs) if (intersect.size() != bed_contigs.size()) { def diff = bed_contigs.minus(intersect).sort() - log.error "=============================================================================\n" + + log.error "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + " Contigs in primer BED file do not match those in the reference genome:\n\n" + " ${diff.join('\n ')}\n\n" + " Please check:\n" + " - Primer BED file supplied with --primer_bed\n" + " - Genome FASTA file supplied with --fasta\n" + - "=============================================================================" + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" System.exit(1) } } diff --git a/lib/WorkflowIllumina.groovy b/lib/WorkflowIllumina.groovy index 56b20612..f151b2e1 100755 --- a/lib/WorkflowIllumina.groovy +++ b/lib/WorkflowIllumina.groovy @@ -75,11 +75,11 @@ class WorkflowIllumina { if (line.contains('>')) { count++ if (count > 1) { - log.warn "=============================================================================\n" + + log.warn "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + " This pipeline does not officially support multi-fasta genome files!\n\n" + " The parameters and processes are tailored for viral genome analysis.\n" + " Please amend the '--fasta' parameter.\n" + - "===================================================================================" + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" break } } @@ -118,12 +118,12 @@ class WorkflowIllumina { if (name.contains(name_prefix)) { count++ if (count > 1) { - log.warn "=============================================================================\n" + + log.warn "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + " Found '${name_prefix}' in the name field of the primer BED file!\n" + " This suggests that you have used the SWIFT/SNAP protocol to prep your samples.\n" + " If so, please set '--ivar_trim_offset 5' as suggested in the issue below:\n" + " https://github.com/nf-core/viralrecon/issues/170\n" + - "===================================================================================" + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" break } } diff --git a/lib/WorkflowMain.groovy b/lib/WorkflowMain.groovy index 5b61534c..64147d3d 100755 --- a/lib/WorkflowMain.groovy +++ b/lib/WorkflowMain.groovy @@ -108,7 +108,7 @@ class WorkflowMain { " - https://github.com/nf-core/configs/blob/master/conf/pipeline/viralrecon/genomes.config\n\n" + " If you would still like to blame us please come and find us on nf-core Slack:\n" + " - https://nf-co.re/viralrecon#contributions-and-support\n" + - "=============================================================================" + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" if (params.genomes && params.genome && params.genomes.containsKey(params.genome)) { def genome_map = params.genomes[ params.genome ] if (primer_set) { @@ -120,7 +120,7 @@ class WorkflowMain { if (genome_map.containsKey(primer_set_version)) { genome_map = genome_map[ primer_set_version ] } else { - log.error "=============================================================================\n" + + log.error "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + " --primer_set_version '${primer_set_version}' not found!\n\n" + " Currently, the available primer set version keys are: ${genome_map.keySet().join(", ")}\n\n" + " Please check:\n" + @@ -131,7 +131,7 @@ class WorkflowMain { System.exit(1) } } else { - log.error "=============================================================================\n" + + log.error "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + " --primer_set '${primer_set}' not found!\n\n" + " Currently, the available primer set keys are: ${genome_map.keySet().join(", ")}\n\n" + " Please check:\n" + @@ -141,7 +141,7 @@ class WorkflowMain { System.exit(1) } } else { - log.error "=============================================================================\n" + + log.error "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + " Genome '${params.genome}' does not contain any primer sets!\n\n" + " Please check:\n" + " - The value provided to --genome (currently '${params.genome}')\n" + diff --git a/workflows/illumina.nf b/workflows/illumina.nf index 7e93cf36..7d44924f 100644 --- a/workflows/illumina.nf +++ b/workflows/illumina.nf @@ -1,7 +1,7 @@ /* -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ VALIDATE INPUTS -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ def valid_params = [ @@ -34,9 +34,9 @@ def variant_caller = params.variant_caller if (!variant_caller) { variant_caller = params.protocol == 'amplicon' ? 'ivar' : 'bcftools' } /* -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ CONFIG FILES -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ ch_multiqc_config = file("$projectDir/assets/multiqc_config_illumina.yml", checkIfExists: true) @@ -47,9 +47,9 @@ ch_blast_outfmt6_header = file("$projectDir/assets/headers/blast_outfmt6_hea ch_ivar_variants_header_mqc = file("$projectDir/assets/headers/ivar_variants_header_mqc.txt", checkIfExists: true) /* -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ IMPORT LOCAL MODULES/SUBWORKFLOWS -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ // @@ -77,9 +77,9 @@ include { BAM_TRIM_PRIMERS_IVAR } from '../subworkflows/local/bam_trim_primers include { FASTQ_TRIM_FASTP_FASTQC } from '../subworkflows/local/fastq_trim_fastp_fastqc' /* -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ IMPORT NF-CORE MODULES/SUBWORKFLOWS -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ // @@ -100,9 +100,9 @@ include { FASTQ_ALIGN_BOWTIE2 } from '../subworkflows/nf-core/fastq_align_ include { BAM_MARKDUPLICATES_PICARD } from '../subworkflows/nf-core/bam_markduplicates_picard/main' /* -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ RUN MAIN WORKFLOW -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ // Info required for completion email and summary @@ -645,9 +645,9 @@ workflow ILLUMINA { } /* -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ COMPLETION EMAIL AND SUMMARY -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ workflow.onComplete { @@ -658,7 +658,7 @@ workflow.onComplete { } /* -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ THE END -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ diff --git a/workflows/nanopore.nf b/workflows/nanopore.nf index 854335fd..69854472 100644 --- a/workflows/nanopore.nf +++ b/workflows/nanopore.nf @@ -1,7 +1,7 @@ /* -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ VALIDATE INPUTS -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ def valid_params = [ @@ -33,18 +33,18 @@ if (params.artic_minion_caller == 'medaka') { } /* -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ CONFIG FILES -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ ch_multiqc_config = file("$projectDir/assets/multiqc_config_nanopore.yml", checkIfExists: true) ch_multiqc_custom_config = params.multiqc_config ? file(params.multiqc_config) : [] /* -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ IMPORT LOCAL MODULES/SUBWORKFLOWS -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ // @@ -65,9 +65,9 @@ include { VARIANTS_LONG_TABLE } from '../subworkflows/local/variants_long_table' include { FILTER_BAM_SAMTOOLS } from '../subworkflows/local/filter_bam_samtools' /* -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ IMPORT NF-CORE MODULES/SUBWORKFLOWS -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ // @@ -88,9 +88,9 @@ include { MOSDEPTH as MOSDEPTH_GENOME } from '../modules/nf-core/mosdepth/main include { MOSDEPTH as MOSDEPTH_AMPLICON } from '../modules/nf-core/mosdepth/main' /* -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ RUN MAIN WORKFLOW -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ // Info required for completion email and summary @@ -537,9 +537,9 @@ workflow NANOPORE { } /* -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ COMPLETION EMAIL AND SUMMARY -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ workflow.onComplete { @@ -550,7 +550,7 @@ workflow.onComplete { } /* -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ THE END -======================================================================================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */