Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### `Added`

- [#933](https://github.com/nf-core/eager/issues/933) Added support for customising --seq-length in mapDamage rescaling (♥ to @ashildv for requesting)

### `Fixed`

- Changed endors.py license from GPL to MIT (by @aidaanva)
- Removed erroneous R2 in single-end example in input TSV of usage docs (by @aidaanva)
- [#928](https://github.com/nf-core/eager/issues/928) Fixed read group incompatibility by re-adding picard AddOrReplaceReadGroups for MultiVCFAnalyzer (♥ to @aidaanva, @meganemichel for reporting)
- Fixed edge case of DamageProfiler occasionally requiring FASTA index (♥ to @asmaa-a-abdelwahab for reporting)
- [#934](https://github.com/nf-core/eager/issues/934) Fixed broken parameter setting in mapDamage2 rescale length (♥ to @ashildv for reporting)

Comment thread
jfy133 marked this conversation as resolved.
### `Dependencies`

Expand Down
4 changes: 3 additions & 1 deletion main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2129,8 +2129,10 @@ process mapdamage_rescaling {
def base = "${bam.baseName}"
def singlestranded = strandedness == "single" ? '--single-stranded' : ''
def size = params.large_ref ? '-c' : ''
def rescale_length_3p = params.rescale_length_3p != 0 ? "--rescale-length-3p=${params.rescale_length_3p}" : ""
def rescale_length_5p = params.rescale_length_5p != 0 ? "--rescale-length-5p=${params.rescale_length_5p}" : ""
"""
mapDamage -i ${bam} -r ${fasta} --rescale --rescale-out ${base}_rescaled.bam --rescale-length-5p ${params.rescale_length_5p} --rescale-length-3p=${params.rescale_length_3p} ${singlestranded}
mapDamage -i ${bam} -r ${fasta} --rescale --rescale-out="${base}_rescaled.bam" --seq-length=${params.rescale_seqlength} ${rescale_length_5p} ${rescale_length_3p} ${singlestranded}
samtools index ${base}_rescaled.bam ${size}
"""

Expand Down
5 changes: 3 additions & 2 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,9 @@ params {

// mapDamage
run_mapdamage_rescaling = false
rescale_length_5p = 12
rescale_length_3p = 12
rescale_length_5p = 0
rescale_length_3p = 0
rescale_seqlength = 12

//Bedtools settings
run_bedtools_coverage = false
Expand Down
17 changes: 12 additions & 5 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -914,18 +914,25 @@
"description": "Turn on damage rescaling of BAM files using mapDamage2 to probabilistically remove damage.",
"help_text": "Turns on mapDamage2's BAM rescaling functionality. This probablistically replaces Ts back to Cs depending on the likelihood this reference-mismatch was originally caused by damage. If the library is specified to be single stranded, this will automatically use the `--single-stranded` mode.\n\nThis functionality does not have any MultiQC output.\n\n:warning: rescaled libraries will not be merged with non-scaled libraries of the same sample for downstream genotyping, as the model may be different for each library. If you wish to merge these, please do this manually and re-run nf-core/eager using the merged BAMs as input. \n\n> Modifies the `--rescale` parameter of mapDamage2"
},
"rescale_length_5p": {
"rescale_seqlength": {
"type": "integer",
"default": 12,
"fa_icon": "fas fa-ruler-horizontal",
"description": "Length of read sequence to use from each side for rescaling. Can be overridden by --rescale_length_*p.",
"help_text": "Specify the length from the end of the read that mapDamage should rescale at both ends.\n\n> Modifies the `--seq-length` parameter of mapDamage2."
},
"rescale_length_5p": {
"type": "integer",
"default": 0,
"fa_icon": "fas fa-balance-scale-right",
"description": "Length of read for mapDamage2 to rescale from 5p end.",
"help_text": "Specify the length from the end of the read that mapDamage should rescale.\n\n> Modifies the `--rescale-length-5p` parameter of mapDamage2."
"description": "Length of read for mapDamage2 to rescale from 5p end. Only used if not 0 otherwise --rescale_seqlength used.",
"help_text": "Specify the length from the end of the read that mapDamage should rescale. Overrides `--rescale_seqlength`.\n\n> Modifies the `--rescale-length-5p` parameter of mapDamage2."
},
"rescale_length_3p": {
"type": "integer",
"default": 12,
"default": 0,
"fa_icon": "fas fa-balance-scale-left",
"description": "Length of read for mapDamage2 to rescale from 3p end.",
"description": "Length of read for mapDamage2 to rescale from 3p end. Only used if not 0 otherwise --rescale_seqlength used..",
"help_text": "Specify the length from the end of the read that mapDamage should rescale.\n\n> Modifies the `--rescale-length-3p` parameter of mapDamage2."
}
},
Expand Down