Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ 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 (♥ to @aidaanva for fixing)
Expand All @@ -15,6 +17,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed edge case of DamageProfiler occasionally requiring FASTA index (♥ to @asmaa-a-abdelwahab for reporting)
- [#834](https://github.com/nf-core/eager/issues/834) Increased significance values in general stats table for Qualimap mean/median coverages (♥ to @neija2611 for reporting)
- Fixed parameter documentation for `--snpcapture_bed` regarding on-target SNP stats to state these stats currently not displayed in MultiQC only in the Qualimap results (♥ to @meganemichel and @TCLamnidis 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: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ COPY environment.yml /
RUN conda env create --quiet -f /environment.yml && conda clean -a

# Add conda installation dir to PATH (instead of doing 'conda activate')
ENV PATH /opt/conda/envs/nf-core-eager-2.4.5dev/bin:$PATH
ENV PATH /opt/conda/envs/nf-core-eager-2.4.6dev/bin:$PATH

# Dump the details of the installed packages to a file for posterity
RUN conda env export --name nf-core-eager-2.4.5dev > nf-core-eager-2.4.5dev.yml
RUN conda env export --name nf-core-eager-2.4.6dev > nf-core-eager-2.4.6dev.yml
4 changes: 2 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# You can use this file to create a conda environment for this pipeline:
# conda env create -f environment.yml
name: nf-core-eager-2.4.5dev
name: nf-core-eager-2.4.6dev
channels:
- conda-forge
- bioconda
Expand Down Expand Up @@ -50,4 +50,4 @@ dependencies:
- bioconda::eigenstratdatabasetools=1.0.2
- bioconda::mapdamage2=2.2.1
- bioconda::bbmap=38.92
- bioconda::bcftools=1.12
- bioconda::bcftools=1.12
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
7 changes: 4 additions & 3 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 Expand Up @@ -414,7 +415,7 @@ manifest {
description = 'A fully reproducible and state-of-the-art ancient DNA analysis pipeline'
mainScript = 'main.nf'
nextflowVersion = '>=20.07.1'
version = '2.4.5dev'
version = '2.4.6dev'
}

// Function to ensure that resource requirements don't go beyond
Expand Down
27 changes: 17 additions & 10 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -877,20 +877,27 @@
"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-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."
"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. 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,
"fa_icon": "fas fa-balance-scale-left",
"description": "Length of read for mapDamage2 to rescale from 3p end.",
"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."
}
"type": "integer",
"default": 0,
"fa_icon": "fas fa-balance-scale-left",
"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."
}
},
"fa_icon": "fas fa-chart-line",
"help_text": "More documentation can be seen in the follow links for:\n\n- [DamageProfiler](https://github.com/Integrative-Transcriptomics/DamageProfiler)\n- [PMDTools documentation](https://github.com/pontussk/PMDtools)\n\nIf using TSV input, DamageProfiler is performed per library, i.e. after lane\nmerging. PMDtools and BAM Trimming is run after library merging of same-named\nlibrary BAMs that have the same type of UDG treatment. BAM Trimming is only\nperformed on non-UDG and half-UDG treated data.\n"
Expand Down