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 output definition to top-level workflow
Signed-off-by: Ben Sherman <[email protected]>
  • Loading branch information
bentsherman committed Apr 6, 2024
commit 69f258e079905d56863f90c7ac6a03202a7ded0a
234 changes: 234 additions & 0 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,240 @@ workflow {
)
}

output {
directory params.outdir, mode: params.publish_dir_mode

//
// Genome preparation
//
'genome' {
enabled params.save_reference
from 'genome'
}

'genome/index' {
enabled params.save_reference
from 'genome-index'
}

//
// Alignment
//
"${params.aligner}" {
from 'align'

'samtools_stats' {
from 'align-samtools-stats'
}

'umitools' {
from 'align-umitools'
}
}

"${params.aligner}" {
enabled params.save_align_intermeds || params.save_umi_intermeds
from 'align-intermeds'

'samtools_stats' {
from 'align-intermeds-samtools-stats'
}
'umitools/log' {
from 'align-intermeds-umitools-log'
}
}

//
// bigWig coverage
//
"${params.aligner}/bigwig" {
from 'align-bigwig'
}

//
// DESeq2 QC
//
"${params.aligner}/deseq2_qc" {
from 'align-deseq2'
}

//
// Pseudo-alignment
//
"${params.pseudo_aligner}" {
from 'pseudo-align'
// TODO: process 'QUANTIFY_PSEUDO_ALIGNMENT:CUSTOM_TX2GENE'

'deseq2_qc' {
from 'pseudo-align-deseq2'
}
}

// modules/local/dupradar
"${params.aligner}/dupradar" {
'scatter_plot' {
from 'align-dupradar', pattern: "*Dens.pdf"
}
'box_plot' {
from 'align-dupradar', pattern: "*Boxplot.pdf"
}
'histogram' {
from 'align-dupradar', pattern: "*Hist.pdf"
}
'gene_data' {
from 'align-dupradar', pattern: "*Matrix.txt"
}
'intercepts_slope' {
from 'align-dupradar', pattern: "*slope.txt"
}
}

// modules/nf-core/bbmap/bbsplit
'bbsplit' {
from 'bbsplit'
from 'bbsplit-intermeds', enabled: params.save_bbsplit_reads
}

// modules/nf-core/cat/fastq
'fastq' {
enabled params.save_merged_fastq
from 'merged-fastq'
}

// modules/nf-core/multiqc
def multiqc_path = params.skip_alignment
? 'multiqc'
: "multiqc/${params.aligner}"

"${multiqc_path}" {
from 'multiqc'
}

// modules/nf-core/preseq/lcextrap
"${params.aligner}" {
'preseq' {
from 'preseq'
}
'preseq/log' {
from 'preseq-log'
}
}

// modules/nf-core/qualimap/rnaseq
"${params.aligner}/qualimap" {
from 'qualimap'
}

// modules/nf-core/sortmerna
'sortmerna' {
from 'sortmerna'
from 'sortmerna-intermeds', enabled: params.save_non_ribo_reads
}

// modules/nf-core/stringtie/stringtie
"${params.aligner}/stringtie" {
from 'align-stringtie'
}

// modules/nf-core/subread/featurecounts
"${params.aligner}/featurecounts" {
from 'align-featurecounts'
}

// subworkflows/local/align_star
"${params.aligner}" {
'log' {
from 'align-star-log'
}

from 'align-star-intermeds'

'unmapped' {
from 'align-star-unaligned'
}
}

// subworkflows/local/quantify_rsem
"${params.aligner}" {
from 'quantify-rsem'
from 'quantify-rsem-intermeds', enabled: params.save_align_intermeds

'log' {
from 'quantify-rsem-log'
}
}

// subworkflows/nf-core/bam_markduplicates_picard
"${params.aligner}" {
from 'align-picard'
'picard_metrics' {
from 'align-picard-metrics'
}
'samtools_stats' {
from 'align-picard-stats'
}
}

// subworkflows/nf-core/bam_rseqc
"${params.aligner}/rseqc" {
'bam_stat' {
from 'align-rseqc-bamstat'
}
'infer_experiment' {
from 'align-rseqc-inferexperiment'
}
'junction_annotation' {
from 'align-rseqc-junctionannotation'
}
'junction_saturation' {
from 'align-rseqc-junctionsaturation'
}
'read_duplication' {
from 'align-rseqc-readduplication'
}
'read_distribution' {
from 'align-rseqc-readdistribution'
}
'inner_distance' {
from 'align-rseqc-innerdistance'
}
'tin' {
from 'align-rseqc-tin'
}
}

// subworkflows/nf-core/fastq_align_hisat2
"${params.aligner}" {
'log' {
from 'align-hisat2-log'
}

from 'align-hisat2-intermeds', enabled: params.save_align_intermeds

'unmapped' {
from 'align-hisat2-unaligned', enabled: params.save_unaligned
}
}

// subworkflows/nf-core/fastq_fastqc_umitools_fastp
// subworkflows/nf-core/fastq_fastqc_umitools_trimgalore
"${params.trimmer}" {
'fastqc' {
from 'trim-fastqc'
}
from 'trim'
'log' {
from 'trim-log'
}
from 'trim-intermeds', enabled: params.save_trimmed
}

'umitools' {
from 'umitools'
from 'umitools-intermeds', enabled: params.save_umi_intermeds
}
}

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
THE END
Expand Down
42 changes: 17 additions & 25 deletions subworkflows/local/prepare_genome/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,23 @@ workflow PREPARE_GENOME {
}
}

topic:
ch_fasta >> 'genome'
ch_gtf >> 'genome'
ch_gff >> 'genome'
ch_add_fasta >> 'genome'
ch_gene_bed >> 'genome'
ch_transcript_fasta >> 'genome'
ch_fai >> 'genome'
ch_sizes >> 'genome'
ch_splicesites >> 'genome-index'
ch_bbsplit_index >> 'genome-index'
ch_star_index >> 'genome-index'
ch_rsem_index >> 'genome-index'
ch_hisat2_index >> 'genome-index'
ch_salmon_index >> 'genome-index'
ch_kallisto_index >> 'genome-index'

emit:
fasta = ch_fasta // channel: path(genome.fasta)
gtf = ch_gtf // channel: path(genome.gtf)
Expand All @@ -343,28 +360,3 @@ workflow PREPARE_GENOME {
kallisto_index = ch_kallisto_index // channel: [ meta, path(kallisto/index/) ]
versions = ch_versions.ifEmpty(null) // channel: [ versions.yml ]
}

output {
directory params.outdir, mode: params.publish_dir_mode, enabled: params.save_reference

'genome' {
from PREPARE_GENOME.out.fasta
from PREPARE_GENOME.out.gtf
// from PREPARE_GENOME.out.gff
// from PREPARE_GENOME.out.add_fasta
from PREPARE_GENOME.out.gene_bed
from PREPARE_GENOME.out.transcript_fasta
from PREPARE_GENOME.out.fai
// from PREPARE_GENOME.out.sizes
}

'genome/index' {
from PREPARE_GENOME.out.splicesites
from PREPARE_GENOME.out.bbsplit_index
from PREPARE_GENOME.out.star_index
from PREPARE_GENOME.out.rsem_index
from PREPARE_GENOME.out.hisat2_index
from PREPARE_GENOME.out.salmon_index
from PREPARE_GENOME.out.kallisto_index
}
}

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

Loading