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 17 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 4 commits
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
3 changes: 0 additions & 3 deletions modules/local/bedtools_genomecov/nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ if (!params.skip_alignment && !params.skip_bigwig) {
process {
withName: 'BEDTOOLS_GENOMECOV' {
ext.args = '-split -du'
publishDir = [
enabled: false
]
}
}
}
35 changes: 0 additions & 35 deletions modules/local/dupradar/nextflow.config

This file was deleted.

13 changes: 0 additions & 13 deletions modules/local/multiqc_custom_biotype/nextflow.config

This file was deleted.

13 changes: 0 additions & 13 deletions modules/nf-core/bbmap/bbsplit/nextflow.config

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

9 changes: 0 additions & 9 deletions modules/nf-core/cat/fastq/nextflow.config

This file was deleted.

8 changes: 0 additions & 8 deletions modules/nf-core/multiqc/nextflow.config

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

12 changes: 0 additions & 12 deletions modules/nf-core/preseq/lcextrap/nextflow.config

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

13 changes: 0 additions & 13 deletions modules/nf-core/qualimap/rnaseq/nextflow.config

This file was deleted.

13 changes: 0 additions & 13 deletions modules/nf-core/sortmerna/nextflow.config

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

5 changes: 0 additions & 5 deletions modules/nf-core/stringtie/stringtie/nextflow.config

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

13 changes: 0 additions & 13 deletions modules/nf-core/subread/featurecounts/nextflow.config

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

9 changes: 0 additions & 9 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,6 @@ params {

}

// Default publishing logic for pipeline
process {
publishDir = [
path: { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

// Load base.config by default for all pipelines
includeConfig 'conf/base.config'

Expand Down
19 changes: 0 additions & 19 deletions subworkflows/local/align_star/nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,6 @@ if (!params.skip_alignment && params.aligner == 'star_salmon') {
params.save_unaligned ? '--outReadsUnmapped Fastx' : '',
params.extra_star_align_args ? params.extra_star_align_args.split("\\s(?=--)") : ''
].flatten().unique(false).join(' ').trim() }
publishDir = [
[
path: { "${params.outdir}/${params.aligner}/log" },
mode: params.publish_dir_mode,
pattern: '*.{out,tab}'
],
[
path: { params.save_align_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir },
mode: params.publish_dir_mode,
pattern: '*.bam',
saveAs: { params.save_align_intermeds ? it : null }
],
[
path: { params.save_unaligned ? "${params.outdir}/${params.aligner}/unmapped" : params.outdir },
mode: params.publish_dir_mode,
pattern: '*.fastq.gz',
saveAs: { params.save_unaligned ? it : null }
]
]
}
}
}
25 changes: 25 additions & 0 deletions subworkflows/local/prepare_genome/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -343,3 +343,28 @@ 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
}
}
78 changes: 0 additions & 78 deletions subworkflows/local/prepare_genome/nextflow.config
Original file line number Diff line number Diff line change
@@ -1,114 +1,36 @@
process {
withName: 'GUNZIP_.*|MAKE_TRANSCRIPTS_FASTA' {
publishDir = [
path: { params.save_reference ? "${params.outdir}/genome" : params.outdir },
mode: params.publish_dir_mode,
saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null }
]
}

withName: 'UNTAR_.*' {
ext.args2 = '--no-same-owner'
}

withName: 'UNTAR_.*|STAR_GENOMEGENERATE|STAR_GENOMEGENERATE_IGENOMES|HISAT2_BUILD' {
publishDir = [
path: { params.save_reference ? "${params.outdir}/genome/index" : params.outdir },
mode: params.publish_dir_mode,
saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null }
]
}

withName: 'GFFREAD' {
ext.args = '--keep-exon-attrs -F -T'
publishDir = [
path: { params.save_reference ? "${params.outdir}/genome" : params.outdir },
mode: params.publish_dir_mode,
saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null }
]
}

withName: 'HISAT2_EXTRACTSPLICESITES' {
publishDir = [
path: { params.save_reference ? "${params.outdir}/genome/index" : params.outdir },
mode: params.publish_dir_mode,
saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null }
]
}

withName: 'SALMON_INDEX' {
ext.args = { [
params.gencode ? '--gencode' : '',
params.pseudo_aligner_kmer_size ? "-k ${params.pseudo_aligner_kmer_size}": ''
].join(' ').trim() }
publishDir = [
path: { params.save_reference ? "${params.outdir}/genome/index" : params.outdir },
mode: params.publish_dir_mode,
saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null }
]
}

withName: 'KALLISTO_INDEX' {
ext.args = params.pseudo_aligner_kmer_size ? "-k ${params.pseudo_aligner_kmer_size}" : ''
publishDir = [
path: { params.save_reference ? "${params.outdir}/genome/index" : params.outdir },
mode: params.publish_dir_mode,
saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null }
]
}

withName: 'RSEM_PREPAREREFERENCE_GENOME' {
ext.args = '--star'
publishDir = [
path: { params.save_reference ? "${params.outdir}/genome/index" : params.outdir },
mode: params.publish_dir_mode,
saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null }
]
}

withName: 'GTF2BED' {
publishDir = [
path: { params.save_reference ? "${params.outdir}/genome" : params.outdir },
mode: params.publish_dir_mode,
saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null }
]
}

withName: 'CAT_ADDITIONAL_FASTA|PREPROCESS_TRANSCRIPTS_FASTA_GENCODE' {
publishDir = [
path: { params.save_reference ? "${params.outdir}/genome" : params.outdir },
mode: params.publish_dir_mode,
saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null }
]
}

withName: 'GTF_FILTER' {
ext.args = { params.skip_gtf_transcript_filter ?: '--skip_transcript_id_check' }
publishDir = [
path: { params.save_reference ? "${params.outdir}/genome" : params.outdir },
mode: params.publish_dir_mode,
saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null }
]
}

withName: 'CUSTOM_GETCHROMSIZES' {
publishDir = [
path: { params.save_reference ? "${params.outdir}/genome" : params.outdir },
mode: params.publish_dir_mode,
saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null }
]
}
}

if (!params.skip_bbsplit && params.bbsplit_fasta_list) {
process {
withName: 'PREPARE_GENOME:BBMAP_BBSPLIT' {
ext.args = 'build=1'
publishDir = [
path: { params.save_reference ? "${params.outdir}/genome/index" : params.outdir },
mode: params.publish_dir_mode,
saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null }
]
}
}
}
Loading