diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bae17c09..c457838b1 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` +- [#349](https://github.com/nf-core/eager/issues/349) - Added option enabling platypus formatted output of pmdtools misincorporation frequencies. + ### `Fixed` - [#707](https://github.com/nf-core/eager/pull/707) - Fix typo in UnifiedGenotyper IndelRealigner command diff --git a/Dockerfile b/Dockerfile index 80927331c..96c520150 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM nfcore/base:1.13.2 +FROM nfcore/base:1.13.3 LABEL authors="The nf-core/eager community" \ description="Docker image containing all software requirements for the nf-core/eager pipeline" diff --git a/main.nf b/main.nf index dc64f9240..a1c6e5f97 100644 --- a/main.nf +++ b/main.nf @@ -2042,14 +2042,15 @@ process pmdtools { snpcap = '' } def size = params.large_ref ? '-c' : '' + def platypus = params.pmdtools_platypus ? '--platypus' : '' """ #Run Filtering step - samtools calmd -b $bam $fasta | samtools view -h - | pmdtools --threshold ${params.pmdtools_threshold} $treatment $snpcap --header | samtools view -@ ${task.cpus} -Sb - > "${libraryid}".pmd.bam + samtools calmd -b ${bam} ${fasta} | samtools view -h - | pmdtools --threshold ${params.pmdtools_threshold} ${treatment} ${snpcap} --header | samtools view -@ ${task.cpus} -Sb - > "${libraryid}".pmd.bam #Run Calc Range step ## To allow early shut off of pipe: https://github.com/nextflow-io/nextflow/issues/1564 trap 'if [[ \$? == 141 ]]; then echo "Shutting samtools early due to -n parameter" && samtools index ${libraryid}.pmd.bam ${size}; exit 0; fi' EXIT - samtools calmd -b $bam $fasta | samtools view -h - | pmdtools --deamination --range ${params.pmdtools_range} $treatment $snpcap -n ${params.pmdtools_max_reads} > "${libraryid}".cpg.range."${params.pmdtools_range}".txt + samtools calmd -b ${bam} ${fasta} | samtools view -h - | pmdtools --deamination ${platypus} --range ${params.pmdtools_range} ${treatment} ${snpcap} -n ${params.pmdtools_max_reads} > "${libraryid}".cpg.range."${params.pmdtools_range}".txt echo "Running indexing" samtools index ${libraryid}.pmd.bam ${size} diff --git a/nextflow.config b/nextflow.config index 95fc6cb46..4374207d1 100644 --- a/nextflow.config +++ b/nextflow.config @@ -118,6 +118,7 @@ params { pmdtools_threshold = 3 pmdtools_reference_mask = '' pmdtools_max_reads = 10000 + pmdtools_platypus = false // mapDamage run_mapdamage_rescaling = false diff --git a/nextflow_schema.json b/nextflow_schema.json index bd9be42a4..90ef5b6e5 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -819,6 +819,12 @@ "fa_icon": "fas fa-greater-than-equal", "help_text": "The maximum number of reads used for damage assessment in PMDtools. Can be used to significantly reduce the amount of time required for damage assessment in PMDTools. Note that a too low value can also obtain incorrect results.\n\n> Modifies PMDTools parameter: `-n`" }, + "pmdtools_platypus": { + "type": "boolean", + "description": "Append big list of base frequencies for platypus to output.", + "fa_icon": "fas fa-power-off", + "help_text": "Enables the printing of a wider list of base frequencies used by platypus as an addition to the output base misincorporation frequency table. By default turned off.\n" + }, "run_mapdamage_rescaling": { "type": "boolean", "fa_icon": "fas fa-map",