Skip to content

Commit bc4bebe

Browse files
authored
Merge branch 'dev' into full-tests
2 parents bae2431 + 019fc68 commit bc4bebe

47 files changed

Lines changed: 1090 additions & 1216 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
- "strelkabp"
5757
- "targeted"
5858
- "tiddit"
59+
- "trimming"
5960
- "tumor_normal_pair"
6061
- "variantcalling_channel"
6162

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3131
- [#576](https://github.com/nf-core/sarek/pull/576) - Add modules and subworkflows for `cnvkit` germline mode
3232
- [#582](https://github.com/nf-core/sarek/pull/582) - Added option `--vep_out_format` for setting the format of the output-file from VEP to `json`, `tab` or `vcf` (default)
3333
- [#594](https://github.com/nf-core/sarek/pull/594) - Add parameter `--save_output_as_bam` to allow output of result files in BAM format
34-
- [#600](https://github.com/nf-core/sarek/pull/600) - Added description for UMI related params in schema
3534
- [#597](https://github.com/nf-core/sarek/pull/597) - Added tiddit for tumor variant calling
35+
- [#600](https://github.com/nf-core/sarek/pull/600) - Added description for UMI related params in schema
3636
- [#604](https://github.com/nf-core/sarek/pull/604) - Added full size tests WGS 30x NA12878
3737

3838
### Changed
@@ -70,6 +70,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7070
- [#581](https://github.com/nf-core/sarek/pull/581) - `TIDDIT` is updated to `3.1.0`
7171
- [#593](https://github.com/nf-core/sarek/pull/593) - update `ensembl-vep` cache version and module
7272
- [#600](https://github.com/nf-core/sarek/pull/600) - Remove `TODO` in awsfulltest
73+
- [#608](https://github.com/nf-core/sarek/pull/608) - Prevent candidate VCFs from getting published in manta
7374

7475
### Fixed
7576

assets/multiqc_config.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ export_plots: true
1818
run_modules:
1919
- custom_content
2020
- fastqc
21-
- cutadapt
21+
- fastp
2222
- picard
2323
- samtools
24-
- qualimap
24+
- mosdepth
2525
- gatk
2626
- bcftools
2727
- vcftools
@@ -33,19 +33,15 @@ module_order:
3333
name: "FastQC (raw)"
3434
path_filters_exclude:
3535
- "*_val_*.zip"
36-
- cutadapt:
37-
name: "Cutadapt"
38-
- fastqc:
39-
name: "FastQC (trimmed)"
40-
path_filters:
41-
- "*_val_*.zip"
36+
- fastp:
37+
name: "FastP (Read preprocessing)"
4238
- picard:
4339
name: "GATK4 MarkDuplicates"
4440
info: " metrics generated either by GATK4 MarkDuplicates or EstimateLibraryComplexity (with --use_gatk_spark)."
4541
- samtools:
4642
name: "Samtools Flagstat"
47-
- qualimap:
48-
name: "Qualimap"
43+
- mosdepth:
44+
name: "Mosdepth"
4945
- gatk:
5046
name: "GATK4 BQSR"
5147
- bcftools:

conf/modules.config

Lines changed: 49 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -193,23 +193,29 @@ process {
193193
}
194194

195195
// TRIMMING
196-
withName: 'TRIMGALORE' {
197-
ext.args = '--fastqc'
198-
publishDir = [
199-
[
200-
path: { "${params.outdir}/reports/trimgalore/${meta.id}/fastqc" },
201-
mode: params.publish_dir_mode,
202-
pattern: "*{html,zip}"
203-
],
196+
197+
withName: FASTP {
198+
ext.args = [ "",
199+
params.trim_fastq ?: "--disable_adapter_trimming",
200+
params.clip_r1 > 0 ? "--trim_front1 ${params.clip_r1}" : "", // Remove bp from the 5' end of read 1.
201+
params.three_prime_clip_r1 > 0 ? "--trim_tail1 ${params.three_prime_clip_r1}" : "", // Remove bp from the 3' end of read 1 AFTER adapter/quality trimming has been performed.
202+
params.clip_r2 > 0 ? "--trim_front2 ${params.clip_r2}" : "", //Remove bp from the 5' end of read 2.
203+
params.three_prime_clip_r2 > 0 ? "--trim_tail2 ${params.three_prime_clip_r2}" : "", // Remove bp from the 3' end of read 2 AFTER adapter/quality trimming has been performed.
204+
params.trim_nextseq ? "--trim_poly_g" : "", // Apply the --nextseq=X option, to trim based on quality after removing poly-G tails.
205+
params.split_fastq > 0 ? "--split_by_lines ${params.split_fastq * 4}" : "",
206+
207+
].join(" ").trim()
208+
publishDir = [
204209
[
205-
path: { "${params.outdir}/trimgalore/${meta.id}" },
210+
path: { "${params.outdir}/reports/fastp/${meta.sample}" },
206211
mode: params.publish_dir_mode,
207-
pattern: "*fq.gz"
212+
pattern: "*.{html,json,log}"
208213
],
209214
[
210-
path: { "${params.outdir}/reports/trimgalore/${meta.id}" },
215+
enabled: params.save_trimmed || params.save_split_fastqs,
216+
path: { "${params.outdir}/preprocessing/${meta.sample}/fastp" },
211217
mode: params.publish_dir_mode,
212-
pattern: "*txt"
218+
pattern: "*.fastp.fastq.gz"
213219
]
214220
]
215221
}
@@ -239,19 +245,6 @@ process {
239245
ext.prefix = {"${meta.id}_unsorted_tagged"}
240246
}
241247

242-
// SPLIT FASTQ
243-
244-
withName: 'SEQKIT_SPLIT2' {
245-
ext.args = { "--by-size ${params.split_fastq}" }
246-
ext.when = { params.split_fastq > 1 }
247-
publishDir = [
248-
enabled: params.save_split_fastqs,
249-
mode: params.publish_dir_mode,
250-
path: { "${params.outdir}/preprocessing/${meta.sample}/seqkit" },
251-
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
252-
]
253-
}
254-
255248
// MAPPING
256249
if (params.step == 'mapping') {
257250
withName: ".*GATK4_MAPPING:BWAMEM1_MEM" {
@@ -272,12 +265,12 @@ process {
272265
// However if it's skipped, reads need to be coordinate-sorted
273266
// Only name sort if Spark for Markduplicates + duplicate marking is not skipped
274267
ext.args2 = { params.use_gatk_spark && params.use_gatk_spark.contains('markduplicates') && (!params.skip_tools || (params.skip_tools && !params.skip_tools.contains('markduplicates'))) ? '-n' : '' }
275-
ext.prefix = { params.split_fastq > 1 ? "${meta.id}".concat('.').concat(reads.get(0).name.findAll(/part_([0-9]+)?/).last()) : "" }
268+
ext.prefix = { params.split_fastq > 1 ? "${meta.id}".concat('.').concat(reads.get(0).name.tokenize('.')[0]) : "" }
276269
publishDir = [
277270
mode: params.publish_dir_mode,
278-
path: { "${params.outdir}/preprocessing/${meta.id}/" },
271+
path: { "${params.outdir}/preprocessing/" },
279272
pattern: "*bam",
280-
saveAs: { (params.save_bam_mapped || (params.skip_tools && params.skip_tools.contains('markduplicates'))) && (meta.size * meta.numLanes == 1) ? "mapped/${it}" : null }
273+
saveAs: { (params.save_bam_mapped || (params.skip_tools && params.skip_tools.contains('markduplicates'))) && (meta.size * meta.numLanes == 1) ? "${meta.id}/mapped/${it}" : null }
281274
]
282275
}
283276

@@ -479,28 +472,18 @@ process {
479472
]
480473
}
481474

482-
withName: 'DEEPTOOLS_BAMCOVERAGE' {
483-
ext.when = { !(params.skip_tools && params.skip_tools.contains('deeptools')) }
484-
publishDir = [
485-
mode: params.publish_dir_mode,
486-
path: { "${params.outdir}/reports/deeptools/${meta.id}" },
487-
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
488-
]
489-
}
490-
491-
withName: 'QUALIMAP_BAMQCCRAM' {
492-
ext.args = '--paint-chromosome-limits --genome-gc-distr HUMAN -skip-duplicated --skip-dup-mode 0 -outformat HTML'
475+
withName: 'MOSDEPTH' {
476+
ext.args = { !params.wes ? "-n --fast-mode --by 500" : ""}
493477
ext.prefix = { "${meta.id}.mapped" }
494-
ext.when = { !(params.skip_tools && params.skip_tools.contains('bamqc')) }
495-
publishDir = [
478+
publishDir = [
496479
mode: params.publish_dir_mode,
497-
path: { "${params.outdir}/reports/qualimap/${meta.id}" },
498-
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
480+
path: { "${params.outdir}/reports/mosdepth/${meta.id}" },
481+
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
499482
]
500483
}
501484

502485
if (params.step == 'mapping' || params.step == 'markduplicates'|| params.step == 'prepare_recalibration'|| params.step == 'recalibrate') {
503-
withName: 'NFCORE_SAREK:SAREK:CRAM_QC:QUALIMAP_BAMQCCRAM' {
486+
withName: 'NFCORE_SAREK:SAREK:CRAM_QC:MOSDEPTH' {
504487
ext.prefix = { "${meta.id}.recal" }
505488
}
506489

@@ -649,7 +632,7 @@ process{
649632
publishDir = [
650633
mode: params.publish_dir_mode,
651634
path: { "${params.outdir}/variant_calling/${meta.id}/manta" },
652-
pattern: "*{vcf.gz,vcf.gz.tbi}"
635+
pattern: "*{diploid_sv,tumor_sv,somatic_sv}.{vcf.gz,vcf.gz.tbi}"
653636
]
654637
}
655638
withName: 'MERGE_MANTA_DIPLOID' {
@@ -668,7 +651,7 @@ process{
668651
publishDir = [
669652
mode: params.publish_dir_mode,
670653
path: { "${params.outdir}/variant_calling/${meta.id}/" },
671-
pattern: "*{vcf.gz,vcf.gz.tbi}",
654+
pattern: "*{diploid_sv,tumor_sv,somatic_sv}.{vcf.gz,vcf.gz.tbi}",
672655
saveAs: { meta.num_intervals > 1 ? null : "manta/${it}" }
673656
]
674657
}
@@ -1093,6 +1076,24 @@ process{
10931076
ext.prefix = {"${meta.id}.somatic_snvs"}
10941077
}
10951078

1079+
//TIDDIT
1080+
withName: 'NFCORE_SAREK:SAREK:PAIR_VARIANT_CALLING:RUN_TIDDIT_NORMAL:TABIX_BGZIP_TIDDIT_SV' {
1081+
ext.prefix = {"${meta.id}.normal.vcf"}
1082+
}
1083+
1084+
withName: 'NFCORE_SAREK:SAREK:PAIR_VARIANT_CALLING:RUN_TIDDIT_TUMOR:TABIX_BGZIP_TIDDIT_SV' {
1085+
ext.prefix = {"${meta.id}.tumor.vcf"}
1086+
}
1087+
1088+
//SVDB
1089+
withName: 'NFCORE_SAREK:SAREK:PAIR_VARIANT_CALLING:SVDB_MERGE' {
1090+
publishDir = [
1091+
mode: params.publish_dir_mode,
1092+
path: { "${params.outdir}/variant_calling/${meta.id}/tiddit" },
1093+
pattern: "*vcf"
1094+
]
1095+
}
1096+
10961097
// VCF QC
10971098
withName: 'BCFTOOLS_STATS'{
10981099
ext.when = { !(params.skip_tools && params.skip_tools.contains('bcftools')) }
@@ -1146,6 +1147,7 @@ process{
11461147
// VEP
11471148
if (params.tools && (params.tools.contains('vep') || params.tools.contains('merge'))) {
11481149
withName: 'ENSEMBLVEP' {
1150+
// If just VEP: <vcf prefix>_VEP.ann.vcf
11491151
ext.prefix = { "${vcf.baseName.minus(".vcf")}_VEP" }
11501152
ext.args = [
11511153
'--everything --filter_common --per_gene --total_length --offline --format vcf',
@@ -1171,16 +1173,10 @@ process{
11711173
}
11721174
}
11731175

1174-
if (params.tools && params.tools.contains('vep')) {
1175-
withName: 'NFCORE_SAREK:SAREK:ANNOTATE:ANNOTATION_ENSEMBLVEP:ENSEMBLVEP' {
1176-
ext.prefix = {"${meta.id}_VEP"}
1177-
}
1178-
}
1179-
11801176
// SNPEFF THEN VEP
11811177
if (params.tools && params.tools.contains('merge')) {
11821178
withName: ".*:ANNOTATION_MERGE:ENSEMBLVEP" {
1183-
// Output file will have format *_snpEff_VEP.ann.vcf, *_snpEff_VEP.ann.json or *_snpEff_VEP.ann.tab
1179+
// If megre: Output file will have format *_snpEff_VEP.ann.vcf, *_snpEff_VEP.ann.json or *_snpEff_VEP.ann.tab
11841180
ext.prefix = { "${vcf.baseName.minus(".ann.vcf")}_VEP" }
11851181
}
11861182
}

docs/images/sarek_subway.png

8.22 KB
Loading

0 commit comments

Comments
 (0)