Skip to content

Commit

Permalink
Refactor ext config as process inputs
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Sherman <[email protected]>
  • Loading branch information
bentsherman committed Apr 22, 2024
1 parent 3ee5753 commit 4252806
Show file tree
Hide file tree
Showing 24 changed files with 72 additions and 102 deletions.
2 changes: 2 additions & 0 deletions modules/local/bedtools_genomecov/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ process BEDTOOLS_GENOMECOV {
'https://depot.galaxyproject.org/singularity/bedtools:2.30.0--hc088bd4_0' :
'biocontainers/bedtools:2.30.0--hc088bd4_0' }"

ext args: '-split -du'

input:
tuple val(meta), path(bam)

Expand Down
8 changes: 0 additions & 8 deletions modules/local/bedtools_genomecov/nextflow.config

This file was deleted.

17 changes: 17 additions & 0 deletions modules/local/star_align_igenomes/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,30 @@ process STAR_ALIGN_IGENOMES {
'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:59cdd445419f14abac76b31dd0d71217994cbcc9-0' :
'biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:59cdd445419f14abac76b31dd0d71217994cbcc9-0' }"

ext args: { [
'--quantMode TranscriptomeSAM',
'--twopassMode Basic',
'--outSAMtype BAM Unsorted',
'--readFilesCommand zcat',
'--runRNGseed 0',
'--outFilterMultimapNmax 20',
'--alignSJDBoverhangMin 1',
'--outSAMattributes NH HI AS NM MD',
'--quantTranscriptomeBan Singleend',
'--outSAMstrandField intronMotif',
save_unaligned ? '--outReadsUnmapped Fastx' : '',
extra_args ? extra_args.split("\\s(?=--)") : ''
].flatten().unique(false).join(' ').trim() }

input:
tuple val(meta), path(reads)
tuple val(meta2), path(index)
tuple val(meta3), path(gtf)
val star_ignore_sjdbgtf
val seq_platform
val seq_center
val save_unaligned
val extra_args

output:
tuple val(meta), path('*d.out.bam') , emit: bam
Expand Down
2 changes: 2 additions & 0 deletions modules/nf-core/bbmap/bbsplit/main.nf

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

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

This file was deleted.

2 changes: 1 addition & 1 deletion modules/nf-core/gffread/main.nf

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

4 changes: 4 additions & 0 deletions modules/nf-core/multiqc/main.nf

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

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

This file was deleted.

2 changes: 2 additions & 0 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.

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

This file was deleted.

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

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

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

This file was deleted.

17 changes: 17 additions & 0 deletions modules/nf-core/star/align/main.nf

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

6 changes: 6 additions & 0 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.

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

This file was deleted.

8 changes: 8 additions & 0 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.

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

This file was deleted.

2 changes: 2 additions & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ params {
igenomes_base = 's3://ngi-igenomes/igenomes'
igenomes_ignore = false

gffread_args = '--keep-exon-attrs -F -T'

// UMI handling
with_umi = false
skip_umi_extract = false
Expand Down
4 changes: 2 additions & 2 deletions subworkflows/local/align_star/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ workflow ALIGN_STAR {
ch_fastq = Channel.empty()
ch_tab = Channel.empty()
if (is_aws_igenome) {
STAR_ALIGN_IGENOMES ( reads, index, gtf, star_ignore_sjdbgtf, seq_platform, seq_center )
STAR_ALIGN_IGENOMES ( reads, index, gtf, star_ignore_sjdbgtf, seq_platform, seq_center, params.save_unaligned, params.extra_star_align_args )
ch_orig_bam = STAR_ALIGN_IGENOMES.out.bam
ch_log_final = STAR_ALIGN_IGENOMES.out.log_final
ch_log_out = STAR_ALIGN_IGENOMES.out.log_out
Expand All @@ -44,7 +44,7 @@ workflow ALIGN_STAR {
ch_tab = STAR_ALIGN_IGENOMES.out.tab
ch_versions = ch_versions.mix(STAR_ALIGN_IGENOMES.out.versions.first())
} else {
STAR_ALIGN ( reads, index, gtf, star_ignore_sjdbgtf, seq_platform, seq_center )
STAR_ALIGN ( reads, index, gtf, star_ignore_sjdbgtf, seq_platform, seq_center, params.save_unaligned, params.extra_star_align_args )
ch_orig_bam = STAR_ALIGN.out.bam
ch_log_final = STAR_ALIGN.out.log_final
ch_log_out = STAR_ALIGN.out.log_out
Expand Down
20 changes: 0 additions & 20 deletions subworkflows/local/align_star/nextflow.config

This file was deleted.

2 changes: 1 addition & 1 deletion subworkflows/local/prepare_genome/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ workflow PREPARE_GENOME {
} else {
ch_gff = Channel.value(file(gff))
}
ch_gtf = GFFREAD ( ch_gff ).gtf
ch_gtf = GFFREAD ( ch_gff, params.gffread_args ?: '' ).gtf
ch_versions = ch_versions.mix(GFFREAD.out.versions)
}

Expand Down
4 changes: 0 additions & 4 deletions subworkflows/local/prepare_genome/nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ process {
ext.args2 = '--no-same-owner'
}

withName: 'GFFREAD' {
ext.args = '--keep-exon-attrs -F -T'
}

withName: 'SALMON_INDEX' {
ext.args = { [
params.gencode ? '--gencode' : '',
Expand Down
8 changes: 6 additions & 2 deletions workflows/rnaseq/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,8 @@ workflow RNASEQ {
if (!params.skip_alignment && !params.skip_stringtie) {
STRINGTIE_STRINGTIE (
ch_genome_bam,
ch_gtf
ch_gtf,
params.stringtie_ignore_gtf
)
ch_versions = ch_versions.mix(STRINGTIE_STRINGTIE.out.versions.first())
}
Expand All @@ -600,7 +601,9 @@ workflow RNASEQ {
.set { ch_featurecounts }

SUBREAD_FEATURECOUNTS (
ch_featurecounts
ch_featurecounts,
biotype,
params.featurecounts_feature_type
)
ch_versions = ch_versions.mix(SUBREAD_FEATURECOUNTS.out.versions.first())

Expand Down Expand Up @@ -777,6 +780,7 @@ workflow RNASEQ {
ch_multiqc_files.collect(),
ch_multiqc_config.toList(),
ch_multiqc_custom_config.toList(),
params.multiqc_title,
ch_multiqc_logo.toList()
)
ch_multiqc_report = MULTIQC.out.report
Expand Down
8 changes: 0 additions & 8 deletions workflows/rnaseq/nextflow.config
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
includeConfig "../../modules/local/bedtools_genomecov/nextflow.config"
includeConfig "../../modules/nf-core/bbmap/bbsplit/nextflow.config"
includeConfig "../../modules/nf-core/multiqc/nextflow.config"
includeConfig "../../modules/nf-core/preseq/lcextrap/nextflow.config"
includeConfig "../../modules/nf-core/sortmerna/nextflow.config"
includeConfig "../../modules/nf-core/stringtie/stringtie/nextflow.config"
includeConfig "../../modules/nf-core/subread/featurecounts/nextflow.config"
includeConfig "../../subworkflows/local/align_star/nextflow.config"
includeConfig "../../subworkflows/local/quantify_rsem/nextflow.config"
includeConfig "../../subworkflows/nf-core/bam_markduplicates_picard/nextflow.config"
includeConfig "../../subworkflows/nf-core/fastq_align_hisat2/nextflow.config"
Expand Down

0 comments on commit 4252806

Please sign in to comment.