From af37f1c69bcd3647fbd69deeff8ba3aef7457833 Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Wed, 12 May 2021 10:14:32 +0200 Subject: [PATCH 1/2] Add reporting of location of multiqc run report on completeion --- CHANGELOG.md | 2 ++ main.nf | 1 + 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e68441280..9e073ac3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### `Added` +- [https://github.com/nf-core/eager/issues/736] - Add printing of multiqc run report location on successful completion + ### `Fixed` ### `Dependencies` diff --git a/main.nf b/main.nf index 3473973ba..9745ed085 100644 --- a/main.nf +++ b/main.nf @@ -3128,6 +3128,7 @@ workflow.onComplete { if (workflow.success) { log.info "-${c_purple}[nf-core/eager]${c_green} Pipeline completed successfully${c_reset}-" + log.info "-${c_purple}[nf-core/eager]${c_green} MultiQC run report can be found in ${params.outdir}/multiqc ${c_reset}-" } else { checkHostname() log.info "-${c_purple}[nf-core/eager]${c_red} Pipeline completed with errors${c_reset}-" From 08dc6abd9db8d7edeade728f274804716eb7343d Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Wed, 12 May 2021 10:30:42 +0200 Subject: [PATCH 2/2] Add bwa -o parameter as modifying is recommend for aDNA data according to latest simulation studies --- CHANGELOG.md | 2 ++ main.nf | 8 ++++---- nextflow.config | 1 + nextflow_schema.json | 7 +++++++ 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e68441280..994c38740 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## v2.3.5dev - [date] +- [#722](https://github.com/nf-core/eager/issues/722) - Adds bwa `-o` flag for more flexibility in bwa parameters + ### `Added` ### `Fixed` diff --git a/main.nf b/main.nf index 3473973ba..e6d0ba5e4 100644 --- a/main.nf +++ b/main.nf @@ -1160,15 +1160,15 @@ process bwa { //PE data without merging, PE data without any AR applied if ( seqtype == 'PE' && ( params.skip_collapse || params.skip_adapterremoval ) ){ """ - bwa aln -t ${task.cpus} $fasta ${r1} -n ${params.bwaalnn} -l ${params.bwaalnl} -k ${params.bwaalnk} -f ${libraryid}.r1.sai - bwa aln -t ${task.cpus} $fasta ${r2} -n ${params.bwaalnn} -l ${params.bwaalnl} -k ${params.bwaalnk} -f ${libraryid}.r2.sai + bwa aln -t ${task.cpus} $fasta ${r1} -n ${params.bwaalnn} -l ${params.bwaalnl} -k ${params.bwaalnk} -o ${params.bwaalno} -f ${libraryid}.r1.sai + bwa aln -t ${task.cpus} $fasta ${r2} -n ${params.bwaalnn} -l ${params.bwaalnl} -k ${params.bwaalnk} -o ${params.bwaalno} -f ${libraryid}.r2.sai bwa sampe -r "@RG\\tID:ILLUMINA-${libraryid}\\tSM:${libraryid}\\tPL:illumina\\tPU:ILLUMINA-${libraryid}-${seqtype}" $fasta ${libraryid}.r1.sai ${libraryid}.r2.sai ${r1} ${r2} | samtools sort -@ ${task.cpus} -O bam - > ${libraryid}_"${seqtype}".mapped.bam samtools index "${libraryid}"_"${seqtype}".mapped.bam ${size} """ } else { - //PE collapsed, or SE data + //PE collapsed, or SE data """ - bwa aln -t ${task.cpus} ${fasta} ${r1} -n ${params.bwaalnn} -l ${params.bwaalnl} -k ${params.bwaalnk} -f ${libraryid}.sai + bwa aln -t ${task.cpus} ${fasta} ${r1} -n ${params.bwaalnn} -l ${params.bwaalnl} -k ${params.bwaalnk} -o ${params.bwaalno} -f ${libraryid}.sai bwa samse -r "@RG\\tID:ILLUMINA-${libraryid}\\tSM:${libraryid}\\tPL:illumina\\tPU:ILLUMINA-${libraryid}-${seqtype}" $fasta ${libraryid}.sai $r1 | samtools sort -@ ${task.cpus} -O bam - > "${libraryid}"_"${seqtype}".mapped.bam samtools index "${libraryid}"_"${seqtype}".mapped.bam ${size} """ diff --git a/nextflow.config b/nextflow.config index 40d3bb6c3..44786a02f 100644 --- a/nextflow.config +++ b/nextflow.config @@ -80,6 +80,7 @@ params { bwaalnn = 0.04 bwaalnk = 2 bwaalnl = 1024 // From Schubert et al. 2012 (10.1186/1471-2164-13-178) + bwaalno = 1 // leave at bwa default for now circularextension = 500 circulartarget = 'MT' circularfilter = false diff --git a/nextflow_schema.json b/nextflow_schema.json index 3c05bdc51..a33f5455c 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -562,6 +562,13 @@ "fa_icon": "fas fa-ruler-horizontal", "help_text": "Configures the length of the seed used in `bwa aln -l`. Default is set to be 'turned off' at the recommendation of Schubert et al. ([2012 _BMC Genomics_](https://doi.org/10.1186/1471-2164-13-178)) for ancient DNA with `1024`.\n\nNote: Despite being recommended, turning off seeding can result in long runtimes!\n\n> Modifies BWA aln parameter: `-l`\n" }, + "bwaalno": { + "type": "integer", + "default": 1, + "fa_icon": "fas fa-people-arrows", + "description": "Specify the -o parameter for BWA aln i.e. the number of gaps allowed.", + "help_text": "Configures the number of gaps used in `bwa aln`. Default is set to `bwa` default.\n\n> Modifies BWA aln parameter: `-o`\n" + }, "circularextension": { "type": "integer", "default": 500,