Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring + other issues with cadd and samtools merge #538

Merged
merged 25 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
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
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### `Changed`

- Refactored config files [#538](https://github.com/nf-core/raredisease/pull/538)
- Refactored mobile element annotation subworkflow files [#538](https://github.com/nf-core/raredisease/pull/538)

### `Fixed`

- Include multiallelic indel sites in CADD scoring jobs [#545](https://github.com/nf-core/raredisease/pull/545)
- Fixed issues with samtools merge not being run on samples sequenced over multiple lanes [#538](https://github.com/nf-core/raredisease/pull/538)

### Parameters

Expand All @@ -24,6 +28,12 @@ Parameter has been added if just the new parameter information is present.
Parameter has been removed if new parameter information isn't present.
:::

## 2.0.1 - Asterix (Patch) [2024-03-25]

### `Fixed`

- Germlinecnvcaller subworkflow uses the output channel `casecalls` from germlinecnvcaller module instead of `calls` which was invalid. [#535](https://github.com/nf-core/raredisease/issues/535)

## 2.0.0 - Asterix [2024-03-18]

### `Added`
Expand Down
5 changes: 5 additions & 0 deletions conf/base.config
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,9 @@ process {
errorStrategy = 'retry'
maxRetries = 2
}
withName: 'NFCORE_RAREDISEASE:RAREDISEASE:.*' {
publishDir = [
enabled: false
]
}
}
45 changes: 18 additions & 27 deletions conf/modules/align.config
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,27 @@
*/

process{
withName: '.*ALIGN:.*' {

withName: '.*ALIGN:FASTP' {
ext.args = { [
params.min_trimmed_length ? "--length_required ${params.min_trimmed_length}" : '',
'--correction',
'--overrepresentation_analysis'
].join(' ').trim() }
publishDir = [
enabled: false
path: { "${params.outdir}/trimming" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

if (!params.skip_fastp) {
withName: '.*ALIGN:FASTP' {
ext.args = { [
params.min_trimmed_length ? "--length_required ${params.min_trimmed_length}" : '',
'--correction',
'--overrepresentation_analysis'
].join(' ').trim() }
publishDir = [
path: { "${params.outdir}/trimming" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}
}

if (params.save_mapped_as_cram) {
withName: '.*ALIGN:SAMTOOLS_VIEW' {
ext.args = { '--output-fmt cram --write-index' }
ext.prefix = { "${meta.id}_sorted_md" }
publishDir = [
path: { "${params.outdir}/alignment" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}
withName: '.*ALIGN:SAMTOOLS_VIEW' {
ext.args = { '--output-fmt cram --write-index' }
ext.prefix = { "${meta.id}_sorted_md" }
publishDir = [
path: { "${params.outdir}/alignment" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}
}
60 changes: 24 additions & 36 deletions conf/modules/align_MT.config
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,22 @@

process {

if (params.aligner.equals("bwamem2")) {
withName: '.*ALIGN_MT:BWAMEM2_MEM_MT' {
ext.args = { "-M -K 100000000 -R ${meta.read_group}" }
ext.when = { !(params.analysis_type.equals("wes")) }
ext.prefix = { "${meta.id}_sorted" }
}
withName: '.*ALIGN_MT:BWAMEM2_MEM_MT' {
ext.args = { "-M -K 100000000 -R ${meta.read_group}" }
ext.when = { !(params.analysis_type.equals("wes")) }
ext.prefix = { "${meta.id}_sorted" }
}

if (params.aligner.equals("bwa")) {
withName: '.*ALIGN_MT:BWA_MEM_MT' {
ext.args = { "-M -K 100000000 -R ${meta.read_group}" }
ext.when = { !(params.analysis_type.equals("wes")) }
ext.prefix = { "${meta.id}_sorted" }
}
withName: '.*ALIGN_MT:BWA_MEM_MT' {
ext.args = { "-M -K 100000000 -R ${meta.read_group}" }
ext.when = { !(params.analysis_type.equals("wes")) }
ext.prefix = { "${meta.id}_sorted" }
}

if (params.aligner.equals("sentieon")) {
withName: '.*ALIGN_MT:SENTIEON_BWAMEM_MT' {
ext.args = { "-M -K 10000000 -R ${meta.read_group}" }
ext.when = { !(params.analysis_type.equals("wes"))}
ext.prefix = { "${meta.id}_sorted" }
}
withName: '.*ALIGN_MT:SENTIEON_BWAMEM_MT' {
ext.args = { "-M -K 10000000 -R ${meta.read_group}" }
ext.when = { !(params.analysis_type.equals("wes"))}
ext.prefix = { "${meta.id}_sorted" }
}

withName: '.*ALIGN_MT:GATK4_MERGEBAMALIGNMENT_MT' {
Expand Down Expand Up @@ -74,28 +68,22 @@ process {

process {

if (params.aligner.equals("bwamem2")) {
withName: '.*ALIGN_MT_SHIFT:BWAMEM2_MEM_MT' {
ext.args = { "-M -K 100000000 -R ${meta.read_group}" }
ext.when = { !(params.analysis_type.equals("wes")) }
ext.prefix = { "${meta.id}_sorted_shifted" }
}
withName: '.*ALIGN_MT_SHIFT:BWAMEM2_MEM_MT' {
ext.args = { "-M -K 100000000 -R ${meta.read_group}" }
ext.when = { !(params.analysis_type.equals("wes")) }
ext.prefix = { "${meta.id}_sorted_shifted" }
}

if (params.aligner.equals("sentieon")) {
withName: '.*ALIGN_MT_SHIFT:SENTIEON_BWAMEM_MT' {
ext.args = { "-M -K 10000000 -R ${meta.read_group}" }
ext.when = { !(params.analysis_type.equals("wes"))}
ext.prefix = { "${meta.id}_sorted_shifted" }
}
withName: '.*ALIGN_MT_SHIFT:SENTIEON_BWAMEM_MT' {
ext.args = { "-M -K 10000000 -R ${meta.read_group}" }
ext.when = { !(params.analysis_type.equals("wes"))}
ext.prefix = { "${meta.id}_sorted_shifted" }
}

if (params.aligner.equals("bwa")) {
withName: '.*ALIGN_MT_SHIFT:BWA_MEM_MT' {
ext.args = { "-M -K 100000000 -R ${meta.read_group}" }
ext.when = { !(params.analysis_type.equals("wes")) }
ext.prefix = { "${meta.id}_sorted_shifted" }
}
withName: '.*ALIGN_MT_SHIFT:BWA_MEM_MT' {
ext.args = { "-M -K 100000000 -R ${meta.read_group}" }
ext.when = { !(params.analysis_type.equals("wes")) }
ext.prefix = { "${meta.id}_sorted_shifted" }
}

withName: '.*ALIGN_MT_SHIFT:GATK4_MERGEBAMALIGNMENT_MT' {
Expand Down
81 changes: 40 additions & 41 deletions conf/modules/align_bwa_bwamem2.config
Original file line number Diff line number Diff line change
Expand Up @@ -17,46 +17,45 @@

process {

if (params.aligner.equals("bwamem2") || params.aligner.equals("bwa")) {

withName: '.*ALIGN:ALIGN_BWA_BWAMEM2:BWAMEM2_MEM' {
ext.args = { "-M -K 100000000 -R ${meta.read_group}" }
ext.prefix = { "${meta.id}_sorted" }
ext.when = { params.aligner.equals("bwamem2") }
}

withName: '.*ALIGN:ALIGN_BWA_BWAMEM2:BWA_MEM' {
ext.args = { "-M -K 100000000 -R ${meta.read_group}" }
ext.prefix = { "${meta.id}_sorted" }
ext.when = { params.aligner.equals("bwa") }
}

withName: '.*ALIGN:ALIGN_BWA_BWAMEM2:SAMTOOLS_STATS' {
ext.args = '-s --remove-overlaps'
}

withName: '.*ALIGN:ALIGN_BWA_BWAMEM2:SAMTOOLS_MERGE' {
ext.prefix = { "${meta.id}_sorted_merged" }
}

withName: '.*ALIGN:ALIGN_BWA_BWAMEM2:MARKDUPLICATES' {
ext.args = "--TMP_DIR ."
ext.prefix = { "${meta.id}_sorted_md" }
publishDir = [
enabled: !params.save_mapped_as_cram,
path: { "${params.outdir}/alignment" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: '.*ALIGN:ALIGN_BWA_BWAMEM2:SAMTOOLS_INDEX_MARKDUP' {
publishDir = [
enabled: !params.save_mapped_as_cram,
path: { "${params.outdir}/alignment" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}
withName: '.*ALIGN:ALIGN_BWA_BWAMEM2:BWAMEM2_MEM' {
ext.args = { "-M -K 100000000 -R ${meta.read_group}" }
ext.args2 = { "-T ./samtools_sort_tmp" }
ext.prefix = { "${meta.id}_sorted" }
ext.when = { params.aligner.equals("bwamem2") }
}

withName: '.*ALIGN:ALIGN_BWA_BWAMEM2:BWA_MEM' {
ext.args = { "-M -K 100000000 -R ${meta.read_group}" }
ext.args2 = { "-T ./samtools_sort_tmp" }
ext.prefix = { "${meta.id}_sorted" }
ext.when = { params.aligner.equals("bwa") }
}

withName: '.*ALIGN:ALIGN_BWA_BWAMEM2:SAMTOOLS_STATS' {
ext.args = '-s --remove-overlaps'
}

withName: '.*ALIGN:ALIGN_BWA_BWAMEM2:SAMTOOLS_MERGE' {
ext.prefix = { "${meta.id}_sorted_merged" }
}

withName: '.*ALIGN:ALIGN_BWA_BWAMEM2:MARKDUPLICATES' {
ext.args = "--TMP_DIR ."
ext.prefix = { "${meta.id}_sorted_md" }
publishDir = [
enabled: !params.save_mapped_as_cram,
path: { "${params.outdir}/alignment" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: '.*ALIGN:ALIGN_BWA_BWAMEM2:SAMTOOLS_INDEX_MARKDUP' {
publishDir = [
enabled: !params.save_mapped_as_cram,
path: { "${params.outdir}/alignment" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}
}
42 changes: 20 additions & 22 deletions conf/modules/align_sentieon.config
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,28 @@

process {

if (params.aligner.equals("sentieon")) {
withName: '.*ALIGN:ALIGN_SENTIEON:SENTIEON_BWAMEM' {
ext.args = { "-M -K 10000000 -R ${meta.read_group} " }
ext.prefix = { "${meta.id}.sorted" }
}
withName: '.*ALIGN:ALIGN_SENTIEON:SENTIEON_BWAMEM' {
ext.args = { "-M -K 10000000 -R ${meta.read_group} " }
ext.prefix = { "${meta.id}.sorted" }
}

withName: '.*ALIGN:ALIGN_SENTIEON:SENTIEON_DATAMETRICS' {
ext.prefix = { "${meta.id}_datametrics" }
}
withName: '.*ALIGN:ALIGN_SENTIEON:SENTIEON_DATAMETRICS' {
ext.prefix = { "${meta.id}_datametrics" }
}

withName: '.*ALIGN:ALIGN_SENTIEON:SENTIEON_READWRITER' {
ext.prefix = { "${meta.id}_merged" }
}
withName: '.*ALIGN:ALIGN_SENTIEON:SENTIEON_READWRITER' {
ext.prefix = { "${meta.id}_merged" }
}

withName: '.*ALIGN:ALIGN_SENTIEON:SENTIEON_DEDUP' {
ext.args = { $params.rmdup ? "--rmdup" : '' }
ext.prefix = { "${meta.id}_dedup" }
ext.suffix = ".bam"
publishDir = [
enabled: !params.save_mapped_as_cram,
path: { "${params.outdir}/alignment" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}
withName: '.*ALIGN:ALIGN_SENTIEON:SENTIEON_DEDUP' {
ext.args = { $params.rmdup ? "--rmdup" : '' }
ext.prefix = { "${meta.id}_dedup" }
ext.suffix = ".bam"
publishDir = [
enabled: !params.save_mapped_as_cram,
path: { "${params.outdir}/alignment" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}
}
Loading