From a57488007751868ee149c2fe1d66081abb22bb08 Mon Sep 17 00:00:00 2001 From: Biowilko Date: Tue, 3 Sep 2024 18:22:44 +0100 Subject: [PATCH] Enable depth normalisation and fix bcftools bug --- modules/illumina.nf | 6 +++--- nextflow.config | 2 +- nextflow_schema.json | 6 ++++++ workflows/illuminaMpxv.nf | 12 ++++++------ 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/modules/illumina.nf b/modules/illumina.nf index 2bf4faa..ba702a3 100644 --- a/modules/illumina.nf +++ b/modules/illumina.nf @@ -29,9 +29,9 @@ process normalizeDepth { label 'process_low' - container 'community.wave.seqera.io/library/bbmap:39.06--5b971f29ed092959' + container 'docker.io/bryce911/bbtools:39.08' - conda 'bioconda::bbmap=39.06' + conda 'bioconda::bbmap=39.08' publishDir "${params.outdir}/${task.process.replaceAll(":","_")}", pattern: '*_norm_R{1,2}.fq.gz', mode: 'copy' @@ -270,7 +270,7 @@ process callConsensusFreebayes { CTG_NAME=\$(head -n1 ${ref} | sed 's/>//') # apply remaninng variants, including indels - bcftools consensus -f ${sampleName}.ambiguous.fa -m ${sampleName}.mask.txt ${sampleName}.fixed.norm.vcf.gz | sed s/\$CTG_NAME/${sampleName}/ > ${sampleName}.consensus.fa + bcftools consensus -s - -f ${sampleName}.ambiguous.fa -m ${sampleName}.mask.txt ${sampleName}.fixed.norm.vcf.gz | sed s/\$CTG_NAME/${sampleName}/ > ${sampleName}.consensus.fa """ } diff --git a/nextflow.config b/nextflow.config index 5a9046e..d1a9373 100644 --- a/nextflow.config +++ b/nextflow.config @@ -5,7 +5,7 @@ manifest { description = 'Epi2me compatible Nextflow pipeline for processing ARTIC tiling amplicon Illumina sequencing reads from monkeypox virus (MPXV) samples.' mainScript = 'main.nf' nextflowVersion = '>=20.01.0' - version = '1.0.11' + version = '1.0.12' } // Load base.config by default for all pipelines diff --git a/nextflow_schema.json b/nextflow_schema.json index 97ca62c..4aaa5ee 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -124,6 +124,12 @@ "title": "Variant caller minimum depth", "default": 10, "description": "Minimum coverage depth to call variant" + }, + "skip_normalize_depth": { + "type": "boolean", + "title": "Skip depth normalization", + "default": false, + "description": "Skip depth normalization, this will make the pipeline slower." } } }, diff --git a/workflows/illuminaMpxv.nf b/workflows/illuminaMpxv.nf index 1ea7129..0fadda8 100644 --- a/workflows/illuminaMpxv.nf +++ b/workflows/illuminaMpxv.nf @@ -69,13 +69,13 @@ workflow sequenceAnalysis { main: - // if (!params.skip_normalize_depth) { - // ch_reads_to_hostfilter = normalizeDepth(ch_filePairs) - // } else { - // ch_reads_to_hostfilter = ch_filePairs - // } + if (!params.skip_normalize_depth) { + ch_reads_to_hostfilter = normalizeDepth(ch_filePairs) + } else { + ch_reads_to_hostfilter = ch_filePairs + } - performHostFilter(ch_filePairs) + performHostFilter(ch_reads_to_hostfilter) readTrimming(performHostFilter.out.fastqPairs)