Skip to content

Commit 552d35b

Browse files
authored
Merge pull request #708 from nf-core/pmdtools-extension
Pmdtools extension
2 parents 6532e74 + f374ed2 commit 552d35b

4 files changed

Lines changed: 12 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
### `Added`
99

10+
- [#349](https://github.com/nf-core/eager/issues/349) - Added option enabling platypus formatted output of pmdtools misincorporation frequencies.
11+
1012
### `Fixed`
1113

1214
- [#707](https://github.com/nf-core/eager/pull/707) - Fix typo in UnifiedGenotyper IndelRealigner command

main.nf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2042,14 +2042,15 @@ process pmdtools {
20422042
snpcap = ''
20432043
}
20442044
def size = params.large_ref ? '-c' : ''
2045+
def platypus = params.pmdtools_platypus ? '--platypus' : ''
20452046
"""
20462047
#Run Filtering step
2047-
samtools calmd -b $bam $fasta | samtools view -h - | pmdtools --threshold ${params.pmdtools_threshold} $treatment $snpcap --header | samtools view -@ ${task.cpus} -Sb - > "${libraryid}".pmd.bam
2048+
samtools calmd -b ${bam} ${fasta} | samtools view -h - | pmdtools --threshold ${params.pmdtools_threshold} ${treatment} ${snpcap} --header | samtools view -@ ${task.cpus} -Sb - > "${libraryid}".pmd.bam
20482049
20492050
#Run Calc Range step
20502051
## To allow early shut off of pipe: https://github.com/nextflow-io/nextflow/issues/1564
20512052
trap 'if [[ \$? == 141 ]]; then echo "Shutting samtools early due to -n parameter" && samtools index ${libraryid}.pmd.bam ${size}; exit 0; fi' EXIT
2052-
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
2053+
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
20532054
20542055
echo "Running indexing"
20552056
samtools index ${libraryid}.pmd.bam ${size}

nextflow.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ params {
118118
pmdtools_threshold = 3
119119
pmdtools_reference_mask = ''
120120
pmdtools_max_reads = 10000
121+
pmdtools_platypus = false
121122

122123
// mapDamage
123124
run_mapdamage_rescaling = false

nextflow_schema.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,12 @@
813813
"fa_icon": "fas fa-greater-than-equal",
814814
"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`"
815815
},
816+
"pmdtools_platypus": {
817+
"type": "boolean",
818+
"description": "Append big list of base frequencies for platypus to output.",
819+
"fa_icon": "fas fa-power-off",
820+
"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"
821+
},
816822
"run_mapdamage_rescaling": {
817823
"type": "boolean",
818824
"fa_icon": "fas fa-map",

0 commit comments

Comments
 (0)