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

Workflow output definition #1227

Draft
wants to merge 15 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
Move topic mappings to modules and subworkflows
Signed-off-by: Ben Sherman <[email protected]>
  • Loading branch information
bentsherman committed Apr 7, 2024
commit 635203c91b30a6bf4c36c20e88a7959287d1424b
4 changes: 2 additions & 2 deletions modules/local/dupradar/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ process DUPRADAR {
path gtf

output:
tuple val(meta), path("*.pdf") , emit: pdf
tuple val(meta), path("*.txt") , emit: txt
tuple val(meta), path("*.pdf") , emit: pdf , topic: 'align-dupradar'
tuple val(meta), path("*.txt") , emit: txt , topic: 'align-dupradar'
tuple val(meta), path("*_mqc.txt"), emit: multiqc
path "versions.yml" , emit: versions

Expand Down
2 changes: 1 addition & 1 deletion modules/local/multiqc_custom_biotype/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ process MULTIQC_CUSTOM_BIOTYPE {
path header

output:
tuple val(meta), path("*.tsv"), emit: tsv
tuple val(meta), path("*.tsv"), emit: tsv , topic: 'align-featurecounts'
path "versions.yml" , emit: versions

when:
Expand Down
2 changes: 1 addition & 1 deletion modules/nf-core/cat/fastq/main.nf

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/multiqc/main.nf

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

4 changes: 2 additions & 2 deletions modules/nf-core/preseq/lcextrap/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/qualimap/rnaseq/main.nf

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

4 changes: 2 additions & 2 deletions modules/nf-core/sortmerna/main.nf

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

8 changes: 4 additions & 4 deletions modules/nf-core/stringtie/stringtie/main.nf

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

4 changes: 2 additions & 2 deletions modules/nf-core/subread/featurecounts/main.nf

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

10 changes: 10 additions & 0 deletions subworkflows/local/align_star/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,16 @@ workflow ALIGN_STAR {
BAM_SORT_STATS_SAMTOOLS ( ch_orig_bam, fasta )
ch_versions = ch_versions.mix(BAM_SORT_STATS_SAMTOOLS.out.versions)

topic:
ch_orig_bam >> 'align-star-intermeds'
ch_log_final >> 'align-star-log'
ch_log_out >> 'align-star-log'
ch_log_progress >> 'align-star-log'
ch_bam_sorted >> 'align-star-intermeds'
ch_bam_transcript >> 'align-star-intermeds'
ch_fastq >> 'align-star-unaligned'
ch_tab >> 'align-star-log'

emit:
orig_bam = ch_orig_bam // channel: [ val(meta), bam ]
log_final = ch_log_final // channel: [ val(meta), log_final ]
Expand Down
13 changes: 13 additions & 0 deletions subworkflows/local/quantify_rsem/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,19 @@ workflow QUANTIFY_RSEM {
)
ch_versions = ch_versions.mix(RSEM_MERGE_COUNTS.out.versions)

topic:
RSEM_CALCULATEEXPRESSION.out.counts_gene >> 'quantify-rsem'
RSEM_CALCULATEEXPRESSION.out.counts_transcript >> 'quantify-rsem'
RSEM_CALCULATEEXPRESSION.out.stat >> 'quantify-rsem'
RSEM_CALCULATEEXPRESSION.out.logs >> 'quantify-rsem-log'
RSEM_CALCULATEEXPRESSION.out.bam_star >> 'quantify-rsem-intermeds'
RSEM_CALCULATEEXPRESSION.out.bam_genome >> 'quantify-rsem-intermeds'
RSEM_CALCULATEEXPRESSION.out.bam_transcript >> 'quantify-rsem-intermeds'
RSEM_MERGE_COUNTS.out.merged_counts_gene >> 'quantify-rsem'
RSEM_MERGE_COUNTS.out.merged_tpm_gene >> 'quantify-rsem'
RSEM_MERGE_COUNTS.out.merged_counts_transcript >> 'quantify-rsem'
RSEM_MERGE_COUNTS.out.merged_tpm_transcript >> 'quantify-rsem'

emit:
counts_gene = RSEM_CALCULATEEXPRESSION.out.counts_gene // channel: [ val(meta), counts ]
counts_transcript = RSEM_CALCULATEEXPRESSION.out.counts_transcript // channel: [ val(meta), counts ]
Expand Down

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

9 changes: 9 additions & 0 deletions subworkflows/nf-core/bam_markduplicates_picard/main.nf

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

24 changes: 24 additions & 0 deletions subworkflows/nf-core/bam_rseqc/main.nf

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

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

4 changes: 4 additions & 0 deletions subworkflows/nf-core/fastq_align_hisat2/main.nf

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

13 changes: 13 additions & 0 deletions subworkflows/nf-core/fastq_fastqc_umitools_fastp/main.nf

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

9 changes: 9 additions & 0 deletions subworkflows/nf-core/fastq_fastqc_umitools_trimgalore/main.nf

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

121 changes: 0 additions & 121 deletions workflows/rnaseq/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -798,11 +798,6 @@ workflow RNASEQ {
QUANTIFY_STAR_SALMON.out.merged_transcript_rds >> 'align'

// TODO: !params.skip_alignment && params.aligner == 'star_salmon' && params.with_umi
// BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_TRANSCRIPTOME.out.bam >> 'align-intermeds'
// BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_TRANSCRIPTOME.out.bai >> 'align-intermeds'
// BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_TRANSCRIPTOME.out.stats >> 'align-samtools-stats'
// BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_TRANSCRIPTOME.out.flagstat >> 'align-samtools-stats'
// BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_TRANSCRIPTOME.out.idxstats >> 'align-samtools-stats'
// BAM_SORT_STATS_SAMTOOLS.out.bam >> 'align-intermeds'
// BAM_SORT_STATS_SAMTOOLS.out.bai >> 'align-intermeds'
// BAM_SORT_STATS_SAMTOOLS.out.stats >> 'align-intermeds-samtools-stats'
Expand All @@ -812,16 +807,6 @@ workflow RNASEQ {
// UMITOOLS_PREPAREFORSALMON.out.bam >> 'align-intermeds'
// UMITOOLS_PREPAREFORSALMON.out.log >> 'align-intermeds-umitools-log'

// TODO: !params.skip_alignment && params.aligner in ['star_salmon', 'hisat2']
// BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_GENOME.out.bam >> 'align-intermeds'
// BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_GENOME.out.bai >> 'align-intermeds'
// BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_GENOME.out.stats >> 'align-samtools-stats'
// BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_GENOME.out.flagstat >> 'align-samtools-stats'
// BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_GENOME.out.idxstats >> 'align-samtools-stats'

BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG_FORWARD.out.bigwig >> 'align-bigwig'
BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG_REVERSE.out.bigwig >> 'align-bigwig'

// TODO: !params.skip_alignment && params.aligner == 'star_salmon'
DESEQ2_QC_STAR_SALMON.out.rdata >> 'align-deseq2'
DESEQ2_QC_STAR_SALMON.out.pca_txt >> 'align-deseq2'
Expand Down Expand Up @@ -858,115 +843,9 @@ workflow RNASEQ {
DESEQ2_QC_PSEUDO.out.size_factors >> 'pseudo-align-deseq2'
DESEQ2_QC_PSEUDO.out.log >> 'pseudo-align-deseq2'

DUPRADAR.out.pdf >> 'align-dupradar'
DUPRADAR.out.txt >> 'align-dupradar'

BBMAP_BBSPLIT.out.stats >> 'bbsplit'
BBMAP_BBSPLIT.out.all_fastq >> 'bbsplit-intermeds'

CAT_FASTQ.out.reads >> 'merged-fastq'

MULTIQC.out.report >> 'multiqc'
MULTIQC.out.data >> 'multiqc'
MULTIQC.out.plots >> 'multiqc'

// TODO: !params.skip_alignment && !params.skip_qc && !params.skip_preseq
// PRESEQ_LCEXTRAP.out.lc_extrap >> 'align-preseq'
// PRESEQ_LCEXTRAP.out.log >> 'align-preseq-log'

QUALIMAP_RNASEQ.out.results >> 'align-qualimap'

// TODO: params.remove_ribo_rna
// SORTMERNA.out.log >> 'sortmerna'
// SORTMERNA.out.reads >> 'sortmerna-intermeds'

STRINGTIE_STRINGTIE.out.transcript_gtf >> 'align-stringtie'
STRINGTIE_STRINGTIE.out.abundance >> 'align-stringtie'
STRINGTIE_STRINGTIE.out.coverage_gtf >> 'align-stringtie'
STRINGTIE_STRINGTIE.out.ballgown >> 'align-stringtie'

SUBREAD_FEATURECOUNTS.out.counts >> 'align-featurecounts'
SUBREAD_FEATURECOUNTS.out.summary >> 'align-featurecounts'
MULTIQC_CUSTOM_BIOTYPE.out.tsv >> 'align-featurecounts'

ALIGN_STAR.out.log_final >> 'align-star-log'
ALIGN_STAR.out.log_out >> 'align-star-log'
ALIGN_STAR.out.log_progress >> 'align-star-log'
ALIGN_STAR.out.tab >> 'align-star-log'
ALIGN_STAR.out.orig_bam >> 'align-star-intermeds'
ALIGN_STAR.out.bam_sorted >> 'align-star-intermeds'
ALIGN_STAR.out.bam_transcript >> 'align-star-intermeds'
ALIGN_STAR.out.fastq >> 'align-star-unaligned'

// TODO: !params.skip_alignment && params.aligner == 'star_rsem'
// QUANTIFY_RSEM.out.counts_gene >> 'quantify-rsem'
// QUANTIFY_RSEM.out.counts_transcript >> 'quantify-rsem'
// QUANTIFY_RSEM.out.stat >> 'quantify-rsem'
// QUANTIFY_RSEM.out.logs >> 'quantify-rsem-log'
// QUANTIFY_RSEM.out.bam_star >> 'quantify-rsem-intermeds'
// QUANTIFY_RSEM.out.bam_genome >> 'quantify-rsem-intermeds'
// QUANTIFY_RSEM.out.bam_transcript >> 'quantify-rsem-intermeds'
// QUANTIFY_RSEM.out.merged_counts_gene >> 'quantify-rsem'
// QUANTIFY_RSEM.out.merged_tpm_gene >> 'quantify-rsem'
// QUANTIFY_RSEM.out.merged_counts_transcript >> 'quantify-rsem'
// QUANTIFY_RSEM.out.merged_tpm_transcript >> 'quantify-rsem'

BAM_MARKDUPLICATES_PICARD.out.bam >> 'align-picard'
BAM_MARKDUPLICATES_PICARD.out.bai >> 'align-picard'
BAM_MARKDUPLICATES_PICARD.out.csi >> 'align-picard'
BAM_MARKDUPLICATES_PICARD.out.metrics >> 'align-picard-metrics'
BAM_MARKDUPLICATES_PICARD.out.stats >> 'align-picard-stats'
BAM_MARKDUPLICATES_PICARD.out.flagstat >> 'align-picard-stats'
BAM_MARKDUPLICATES_PICARD.out.idxstats >> 'align-picard-stats'

BAM_RSEQC.out.bamstat_txt >> 'align-rseqc-bamstat'
BAM_RSEQC.out.inferexperiment_txt >> 'align-rseqc-inferexperiment'
BAM_RSEQC.out.junctionannotation_pdf >> 'align-rseqc-junctionannotation'
BAM_RSEQC.out.junctionannotation_events_pdf >> 'align-rseqc-junctionannotation'
BAM_RSEQC.out.junctionannotation_bed >> 'align-rseqc-junctionannotation'
BAM_RSEQC.out.junctionannotation_interact_bed >> 'align-rseqc-junctionannotation'
BAM_RSEQC.out.junctionannotation_xls >> 'align-rseqc-junctionannotation'
BAM_RSEQC.out.junctionannotation_log >> 'align-rseqc-junctionannotation'
BAM_RSEQC.out.junctionannotation_rscript >> 'align-rseqc-junctionannotation'
BAM_RSEQC.out.junctionsaturation_pdf >> 'align-rseqc-junctionsaturation'
BAM_RSEQC.out.junctionsaturation_rscript >> 'align-rseqc-junctionsaturation'
BAM_RSEQC.out.readduplication_pdf >> 'align-rseqc-readduplication'
BAM_RSEQC.out.readduplication_seq_xls >> 'align-rseqc-readduplication'
BAM_RSEQC.out.readduplication_pos_xls >> 'align-rseqc-readduplication'
BAM_RSEQC.out.readduplication_rscript >> 'align-rseqc-readduplication'
BAM_RSEQC.out.readdistribution_txt >> 'align-rseqc-readdistribution'
BAM_RSEQC.out.innerdistance_distance >> 'align-rseqc-innerdistance'
BAM_RSEQC.out.innerdistance_freq >> 'align-rseqc-innerdistance'
BAM_RSEQC.out.innerdistance_mean >> 'align-rseqc-innerdistance'
BAM_RSEQC.out.innerdistance_pdf >> 'align-rseqc-innerdistance'
BAM_RSEQC.out.innerdistance_rscript >> 'align-rseqc-innerdistance'
BAM_RSEQC.out.tin_txt >> 'align-rseqc-tin'

// TODO: !params.skip_alignment && params.aligner == 'hisat2'
// FASTQ_ALIGN_HISAT2.out.summary >> 'align-hisat2-log'
// FASTQ_ALIGN_HISAT2.out.orig_bam >> 'align-hisat2-intermeds'
// FASTQ_ALIGN_HISAT2.out.fastq >> 'align-hisat2-unaligned'

// TODO: params.trimmer == 'fastp'
// FASTQ_FASTQC_UMITOOLS_FASTP.out.fastqc_trim_html >> 'trim-fastqc'
// FASTQ_FASTQC_UMITOOLS_FASTP.out.fastqc_trim_zip >> 'trim-fastqc'
// FASTQ_FASTQC_UMITOOLS_FASTP.out.trim_json >> 'trim'
// FASTQ_FASTQC_UMITOOLS_FASTP.out.trim_html >> 'trim'
// FASTQ_FASTQC_UMITOOLS_FASTP.out.trim_log >> 'trim-log'
// // FASTQ_FASTQC_UMITOOLS_FASTP.out.trim_reads >> 'trim-intermeds'
// FASTQ_FASTQC_UMITOOLS_FASTP.out.trim_reads_fail >> 'trim-intermeds'
// FASTQ_FASTQC_UMITOOLS_FASTP.out.trim_reads_merged >> 'trim-intermeds'
// FASTQ_FASTQC_UMITOOLS_FASTP.out.umi_log >> 'umitools'
// // FASTQ_FASTQC_UMITOOLS_FASTP.out.umi_reads >> 'umitools-intermeds'

// TODO: params.trimmer == 'trimgalore'
FASTQ_FASTQC_UMITOOLS_TRIMGALORE.out.trim_html >> 'trim-fastqc'
FASTQ_FASTQC_UMITOOLS_TRIMGALORE.out.trim_zip >> 'trim-fastqc'
FASTQ_FASTQC_UMITOOLS_TRIMGALORE.out.trim_log >> 'trim'
// FASTQ_FASTQC_UMITOOLS_TRIMGALORE.out.trim_reads >> 'trim-intermeds'
FASTQ_FASTQC_UMITOOLS_TRIMGALORE.out.umi_log >> 'umitools'
// FASTQ_FASTQC_UMITOOLS_TRIMGALORE.out.umi_reads >> 'umitools-intermeds'

emit:
multiqc_report = ch_multiqc_report // channel: /path/to/multiqc_report.html
versions = ch_versions // channel: [ path(versions.yml) ]
Expand Down