1515~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1616*/
1717
18+ nextflow. preview. types = true
19+
1820include { FASTA_INDEX_BISMARK_BWAMETH } from ' ./subworkflows/nf-core/fasta_index_bismark_bwameth/main'
1921include { PIPELINE_INITIALISATION } from ' ./subworkflows/local/utils_nfcore_methylseq_pipeline'
2022include { PIPELINE_COMPLETION } from ' ./subworkflows/local/utils_nfcore_methylseq_pipeline'
@@ -23,6 +25,7 @@ include { METHYLSEQ } from './workflows/methylseq/'
2325
2426include { Sample } from ' ./utils/types.nf'
2527include { MethylseqParams } from ' ./workflows/methylseq/'
28+ include { MethylseqResult } from ' ./workflows/methylseq/'
2629
2730/*
2831~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -293,7 +296,7 @@ workflow NFCORE_METHYLSEQ {
293296 bismark_index = params_index. bismark_index ?: bismarkIndex(params_methylseq. aligner)
294297 bwameth_index = params_index. bwameth_index ?: (getGenomeAttribute(' bwameth' , params) ? file(getGenomeAttribute(' bwameth' , params)) : null )
295298
296- FASTA_INDEX_BISMARK_BWAMETH (
299+ indices = FASTA_INDEX_BISMARK_BWAMETH (
297300 fasta,
298301 fasta_index,
299302 bismark_index,
@@ -306,24 +309,24 @@ workflow NFCORE_METHYLSEQ {
306309 // WORKFLOW: Run pipeline
307310 //
308311
309- METHYLSEQ (
312+ methylseq = METHYLSEQ (
310313 ch_samples,
311- FASTA_INDEX_BISMARK_BWAMETH . out . fasta,
312- FASTA_INDEX_BISMARK_BWAMETH . out . fasta_index,
313- FASTA_INDEX_BISMARK_BWAMETH . out . bismark_index,
314- FASTA_INDEX_BISMARK_BWAMETH . out . bwameth_index,
314+ indices . fasta,
315+ indices . fasta_index,
316+ indices . bismark_index,
317+ indices . bwameth_index,
315318 params_methylseq
316319 )
317320
318321 emit :
319- fasta_index = FASTA_INDEX_BISMARK_BWAMETH . out . fasta_index
320- bismark_index = FASTA_INDEX_BISMARK_BWAMETH . out . bismark_index
321- bwameth_index = FASTA_INDEX_BISMARK_BWAMETH . out . bwameth_index
322- results = METHYLSEQ . out . results
323- bismark_summary = METHYLSEQ . out . bismark_summary
324- reference_dict = METHYLSEQ . out . reference_dict
325- intervallist = METHYLSEQ . out . intervallist
326- multiqc_report = METHYLSEQ . out . multiqc_report
322+ fasta_index = indices . fasta_index
323+ bismark_index = indices . bismark_index
324+ bwameth_index = indices . bwameth_index
325+ results = methylseq . results
326+ bismark_summary = methylseq . bismark_summary
327+ reference_dict = methylseq . reference_dict
328+ intervallist = methylseq . intervallist
329+ multiqc_report = methylseq . multiqc_report
327330
328331}
329332
@@ -354,7 +357,7 @@ workflow {
354357 //
355358 // SUBWORKFLOW: Run initialisation tasks
356359 //
357- PIPELINE_INITIALISATION (
360+ ch_samples = PIPELINE_INITIALISATION (
358361 params. input,
359362 params. version,
360363 params. validate_params,
@@ -366,8 +369,8 @@ workflow {
366369 //
367370 // WORKFLOW: Run main workflow
368371 //
369- NFCORE_METHYLSEQ (
370- PIPELINE_INITIALISATION . out . samplesheet ,
372+ methylseq = NFCORE_METHYLSEQ (
373+ ch_samples ,
371374 params,
372375 params
373376 )
@@ -381,94 +384,94 @@ workflow {
381384 params. outdir,
382385 params. monochrome_logs,
383386 params. hook_url,
384- NFCORE_METHYLSEQ . out . multiqc_report
387+ methylseq . multiqc_report
385388 )
386389
387390 publish :
388- fasta_index = NFCORE_METHYLSEQ . out . fasta_index
389- bismark_index = NFCORE_METHYLSEQ . out . bismark_index
390- bwameth_index = NFCORE_METHYLSEQ . out . bwameth_index
391- samples = NFCORE_METHYLSEQ . out . results
392- bismark_summary = NFCORE_METHYLSEQ . out . bismark_summary
393- reference_dict = NFCORE_METHYLSEQ . out . reference_dict
394- intervallist = NFCORE_METHYLSEQ . out . intervallist
395- multiqc_report = NFCORE_METHYLSEQ . out . multiqc_report
391+ fasta_index = methylseq . fasta_index
392+ bismark_index = methylseq . bismark_index
393+ bwameth_index = methylseq . bwameth_index
394+ samples = methylseq . results
395+ bismark_summary = methylseq . bismark_summary
396+ reference_dict = methylseq . reference_dict
397+ intervallist = methylseq . intervallist
398+ multiqc_report = methylseq . multiqc_report
396399}
397400
398401output {
399- fasta_index {
402+ fasta_index : Path {
400403 path " ${ params.aligner} /reference_genome"
401404 enabled params. save_reference
402405 }
403406
404- bismark_index {
407+ bismark_index : Path {
405408 path " ${ params.aligner} /reference_genome"
406409 enabled params. save_reference
407410 }
408411
409- bwameth_index {
412+ bwameth_index : Path {
410413 path " ${ params.aligner} /reference_genome"
411414 enabled params. save_reference
412415 }
413416
414- samples {
417+ samples : Channel< MethylseqResult > {
415418 path { r ->
416- r. fastqc_html >> " fastqc"
417- r. fastqc_zip >> " fastqc/zips"
419+ r. fastqc_html >> " fastqc/ "
420+ r. fastqc_zip >> " fastqc/zips/ "
418421
419- r. trim_reads >> (params. save_trimmed ? " trimgalore" : null )
420- r. trim_log >> " trimgalore/logs"
421- r. trim_unpaired >> (params. save_trimmed ? " trimgalore" : null )
422- r. trim_html >> " trimgalore/fastqc"
423- r. trim_zip >> " trimgalore/fastqc/zips"
422+ r. trim_reads >> (params. save_trimmed ? " trimgalore/ " : null )
423+ r. trim_log >> " trimgalore/logs/ "
424+ r. trim_unpaired >> (params. save_trimmed ? " trimgalore/ " : null )
425+ r. trim_html >> " trimgalore/fastqc/ "
426+ r. trim_zip >> " trimgalore/fastqc/zips/ "
424427
425- r. bam >> (params. save_align_intermeds ? " ${ params.aligner} /alignments" : null )
428+ r. bam >> (params. save_align_intermeds ? " ${ params.aligner} /alignments/ " : null )
426429 r. bai >> (params. skip_deduplication ? " ${ params.aligner} /alignments/" : " ${ params.aligner} /deduplicated/" )
427430
428- r. align_report >> " ${ params.aligner} /alignments/logs"
429- r. unmapped >> " ${ params.aligner} /alignments/unmapped"
430- r. dedup_report >> " ${ params.aligner} /deduplicated/logs"
431- r. coverage2cytosine_coverage >> " bismark/coverage2cytosine/coverage"
432- r. coverage2cytosine_report >> " bismark/coverage2cytosine/reports"
433- r. coverage2cytosine_summary >> " bismark/coverage2cytosine/summaries"
434- r. methylation_bedgraph >> " ${ params.aligner} /methylation_calls/bedGraph"
435- r. methylation_calls >> " ${ params.aligner} /methylation_calls/methylation_calls"
436- r. methylation_coverage >> " ${ params.aligner} /methylation_calls/methylation_coverage"
437- r. methylation_report >> " ${ params.aligner} /methylation_calls/splitting_report"
438- r. methylation_mbias >> " ${ params.aligner} /methylation_calls/mbias"
439- r. bismark_report >> " ${ params.aligner} /reports"
431+ r. align_report >> " ${ params.aligner} /alignments/logs/ "
432+ r. unmapped >> " ${ params.aligner} /alignments/unmapped/ "
433+ r. dedup_report >> " ${ params.aligner} /deduplicated/logs/ "
434+ r. coverage2cytosine_coverage >> " bismark/coverage2cytosine/coverage/ "
435+ r. coverage2cytosine_report >> " bismark/coverage2cytosine/reports/ "
436+ r. coverage2cytosine_summary >> " bismark/coverage2cytosine/summaries/ "
437+ r. methylation_bedgraph >> " ${ params.aligner} /methylation_calls/bedGraph/ "
438+ r. methylation_calls >> " ${ params.aligner} /methylation_calls/methylation_calls/ "
439+ r. methylation_coverage >> " ${ params.aligner} /methylation_calls/methylation_coverage/ "
440+ r. methylation_report >> " ${ params.aligner} /methylation_calls/splitting_report/ "
441+ r. methylation_mbias >> " ${ params.aligner} /methylation_calls/mbias/ "
442+ r. bismark_report >> " ${ params.aligner} /reports/ "
440443
441444 r. samtools_flagstat >> " ${ params.aligner} /alignments/samtools_stats/"
442445 r. samtools_stats >> " ${ params.aligner} /alignments/samtools_stats/"
443- r. methydackel_extract_bedgraph >> " methyldackel"
444- r. methydackel_extract_methylkit >> " methyldackel"
445- r. methyldackel_mbias >> " methyldackel/mbias"
446- r. picard_metrics >> " ${ params.aligner} /deduplicated/picard_metrics"
446+ r. methydackel_extract_bedgraph >> " methyldackel/ "
447+ r. methydackel_extract_methylkit >> " methyldackel/ "
448+ r. methyldackel_mbias >> " methyldackel/mbias/ "
449+ r. picard_metrics >> " ${ params.aligner} /deduplicated/picard_metrics/ "
447450
448451 r. qualimap_bamqc >> " ${ params.aligner} /qualimap/bamqc/"
449452
450- r. bedgraph_intersect >> (params. aligner == ' bismark' ? " bismark/methylation_calls/bedGraph" : " methyldackel" )
451- r. picard_hsmetrics >> " enrichment_metrics"
453+ r. bedgraph_intersect >> (params. aligner == ' bismark' ? " bismark/methylation_calls/bedGraph/ " : " methyldackel/ " )
454+ r. picard_hsmetrics >> " enrichment_metrics/ "
452455
453- r. lc_extrap >> " ${ params.aligner} /preseq"
454- r. lc_log >> " ${ params.aligner} /preseq/log"
456+ r. lc_extrap >> " ${ params.aligner} /preseq/ "
457+ r. lc_log >> " ${ params.aligner} /preseq/log/ "
455458 }
456459 }
457460
458- bismark_summary {
461+ bismark_summary : Set< Path > {
459462 path " ${ params.aligner} /summary"
460463 }
461464
462- reference_dict {
465+ reference_dict : Record {
463466 path " ${ params.aligner} /reference_genome"
464467 enabled params. save_reference
465468 }
466469
467- intervallist {
470+ intervallist : Record {
468471 path " enrichment_metrics"
469472 }
470473
471- multiqc_report {
474+ multiqc_report : Path {
472475 path " multiqc/${ params.aligner} "
473476 }
474477}
0 commit comments