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

don't publish genomicsdb files #1061

Merged
merged 25 commits into from
Jun 2, 2023
Merged
Show file tree
Hide file tree
Changes from 24 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Bierikjávrre is one of the largest lake in Sarek.
- [#1048](https://github.com/nf-core/sarek/pull/1048) - Skip tool validation on annotation to fix [#949](https://github.com/nf-core/sarek/issues/949), check that bam is bam and cram is cram [#895](https://github.com/nf-core/sarek/issues/895)
- [#1050](https://github.com/nf-core/sarek/pull/1050) - Disable GATK VCF filters when joint calling to fix [#1025](https://github.com/nf-core/sarek/issues/1025)
- [#1058](https://github.com/nf-core/sarek/pull/1058) - Fix container declaration for VCFTOOLS as it has been updated in the registry

- [#1061](https://github.com/nf-core/sarek/pull/1061) - Fix GenomicsDB also works with one interval file, fix results publishing of GenomicsDB
### Removed

- [#898](https://github.com/nf-core/sarek/pull/898) - Params `enable_conda` was removed
Expand Down
6 changes: 6 additions & 0 deletions conf/modules/joint_germline.config
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,16 @@ process {
withName: 'GATK4_GENOMICSDBIMPORT' {
ext.args = { "--genomicsdb-shared-posixfs-optimizations true --bypass-feature-reader "}
ext.prefix = { "${meta.intervals_name}.joint" }
publishDir = [
enabled: false
]
}

withName: 'GATK4_GENOTYPEGVCFS' {
ext.prefix = { meta.intervals_name }
publishDir = [
asp8200 marked this conversation as resolved.
Show resolved Hide resolved
enabled: false
]
}

if (params.tools && params.tools.contains('haplotypecaller') && params.joint_germline) {
Expand Down
2 changes: 1 addition & 1 deletion subworkflows/local/bam_merge_index_samtools/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ workflow BAM_MERGE_INDEX_SAMTOOLS {
}

// Only when using intervals
MERGE_BAM(bam_to_merge.multiple, [], [])
MERGE_BAM(bam_to_merge.multiple, [ [ id:'null' ], []], [ [ id:'null' ], []])

// Mix intervals and no_intervals channels together
bam_all = MERGE_BAM.out.bam.mix(bam_to_merge.single)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_joint_germline.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- name: Run joint germline variant calling with haplotypecaller
command: nextflow run main.nf -profile test,targeted --input ./tests/csv/3.0/mapped_joint_bam.csv --tools haplotypecaller --step variant_calling --joint_germline --skip_tools haplotypecaller_filter --outdir results
command: nextflow run main.nf -profile test,targeted --input ./tests/csv/3.0/mapped_joint_bam.csv --tools haplotypecaller --step variant_calling --joint_germline --outdir results
tags:
- germline
- joint_germline
Expand Down
8 changes: 4 additions & 4 deletions workflows/sarek.nf
Original file line number Diff line number Diff line change
Expand Up @@ -387,12 +387,12 @@ workflow SAREK {
intervals_bed_gz_tbi = PREPARE_INTERVALS.out.intervals_bed_gz_tbi // [ interval_bed, tbi, num_intervals ] multiple interval.bed.gz/.tbi files, divided by useful intervals for scatter/gather

intervals_and_num_intervals = intervals.map{ interval, num_intervals ->
if ( num_intervals <= 1 ) [ [], num_intervals ]
if ( num_intervals < 1 ) [ [], num_intervals ]
else [ interval, num_intervals ]
}

intervals_bed_gz_tbi_and_num_intervals = intervals_bed_gz_tbi.map{ intervals, num_intervals ->
if ( num_intervals <= 1 ) [ [], [], num_intervals ]
if ( num_intervals < 1 ) [ [], [], num_intervals ]
else [ intervals[0], intervals[1], num_intervals ]
}

Expand Down Expand Up @@ -532,7 +532,7 @@ workflow SAREK {

// Use groupKey to make sure that the correct group can advance as soon as it is complete
// and not stall the workflow until all reads from all channels are mapped
[ groupKey( meta - meta.subMap('num_lanes', 'read_group', 'size') + [ data_type:'bam', id:meta.sample ], (meta.num_lanes ?: 1) * (meta.size ?: 1) ), bam ]
[ groupKey( meta - meta.subMap('num_lanes', 'read_group', 'size') + [ data_type:'bam', id:meta.sample ], (meta.num_lanes ?: 1) * (meta.size ?: 1)), bam ]
}.groupTuple()

// gatk4 markduplicates can handle multiple bams as input, so no need to merge/index here
Expand Down Expand Up @@ -1037,7 +1037,7 @@ workflow SAREK {

if (params.tools.split(',').contains('merge') || params.tools.split(',').contains('snpeff') || params.tools.split(',').contains('vep')) {

vep_fasta = (params.vep_include_fasta) ? fasta.map{ fasta -> [ [ id:fasta.baseName ], fasta ] } : [[], []]
vep_fasta = (params.vep_include_fasta) ? fasta.map{ fasta -> [ [ id:fasta.baseName ], fasta ] } : [[id: 'null'], []]

VCF_ANNOTATE_ALL(
vcf_to_annotate,
Expand Down