Skip to content

Commit efbdf46

Browse files
authored
Merge pull request #858 from nf-core/workflow_outputs3
Migrate annotate_rhocallviz and annotate_genome_snvs to named channel emits
2 parents 4b3e42b + bb3160c commit efbdf46

8 files changed

Lines changed: 693 additions & 675 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### `Changed`
1111

12+
- Replace `ch_publish`/`subworkflow_results` with named typed channel emits for annotate_rhocallviz and annotate_genome_snvs subworkflows [#858](https://github.com/nf-core/raredisease/pull/858)
13+
- Expand annotate_rhocallviz test with snapshot assertions [#858](https://github.com/nf-core/raredisease/pull/858)
1214
- Refactor scatter_genome subworkflow: alias GAWK as `GENOME_FAI_TO_BED`, remove `val_save_reference` parameter, move interval flattening into `annotate_genome_snvs` [#857](https://github.com/nf-core/raredisease/pull/857)
1315
- Replace `ch_publish`/`subworkflow_results` with named typed channel emits for qc_bam subworkflow [#853](https://github.com/nf-core/raredisease/pull/853)
1416
- Replace `ch_publish`/`subworkflow_results` with named typed channel emits for alignment and subsample-MT subworkflows [#850](https://github.com/nf-core/raredisease/pull/850)

main.nf

Lines changed: 61 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,14 @@ workflow NFCORE_RAREDISEASE {
566566
qc_bam_verifybamid_ud = RAREDISEASE.out.qc_bam_verifybamid_ud // channel: [ val(meta), path(ud) ]
567567
qc_bam_wgsmetrics_wg = RAREDISEASE.out.qc_bam_wgsmetrics_wg // channel: [ val(meta), path(metrics) ]
568568
qc_bam_wgsmetrics_y = RAREDISEASE.out.qc_bam_wgsmetrics_y // channel: [ val(meta), path(metrics) ]
569+
annotate_genome_snvs_bcftools_concat_tbi = RAREDISEASE.out.annotate_genome_snvs_bcftools_concat_tbi // channel: [ val(meta), path(tbi) ]
570+
annotate_genome_snvs_bcftools_concat_vcf = RAREDISEASE.out.annotate_genome_snvs_bcftools_concat_vcf // channel: [ val(meta), path(vcf) ]
571+
annotate_genome_snvs_chromograph_autozyg_plots = RAREDISEASE.out.annotate_genome_snvs_chromograph_autozyg_plots // channel: [ val(meta), path(png) ]
572+
annotate_genome_snvs_chromograph_regions_plots = RAREDISEASE.out.annotate_genome_snvs_chromograph_regions_plots // channel: [ val(meta), path(png) ]
573+
annotate_genome_snvs_chromograph_sites_plots = RAREDISEASE.out.annotate_genome_snvs_chromograph_sites_plots // channel: [ val(meta), path(png) ]
574+
annotate_genome_snvs_rhocall_viz_bed = RAREDISEASE.out.annotate_genome_snvs_rhocall_viz_bed // channel: [ val(meta), path(bed) ]
575+
annotate_genome_snvs_rhocall_viz_wig = RAREDISEASE.out.annotate_genome_snvs_rhocall_viz_wig // channel: [ val(meta), path(wig) ]
576+
annotate_genome_snvs_ucsc_wigtobigwig_bw = RAREDISEASE.out.annotate_genome_snvs_ucsc_wigtobigwig_bw // channel: [ val(meta), path(bw) ]
569577
subsample_mt_bai = RAREDISEASE.out.subsample_mt_bai // channel: [ val(meta), path(bai) ]
570578
subsample_mt_bam = RAREDISEASE.out.subsample_mt_bam // channel: [ val(meta), path(bam) ]
571579
publish = RAREDISEASE.out.publish
@@ -722,45 +730,53 @@ workflow {
722730
)
723731

724732
publish:
725-
alignment = NFCORE_RAREDISEASE.out.align_genome_marked_bam
726-
.mix(NFCORE_RAREDISEASE.out.align_genome_marked_bai)
727-
.mix(NFCORE_RAREDISEASE.out.align_genome_marked_cram)
728-
.mix(NFCORE_RAREDISEASE.out.align_genome_marked_crai)
729-
.mix(NFCORE_RAREDISEASE.out.align_markdup_metrics)
730-
.mix(NFCORE_RAREDISEASE.out.subsample_mt_bam)
731-
.mix(NFCORE_RAREDISEASE.out.subsample_mt_bai)
732-
fastp = NFCORE_RAREDISEASE.out.align_fastp_out
733-
ngsbits_samplegender = NFCORE_RAREDISEASE.out.qc_bam_ngsbits_samplegender_tsv
734-
qc_bam = NFCORE_RAREDISEASE.out.qc_bam_chromograph_cov_plots.transpose()
735-
.mix(NFCORE_RAREDISEASE.out.qc_bam_mosdepth_global_txt)
736-
.mix(NFCORE_RAREDISEASE.out.qc_bam_mosdepth_per_base_bed)
737-
.mix(NFCORE_RAREDISEASE.out.qc_bam_mosdepth_per_base_csi)
738-
.mix(NFCORE_RAREDISEASE.out.qc_bam_mosdepth_per_base_d4)
739-
.mix(NFCORE_RAREDISEASE.out.qc_bam_mosdepth_quantized_bed)
740-
.mix(NFCORE_RAREDISEASE.out.qc_bam_mosdepth_quantized_csi)
741-
.mix(NFCORE_RAREDISEASE.out.qc_bam_mosdepth_regions_bed)
742-
.mix(NFCORE_RAREDISEASE.out.qc_bam_mosdepth_regions_csi)
743-
.mix(NFCORE_RAREDISEASE.out.qc_bam_mosdepth_regions_txt)
744-
.mix(NFCORE_RAREDISEASE.out.qc_bam_mosdepth_summary_txt)
745-
.mix(NFCORE_RAREDISEASE.out.qc_bam_mosdepth_thresholds_bed)
746-
.mix(NFCORE_RAREDISEASE.out.qc_bam_mosdepth_thresholds_csi)
747-
.mix(NFCORE_RAREDISEASE.out.qc_bam_picard_collecthsmetrics_metrics)
748-
.mix(NFCORE_RAREDISEASE.out.qc_bam_picard_collectmultiplemetrics_metrics.transpose())
749-
.mix(NFCORE_RAREDISEASE.out.qc_bam_picard_collectmultiplemetrics_pdf.transpose())
750-
.mix(NFCORE_RAREDISEASE.out.qc_bam_sambamba_depth_bed)
751-
.mix(NFCORE_RAREDISEASE.out.qc_bam_tiddit_cov_cov)
752-
.mix(NFCORE_RAREDISEASE.out.qc_bam_tiddit_cov_wig)
753-
.mix(NFCORE_RAREDISEASE.out.qc_bam_ucsc_wigtobigwig_bw)
754-
.mix(NFCORE_RAREDISEASE.out.qc_bam_verifybamid_ancestry)
755-
.mix(NFCORE_RAREDISEASE.out.qc_bam_verifybamid_bed)
756-
.mix(NFCORE_RAREDISEASE.out.qc_bam_verifybamid_log)
757-
.mix(NFCORE_RAREDISEASE.out.qc_bam_verifybamid_mu)
758-
.mix(NFCORE_RAREDISEASE.out.qc_bam_verifybamid_self_sm)
759-
.mix(NFCORE_RAREDISEASE.out.qc_bam_verifybamid_ud)
760-
.mix(NFCORE_RAREDISEASE.out.qc_bam_wgsmetrics_wg)
761-
.mix(NFCORE_RAREDISEASE.out.qc_bam_wgsmetrics_y)
762-
processed_references = NFCORE_RAREDISEASE.out.scatter_genome_split_intervals
763-
subworkflow_results = NFCORE_RAREDISEASE.out.publish
733+
alignment = NFCORE_RAREDISEASE.out.align_genome_marked_bam
734+
.mix(NFCORE_RAREDISEASE.out.align_genome_marked_bai)
735+
.mix(NFCORE_RAREDISEASE.out.align_genome_marked_cram)
736+
.mix(NFCORE_RAREDISEASE.out.align_genome_marked_crai)
737+
.mix(NFCORE_RAREDISEASE.out.align_markdup_metrics)
738+
.mix(NFCORE_RAREDISEASE.out.subsample_mt_bam)
739+
.mix(NFCORE_RAREDISEASE.out.subsample_mt_bai)
740+
fastp = NFCORE_RAREDISEASE.out.align_fastp_out
741+
ngsbits_samplegender = NFCORE_RAREDISEASE.out.qc_bam_ngsbits_samplegender_tsv
742+
qc_bam = NFCORE_RAREDISEASE.out.qc_bam_chromograph_cov_plots.transpose()
743+
.mix(NFCORE_RAREDISEASE.out.qc_bam_mosdepth_global_txt)
744+
.mix(NFCORE_RAREDISEASE.out.qc_bam_mosdepth_per_base_bed)
745+
.mix(NFCORE_RAREDISEASE.out.qc_bam_mosdepth_per_base_csi)
746+
.mix(NFCORE_RAREDISEASE.out.qc_bam_mosdepth_per_base_d4)
747+
.mix(NFCORE_RAREDISEASE.out.qc_bam_mosdepth_quantized_bed)
748+
.mix(NFCORE_RAREDISEASE.out.qc_bam_mosdepth_quantized_csi)
749+
.mix(NFCORE_RAREDISEASE.out.qc_bam_mosdepth_regions_bed)
750+
.mix(NFCORE_RAREDISEASE.out.qc_bam_mosdepth_regions_csi)
751+
.mix(NFCORE_RAREDISEASE.out.qc_bam_mosdepth_regions_txt)
752+
.mix(NFCORE_RAREDISEASE.out.qc_bam_mosdepth_summary_txt)
753+
.mix(NFCORE_RAREDISEASE.out.qc_bam_mosdepth_thresholds_bed)
754+
.mix(NFCORE_RAREDISEASE.out.qc_bam_mosdepth_thresholds_csi)
755+
.mix(NFCORE_RAREDISEASE.out.qc_bam_picard_collecthsmetrics_metrics)
756+
.mix(NFCORE_RAREDISEASE.out.qc_bam_picard_collectmultiplemetrics_metrics.transpose())
757+
.mix(NFCORE_RAREDISEASE.out.qc_bam_picard_collectmultiplemetrics_pdf.transpose())
758+
.mix(NFCORE_RAREDISEASE.out.qc_bam_sambamba_depth_bed)
759+
.mix(NFCORE_RAREDISEASE.out.qc_bam_tiddit_cov_cov)
760+
.mix(NFCORE_RAREDISEASE.out.qc_bam_tiddit_cov_wig)
761+
.mix(NFCORE_RAREDISEASE.out.qc_bam_ucsc_wigtobigwig_bw)
762+
.mix(NFCORE_RAREDISEASE.out.qc_bam_verifybamid_ancestry)
763+
.mix(NFCORE_RAREDISEASE.out.qc_bam_verifybamid_bed)
764+
.mix(NFCORE_RAREDISEASE.out.qc_bam_verifybamid_log)
765+
.mix(NFCORE_RAREDISEASE.out.qc_bam_verifybamid_mu)
766+
.mix(NFCORE_RAREDISEASE.out.qc_bam_verifybamid_self_sm)
767+
.mix(NFCORE_RAREDISEASE.out.qc_bam_verifybamid_ud)
768+
.mix(NFCORE_RAREDISEASE.out.qc_bam_wgsmetrics_wg)
769+
.mix(NFCORE_RAREDISEASE.out.qc_bam_wgsmetrics_y)
770+
annotate_snv_genome = NFCORE_RAREDISEASE.out.annotate_genome_snvs_bcftools_concat_vcf
771+
.mix(NFCORE_RAREDISEASE.out.annotate_genome_snvs_bcftools_concat_tbi)
772+
.mix(NFCORE_RAREDISEASE.out.annotate_genome_snvs_chromograph_autozyg_plots)
773+
.mix(NFCORE_RAREDISEASE.out.annotate_genome_snvs_chromograph_regions_plots)
774+
.mix(NFCORE_RAREDISEASE.out.annotate_genome_snvs_chromograph_sites_plots)
775+
.mix(NFCORE_RAREDISEASE.out.annotate_genome_snvs_rhocall_viz_bed)
776+
.mix(NFCORE_RAREDISEASE.out.annotate_genome_snvs_rhocall_viz_wig)
777+
annotate_snv_genome_rhocallviz_bw = NFCORE_RAREDISEASE.out.annotate_genome_snvs_ucsc_wigtobigwig_bw
778+
processed_references = NFCORE_RAREDISEASE.out.scatter_genome_split_intervals
779+
subworkflow_results = NFCORE_RAREDISEASE.out.publish
764780
}
765781

766782
output {
@@ -776,6 +792,12 @@ output {
776792
qc_bam {
777793
path { _meta, _file -> "qc_bam/" }
778794
}
795+
annotate_snv_genome {
796+
path { _meta, _file -> "annotate_snv/genome/" }
797+
}
798+
annotate_snv_genome_rhocallviz_bw {
799+
path { meta, _file -> "annotate_snv/genome/${meta.sample}_rhocallviz/" }
800+
}
779801
processed_references {
780802
path { _meta, _file -> "processed_references/" }
781803
enabled params.save_reference

subworkflows/local/annotate_genome_snvs/main.nf

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,11 @@ workflow ANNOTATE_GENOME_SNVS {
4141
val_vep_cache_version // string: vep version ex: 107
4242

4343
main:
44-
ch_cadd_vcf = channel.empty()
45-
ch_vcf_scatter_in = channel.empty()
46-
ch_vep_in = channel.empty()
47-
ch_chromograph_publish = channel.empty()
44+
ch_cadd_vcf = channel.empty()
45+
ch_chromograph_regions_plots = channel.empty()
46+
ch_chromograph_sites_plots = channel.empty()
47+
ch_vcf_scatter_in = channel.empty()
48+
ch_vep_in = channel.empty()
4849

4950
ch_vcf
5051
.filter { meta, _vcf, _tbi ->
@@ -186,8 +187,8 @@ workflow ANNOTATE_GENOME_SNVS {
186187
UPD_REGIONS(ch_upd_in)
187188
CHROMOGRAPH_SITES([[],[]], [[],[]], [[],[]], [[],[]], [[],[]], [[],[]], UPD_SITES.out.bed)
188189
CHROMOGRAPH_REGIONS([[],[]], [[],[]], [[],[]], [[],[]], [[],[]], UPD_REGIONS.out.bed, [[],[]])
189-
ch_chromograph_publish = CHROMOGRAPH_SITES.out.plots
190-
.mix(CHROMOGRAPH_REGIONS.out.plots)
190+
ch_chromograph_sites_plots = CHROMOGRAPH_SITES.out.plots
191+
ch_chromograph_regions_plots = CHROMOGRAPH_REGIONS.out.plots
191192
}
192193

193194
BCFTOOLS_CONCAT.out.vcf
@@ -202,14 +203,13 @@ workflow ANNOTATE_GENOME_SNVS {
202203
//rhocall_viz
203204
ANNOTATE_RHOCALLVIZ(ch_genome_chrsizes, ch_samples, ch_vep_ann_index )
204205

205-
ch_publish = ch_chromograph_publish
206-
.mix(ch_concat_vcf_out)
207-
.mix(ch_concat_tbi_out)
208-
.map { meta, value -> ['annotate_snv/genome/', [meta, value]] }
209-
.mix(ANNOTATE_RHOCALLVIZ.out.publish)
210-
211206
emit:
212-
tbi = ch_concat_tbi_out // channel: [ val(meta), path(tbi) ]
213-
vcf_ann = ch_concat_vcf_out // channel: [ val(meta), path(vcf) ]
214-
publish = ch_publish // channel: [ val(destination), val(value) ]
207+
bcftools_concat_tbi = ch_concat_tbi_out // channel: [ val(meta), path(tbi) ]
208+
bcftools_concat_vcf = ch_concat_vcf_out // channel: [ val(meta), path(vcf) ]
209+
chromograph_autozyg_plots = ANNOTATE_RHOCALLVIZ.out.chromograph_autozyg_plots // channel: [ val(meta), path(png) ]
210+
chromograph_regions_plots = ch_chromograph_regions_plots // channel: [ val(meta), path(png) ]
211+
chromograph_sites_plots = ch_chromograph_sites_plots // channel: [ val(meta), path(png) ]
212+
rhocall_viz_bed = ANNOTATE_RHOCALLVIZ.out.rhocall_viz_bed // channel: [ val(meta), path(bed) ]
213+
rhocall_viz_wig = ANNOTATE_RHOCALLVIZ.out.rhocall_viz_wig // channel: [ val(meta), path(wig) ]
214+
ucsc_wigtobigwig_bw = ANNOTATE_RHOCALLVIZ.out.ucsc_wigtobigwig_bw // channel: [ val(meta), path(bw) ]
215215
}

0 commit comments

Comments
 (0)