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

Fix intervals #524

Merged
merged 59 commits into from
May 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
9c1d2ca
use map for interval counts
FriederikeHanssen Apr 22, 2022
9ec1cde
try to use mapping for interval size, only going semi-well
FriederikeHanssen Apr 22, 2022
8044b41
Calcualte interval numbers within map seems to work & carry through s…
FriederikeHanssen Apr 24, 2022
1434854
toList is the solution
FriederikeHanssen Apr 25, 2022
8e8efe2
try around with intervals
FriederikeHanssen Apr 28, 2022
ae41652
Merge dev
FriederikeHanssen Apr 28, 2022
a9bb87a
Fix some things not picked upp after merging
FriederikeHanssen Apr 29, 2022
dd18736
Fix bed file naming and counting for all: no_intervals, intervals fal…
FriederikeHanssen Apr 29, 2022
29f8af9
Use new meta.num_intervals for prepare_recal
FriederikeHanssen Apr 29, 2022
64b14a6
Use new meta.num_intervals for prepare_recal
FriederikeHanssen Apr 29, 2022
50ce3d6
Add Recal with new meta.num_intervals
FriederikeHanssen Apr 29, 2022
74f6465
Clone all the meta maps before operating on them just to be safe
FriederikeHanssen Apr 29, 2022
613ddd9
Fix Strelka
FriederikeHanssen Apr 29, 2022
1b403af
Add germline wf back in
FriederikeHanssen Apr 29, 2022
32a8738
Merge remote-tracking branch 'origin/dev' into fix_intervals
FriederikeHanssen Apr 29, 2022
1d531d2
Fix publishing for recal files
FriederikeHanssen May 1, 2022
793856b
Add multiqc to test
FriederikeHanssen May 1, 2022
90988be
Add multiqc to other test files as well
FriederikeHanssen May 1, 2022
aba31fe
use it, not doing anything
FriederikeHanssen May 1, 2022
8c4a837
Add markduplicates metrics test and publish in right subdir
FriederikeHanssen May 1, 2022
1ba15a7
Use wes for default profile to test BamQC
FriederikeHanssen May 1, 2022
19788d7
Use combined bed for BamQC + only check for wes, everything else will…
FriederikeHanssen May 1, 2022
ecc9bb8
remove view() statements
FriederikeHanssen May 1, 2022
0962a31
Remove comments, add annotation back in
FriederikeHanssen May 1, 2022
ff7c119
Use targetd profile to test qualimap for wes
FriederikeHanssen May 1, 2022
6f90f87
Use targetd profile to test qualimap for wes
FriederikeHanssen May 1, 2022
6af3d59
Add md metrics and bigwig
FriederikeHanssen May 1, 2022
06b9915
Fix Strelka germline
FriederikeHanssen May 1, 2022
8d4dc12
Add Strelka Tumor and Pair
FriederikeHanssen May 1, 2022
96125b9
Add Manta back in
FriederikeHanssen May 1, 2022
fddb799
Add pair and tumor back in
FriederikeHanssen May 1, 2022
36e27cb
Fix cram name & rename STRELKA_GERMLINE to STRELKA_SINGLE
FriederikeHanssen May 1, 2022
b7ce2e1
Add freebayes back
FriederikeHanssen May 1, 2022
b3873ec
Add deepvariant back
FriederikeHanssen May 1, 2022
1882ae7
Add msisensorpro back in
FriederikeHanssen May 1, 2022
8024d4a
use correct bgzip output
FriederikeHanssen May 1, 2022
f7da131
Don't use size() but num_intervals to retrieve actual file number and…
FriederikeHanssen May 1, 2022
3838a0b
Publish vep and snpeff reports into reports/
FriederikeHanssen May 1, 2022
0e3b94f
Add controlfreec back in
FriederikeHanssen May 2, 2022
499636c
Test for annotation reports
FriederikeHanssen May 2, 2022
c10309f
Missing comma
FriederikeHanssen May 2, 2022
a67731b
Remove Strelka genome.vcf and manta small indels from annotation (see…
FriederikeHanssen May 2, 2022
979b48d
review suggestions
FriederikeHanssen May 2, 2022
a48ec2c
Comment controlfreec back in
FriederikeHanssen May 2, 2022
d2a56ab
Use <= and > to cover the whole space of integer numbers
FriederikeHanssen May 2, 2022
5f42deb
remove view() statements
FriederikeHanssen May 2, 2022
2d39cac
Add no_intervals test for default
FriederikeHanssen May 2, 2022
a7b740e
comment out tests to improve no_intervals file handeling
FriederikeHanssen May 2, 2022
04b2844
Adjust sprak sw
FriederikeHanssen May 2, 2022
b66e001
Adjust sprak sw
FriederikeHanssen May 2, 2022
985f10c
If no_intervals, fix all interval channleing output avoiding useless …
FriederikeHanssen May 2, 2022
5814666
Polish prepare intervals code
FriederikeHanssen May 2, 2022
1e1a627
Clean up and comment prepare intervals subworkflow
FriederikeHanssen May 2, 2022
c7c58d1
Some indents and view()s removed
FriederikeHanssen May 2, 2022
a2044b2
Snpeff only publish results if not merge
FriederikeHanssen May 2, 2022
a2eff2c
Update tests
FriederikeHanssen May 2, 2022
de75372
review comments
FriederikeHanssen May 2, 2022
b6c3da9
update changelog
FriederikeHanssen May 3, 2022
0957c03
Update modules
FriederikeHanssen May 3, 2022
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#463](https://github.com/nf-core/sarek/pull/463), [#468](https://github.com/nf-core/sarek/pull/468) - Fix `nf-core lint`
- [#513](https://github.com/nf-core/sarek/pull/513), [#527](https://github.com/nf-core/sarek/pull/527) - CNV is back
- [#529](https://github.com/nf-core/sarek/pull/529) - Do not save `versions.yml` files
- [#524](https://github.com/nf-core/sarek/pull/524) - Fix intervals usage by counting the actual list of scatter/gather files produced and not overall number of intervals

### Deprecated

Expand Down
71 changes: 45 additions & 26 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,8 @@ process {
ext.prefix = { "${meta.id}.md" }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/reports/${meta.id}/markduplicates" },
pattern: "metrics"
path: { "${params.outdir}/reports/markduplicates/${meta.id}" },
pattern: "*metrics"
]
}

Expand Down Expand Up @@ -344,34 +344,41 @@ process {

// PREPARE_RECALIBRATION

withName: 'BASERECALIBRATOR|BASERECALIBRATOR_SPARK|GATHERBQSRREPORTS' {
withName: 'BASERECALIBRATOR|BASERECALIBRATOR_SPARK' {
ext.prefix = {"${meta.id}.recal"}
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/preprocessing/${meta.id}/recal_table" },
pattern: "*table"
pattern: "*table",
saveAs: { meta.num_intervals > 1 ? null : it }
]
}

withName: 'GATHERBQSRREPORTS' {
ext.when = { !params.no_intervals }
ext.prefix = {"${meta.id}.recal"}
ext.when = { meta.num_intervals > 1 }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/preprocessing/${meta.id}/recal_table" },
pattern: "*table",
]
}

// RECALIBRATE

withName: 'APPLYBQSR|APPLYBQSR_SPARK' {
ext.prefix = {"${meta.id}.recal"}
publishDir = [
enabled: !params.no_intervals,
mode: params.publish_dir_mode,
path: { "${params.outdir}/preprocessing/${meta.id}/recalibrated" },
pattern: "*cram"
pattern: "*cram",
saveAs: { meta.num_intervals > 1 ? null : it }
]
}

withName: 'NFCORE_SAREK:SAREK:(RECALIBRATE|RECALIBRATE_SPARK):MERGE_INDEX_CRAM:MERGE_CRAM' {
ext.prefix = { "${meta.id}.recal" }
ext.when = { !params.no_intervals }
ext.when = { meta.num_intervals > 1 }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/preprocessing/${meta.id}/recalibrated" },
Expand Down Expand Up @@ -473,7 +480,6 @@ process{
// DEEPVARIANT
withName: 'CONCAT_DEEPVARIANT_.*' {
publishDir = [
enabled: !params.no_intervals,
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/${meta.id}/deepvariant" },
pattern: "*{vcf.gz,vcf.gz.tbi}"
Expand All @@ -486,24 +492,23 @@ process{
ext.args = { params.wes ? "--model_type WES" : "--model_type WGS" }
ext.when = { params.tools && params.tools.contains('deepvariant') }
publishDir = [
enabled: params.no_intervals,
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/${meta.id}/deepvariant" },
pattern: "*{vcf.gz,vcf.gz.tbi}"
pattern: "*vcf.gz",
saveAs: { meta.num_intervals > 1 ? null : it }
]
}
withName : 'TABIX_VC_DEEPVARIANT.*' {
withName : 'TABIX_VC_DEEPVARIANT_.*' {
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/${meta.id}/deepvariant" },
pattern: "*{vcf.gz,vcf.gz.tbi}"
pattern: "*tbi"
]
}

// FREEBAYES
withName: 'CONCAT_FREEBAYES' {
publishDir = [
enabled: !params.no_intervals,
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/${meta.id}/freebayes" },
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
Expand All @@ -513,10 +518,10 @@ process{
ext.args = '--min-alternate-fraction 0.1 --min-mapping-quality 1'
ext.when = { params.tools && params.tools.contains('freebayes') }
publishDir = [
enabled: params.no_intervals,
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/${meta.id}/freebayes" },
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
pattern: "*vcf.gz",
saveAs: { meta.num_intervals > 1 ? null : it }
]
}
withName : 'TABIX_VC_FREEBAYES' {
Expand Down Expand Up @@ -561,7 +566,6 @@ process{
// MANTA
withName: 'CONCAT_MANTA.*' {
publishDir = [
enabled: !params.no_intervals,
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/${meta.id}/manta" },
pattern: "*{vcf.gz,vcf.gz.tbi}"
Expand All @@ -580,17 +584,16 @@ process{
ext.args = { params.wes ? "--exome" : "" }
ext.when = { params.tools && params.tools.contains('manta') }
publishDir = [
enabled: params.no_intervals,
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/${meta.id}/manta" },
pattern: "*{vcf.gz,vcf.gz.tbi}"
pattern: "*{vcf.gz,vcf.gz.tbi}",
saveAs: { meta.num_intervals > 1 ? null : it }
]
}

// STRELKA
withName: 'CONCAT_STRELKA.*' {
publishDir = [
enabled: !params.no_intervals,
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/${meta.id}/strelka" },
pattern: "*{vcf.gz,vcf.gz.tbi}"
Expand All @@ -606,10 +609,10 @@ process{
ext.args = { params.wes ? "--exome" : "" }
ext.when = { params.tools && params.tools.contains('strelka') }
publishDir = [
enabled: params.no_intervals,
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/${meta.id}/strelka" },
pattern: "*{vcf.gz,vcf.gz.tbi}"
pattern: "*{vcf.gz,vcf.gz.tbi}",
saveAs: { meta.num_intervals > 1 ? null : it }
]
}

Expand All @@ -632,9 +635,8 @@ process{
}

withName: 'CAT_MPILEUP_.*' {
ext.when = { !params.no_intervals }
ext.when = { meta.num_intervals > 1 }
publishDir = [
enabled: !params.no_intervals,
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/${meta.id}/controlfreec" },
pattern: "*mpileup"
Expand Down Expand Up @@ -712,10 +714,10 @@ process{
withName: 'MPILEUP_.*' {
ext.when = { params.tools && params.tools.contains('controlfreec') }
publishDir = [
enabled: params.no_intervals,
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/${meta.id}/controlfreec" },
pattern: "*mpileup"
pattern: "*mpileup",
saveAs: { meta.num_intervals > 1 ? null : it }
]
}

Expand Down Expand Up @@ -959,11 +961,22 @@ process {
withName: 'ENSEMBLVEP' {
ext.args = '--everything --filter_common --per_gene --total_length --offline'
container = { "nfcore/vep:104.3.${params.genome}" }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/reports/EnsemblVEP/${meta.id}/${meta.variantcaller}" },
pattern: "*html"
]
}

withName: 'SNPEFF' {
ext.args = '-nodownload -canon -v'
container = { "nfcore/snpeff:5.0.${params.genome}" }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/reports/SnpEff/${meta.id}/${meta.variantcaller}" },
pattern: "*csv",
saveAs: { params.tools.contains('snpeff') ? it : null }
]
}

withName: 'ANNOTATION_BGZIPTABIX' {
Expand All @@ -979,6 +992,12 @@ if (params.tools && (params.tools.contains('snpeff') || params.tools.contains('m
process {
withName: 'NFCORE_SAREK:SAREK:ANNOTATE:ANNOTATION_SNPEFF:ANNOTATION_BGZIPTABIX' {
ext.prefix = {"${meta.id}_snpEff.ann.vcf"}
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/annotation/${meta.id}/${meta.variantcaller}" },
pattern: "*{gz,gz.tbi}",
saveAs: { params.tools.contains('snpeff') ? it : null }
]
}
}
}
Expand Down
14 changes: 7 additions & 7 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"git_sha": "eeda4136c096688d04cc40bb3c70d948213ed641"
},
"cat/fastq": {
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
"git_sha": "9aadd9a6d3f5964476582319b3a1c54a3e3fe7c9"
},
"cnvkit/batch": {
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
Expand Down Expand Up @@ -121,7 +121,7 @@
"git_sha": "409af2f27cbe45109acc7fee70718d2bf20aa449"
},
"gatk4/haplotypecaller": {
"git_sha": "409af2f27cbe45109acc7fee70718d2bf20aa449"
"git_sha": "68f1c27169946f931ea4318911de5681f88b2961"
},
"gatk4/intervallisttobed": {
"git_sha": "409af2f27cbe45109acc7fee70718d2bf20aa449"
Expand All @@ -130,7 +130,7 @@
"git_sha": "409af2f27cbe45109acc7fee70718d2bf20aa449"
},
"gatk4/markduplicates": {
"git_sha": "409af2f27cbe45109acc7fee70718d2bf20aa449"
"git_sha": "0511e7fbbfa4ba41940d33b687b1cc90227b4eb8"
},
"gatk4/markduplicatesspark": {
"git_sha": "e04970b7d249365cafa5a52912f9a28840481c05"
Expand Down Expand Up @@ -217,16 +217,16 @@
"git_sha": "49b18b1639f4f7104187058866a8fab33332bdfe"
},
"tabix/tabix": {
"git_sha": "49b18b1639f4f7104187058866a8fab33332bdfe"
"git_sha": "b3e9b88e80880f450ad79a95b2b7aa05e1de5484"
},
"tiddit/sv": {
"git_sha": "fd5f6f5f4ffef4ab5a4e809bd3211bbc71c38d30"
"git_sha": "57cb730e78634673fb254a77606e014ce942734c"
},
"trimgalore": {
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
"git_sha": "85ec13ff1fc2196c5a507ea497de468101baabed"
},
"untar": {
"git_sha": "9ae34a01d1747019fd37753ff4cafb05aec35a2b"
"git_sha": "9aadd9a6d3f5964476582319b3a1c54a3e3fe7c9"
},
"vcftools": {
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
Expand Down
4 changes: 2 additions & 2 deletions modules/nf-core/modules/cat/fastq/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion modules/nf-core/modules/gatk4/haplotypecaller/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion modules/nf-core/modules/gatk4/markduplicates/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion modules/nf-core/modules/tabix/tabix/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions modules/nf-core/modules/tabix/tabix/meta.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion modules/nf-core/modules/tiddit/sv/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions modules/nf-core/modules/trimgalore/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions modules/nf-core/modules/trimgalore/meta.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions modules/nf-core/modules/untar/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading