Skip to content

Commit

Permalink
Merge pull request #1100 from maxulysse/deepvariant_intervals
Browse files Browse the repository at this point in the history
FIX: Deepvariant duplicate index
  • Loading branch information
maxulysse authored Jun 12, 2023
2 parents 400b4ae + 693028e commit 1a9328a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Vuoinesluobbalah is a lake close to Bierikjávrre.
- [#1089](https://github.com/nf-core/sarek/pull/1089) - Remove duplicated code
- [#1093](https://github.com/nf-core/sarek/pull/1093) - Fixing Ascat by reverting meta.id in channels allele_files, loci_files, gc_file and rt_file to baseName.
- [#1098](https://github.com/nf-core/sarek/pull/1098) - Fix Channel issue in Mutect2 subworkflow [#1094](https://github.com/nf-core/sarek/pull/1094)
- [#1100](https://github.com/nf-core/sarek/pull/1100) - Remove duplicate index with deepvariant when no_intervals [#1069](https://github.com/nf-core/sarek/pull/1069)

## [3.2.1](https://github.com/nf-core/sarek/releases/tag/3.2.1) - Pierikjaure

Expand Down
10 changes: 1 addition & 9 deletions conf/modules/deepvariant.config
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ process {
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/" },
pattern: "*vcf.gz",
pattern: "*{vcf.gz,vcf.gz.tbi}",
saveAs: { meta.num_intervals > 1 ? null : "deepvariant/${meta.id}/${it}" }
]
}
Expand All @@ -40,12 +40,4 @@ process {
ext.prefix = {"${meta.id}.deepvariant.g"}
}

withName : 'TABIX_VC_DEEPVARIANT_.*' {
ext.prefix = {"${meta.id}.deepvariant"}
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/deepvariant/${meta.id}/" },
pattern: "*tbi"
]
}
}
8 changes: 0 additions & 8 deletions subworkflows/local/bam_variant_calling_deepvariant/main.nf
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
include { GATK4_MERGEVCFS as MERGE_DEEPVARIANT_GVCF } from '../../../modules/nf-core/gatk4/mergevcfs/main'
include { GATK4_MERGEVCFS as MERGE_DEEPVARIANT_VCF } from '../../../modules/nf-core/gatk4/mergevcfs/main'
include { DEEPVARIANT } from '../../../modules/nf-core/deepvariant/main'
include { TABIX_TABIX as TABIX_VC_DEEPVARIANT_GVCF } from '../../../modules/nf-core/tabix/tabix/main'
include { TABIX_TABIX as TABIX_VC_DEEPVARIANT_VCF } from '../../../modules/nf-core/tabix/tabix/main'

// Deepvariant: https://github.com/google/deepvariant/issues/510
workflow BAM_VARIANT_CALLING_DEEPVARIANT {
Expand Down Expand Up @@ -44,10 +42,6 @@ workflow BAM_VARIANT_CALLING_DEEPVARIANT {
MERGE_DEEPVARIANT_GVCF(gvcf_to_merge, dict)
MERGE_DEEPVARIANT_VCF(vcf_to_merge, dict)

// Only when no_intervals
TABIX_VC_DEEPVARIANT_GVCF(gvcf_out.no_intervals)
TABIX_VC_DEEPVARIANT_VCF(vcf_out.no_intervals)

// Mix intervals and no_intervals channels together
gvcf = Channel.empty().mix(MERGE_DEEPVARIANT_GVCF.out.vcf, gvcf_out.no_intervals)
// add variantcaller to meta map and remove no longer necessary field: num_intervals
Expand All @@ -61,8 +55,6 @@ workflow BAM_VARIANT_CALLING_DEEPVARIANT {
versions = versions.mix(DEEPVARIANT.out.versions)
versions = versions.mix(MERGE_DEEPVARIANT_GVCF.out.versions)
versions = versions.mix(MERGE_DEEPVARIANT_VCF.out.versions)
versions = versions.mix(TABIX_VC_DEEPVARIANT_GVCF.out.versions)
versions = versions.mix(TABIX_VC_DEEPVARIANT_VCF.out.versions)

emit:
gvcf
Expand Down

0 comments on commit 1a9328a

Please sign in to comment.