From cc63dff641d04da8c0fff0cea31d903a918de2b3 Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Thu, 4 Jan 2024 12:01:45 +0000 Subject: [PATCH 1/6] Disable additional multiqc versions section --- assets/multiqc_config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml index 16bf186b3..3dfec8dcb 100644 --- a/assets/multiqc_config.yml +++ b/assets/multiqc_config.yml @@ -9,6 +9,7 @@ report_section_order: order: -1002 export_plots: true +disable_version_detection: true # Run only these modules run_modules: From e86ea029b8e34e0e9a50fb7e90024ac14e147719 Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Thu, 4 Jan 2024 14:58:35 +0000 Subject: [PATCH 2/6] Defer strand inference until after trimming and filtering --- workflows/rnaseq.nf | 95 +++++++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 47 deletions(-) diff --git a/workflows/rnaseq.nf b/workflows/rnaseq.nf index f8def2d10..178d9003a 100755 --- a/workflows/rnaseq.nf +++ b/workflows/rnaseq.nf @@ -244,47 +244,6 @@ workflow RNASEQ { .set { ch_cat_fastq } ch_versions = ch_versions.mix(CAT_FASTQ.out.versions.first().ifEmpty(null)) - // Branch FastQ channels if 'auto' specified to infer strandedness - ch_cat_fastq - .branch { - meta, fastq -> - auto_strand : meta.strandedness == 'auto' - return [ meta, fastq ] - known_strand: meta.strandedness != 'auto' - return [ meta, fastq ] - } - .set { ch_strand_fastq } - - // - // SUBWORKFLOW: Sub-sample FastQ files and pseudoalign with Salmon to auto-infer strandedness - // - // Return empty channel if ch_strand_fastq.auto_strand is empty so salmon index isn't created - PREPARE_GENOME.out.fasta - .combine(ch_strand_fastq.auto_strand) - .map { it.first() } - .first() - .set { ch_genome_fasta } - - FASTQ_SUBSAMPLE_FQ_SALMON ( - ch_strand_fastq.auto_strand, - ch_genome_fasta, - PREPARE_GENOME.out.transcript_fasta, - PREPARE_GENOME.out.gtf, - PREPARE_GENOME.out.salmon_index, - !params.salmon_index && !('salmon' in prepareToolIndices) - ) - ch_versions = ch_versions.mix(FASTQ_SUBSAMPLE_FQ_SALMON.out.versions) - - FASTQ_SUBSAMPLE_FQ_SALMON - .out - .json_info - .join(ch_strand_fastq.auto_strand) - .map { meta, json, reads -> - return [ meta + [ strandedness: WorkflowRnaseq.getSalmonInferredStrandedness(json) ], reads ] - } - .mix(ch_strand_fastq.known_strand) - .set { ch_strand_inferred_fastq } - // // SUBWORKFLOW: Read QC, extract UMI and trim adapters with TrimGalore! // @@ -295,7 +254,7 @@ workflow RNASEQ { ch_trim_read_count = Channel.empty() if (params.trimmer == 'trimgalore') { FASTQ_FASTQC_UMITOOLS_TRIMGALORE ( - ch_strand_inferred_fastq, + ch_cat_fastq, params.skip_fastqc || params.skip_qc, params.with_umi, params.skip_umi_extract, @@ -316,7 +275,7 @@ workflow RNASEQ { // if (params.trimmer == 'fastp') { FASTQ_FASTQC_UMITOOLS_FASTP ( - ch_strand_inferred_fastq, + ch_cat_fastq, params.skip_fastqc || params.skip_qc, params.with_umi, params.skip_umi_extract, @@ -388,6 +347,48 @@ workflow RNASEQ { ch_sortmerna_multiqc = SORTMERNA.out.log ch_versions = ch_versions.mix(SORTMERNA.out.versions.first()) } + + // + // SUBWORKFLOW: Sub-sample FastQ files and pseudoalign with Salmon to auto-infer strandedness + // + + // Branch FastQ channels if 'auto' specified to infer strandedness + ch_filtered_reads + .branch { + meta, fastq -> + auto_strand : meta.strandedness == 'auto' + return [ meta, fastq ] + known_strand: meta.strandedness != 'auto' + return [ meta, fastq ] + } + .set { ch_strand_fastq } + + // Return empty channel if ch_strand_fastq.auto_strand is empty so salmon index isn't created + PREPARE_GENOME.out.fasta + .combine(ch_strand_fastq.auto_strand) + .map { it.first() } + .first() + .set { ch_genome_fasta } + + FASTQ_SUBSAMPLE_FQ_SALMON ( + ch_strand_fastq.auto_strand, + ch_genome_fasta, + PREPARE_GENOME.out.transcript_fasta, + PREPARE_GENOME.out.gtf, + PREPARE_GENOME.out.salmon_index, + !params.salmon_index && !('salmon' in prepareToolIndices) + ) + ch_versions = ch_versions.mix(FASTQ_SUBSAMPLE_FQ_SALMON.out.versions) + + FASTQ_SUBSAMPLE_FQ_SALMON + .out + .json_info + .join(ch_strand_fastq.auto_strand) + .map { meta, json, reads -> + return [ meta + [ strandedness: WorkflowRnaseq.getSalmonInferredStrandedness(json) ], reads ] + } + .mix(ch_strand_fastq.known_strand) + .set { ch_strand_inferred_filtered_fastq } // // SUBWORKFLOW: Alignment with STAR and gene/transcript quantification with Salmon @@ -402,7 +403,7 @@ workflow RNASEQ { ch_aligner_clustering_multiqc = Channel.empty() if (!params.skip_alignment && params.aligner == 'star_salmon') { ALIGN_STAR ( - ch_filtered_reads, + ch_strand_inferred_filtered_fastq, PREPARE_GENOME.out.star_index.map { [ [:], it ] }, PREPARE_GENOME.out.gtf.map { [ [:], it ] }, params.star_ignore_sjdbgtf, @@ -521,7 +522,7 @@ workflow RNASEQ { ch_rsem_multiqc = Channel.empty() if (!params.skip_alignment && params.aligner == 'star_rsem') { QUANTIFY_RSEM ( - ch_filtered_reads, + ch_strand_inferred_filtered_fastq, PREPARE_GENOME.out.rsem_index, PREPARE_GENOME.out.fasta.map { [ [:], it ] } ) @@ -555,7 +556,7 @@ workflow RNASEQ { ch_hisat2_multiqc = Channel.empty() if (!params.skip_alignment && params.aligner == 'hisat2') { FASTQ_ALIGN_HISAT2 ( - ch_filtered_reads, + ch_strand_inferred_filtered_fastq, PREPARE_GENOME.out.hisat2_index.map { [ [:], it ] }, PREPARE_GENOME.out.splicesites.map { [ [:], it ] }, PREPARE_GENOME.out.fasta.map { [ [:], it ] } @@ -826,7 +827,7 @@ workflow RNASEQ { } QUANTIFY_PSEUDO_ALIGNMENT ( - ch_filtered_reads, + ch_strand_inferred_filtered_fastq, ch_pseudo_index, ch_dummy_file, PREPARE_GENOME.out.gtf, From 282e972219d55fbd921639dd2bdf3db80de52c0f Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Thu, 4 Jan 2024 16:53:15 +0000 Subject: [PATCH 3/6] [skip ci] bump versions --- CHANGELOG.md | 2 +- assets/multiqc_config.yml | 2 +- nextflow.config | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8614fd74e..13d46a64a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## v3.14.0dev - [date] +## v3.14.0 - 2024-01-05 ### Credits diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml index 3dfec8dcb..e738f4854 100644 --- a/assets/multiqc_config.yml +++ b/assets/multiqc_config.yml @@ -1,5 +1,5 @@ report_comment: > - This report has been generated by the nf-core/rnaseq analysis pipeline. For information about how to interpret these results, please see the documentation. + This report has been generated by the nf-core/rnaseq analysis pipeline. For information about how to interpret these results, please see the documentation. report_section_order: "nf-core-rnaseq-methods-description": order: -1000 diff --git a/nextflow.config b/nextflow.config index 9a4276636..f4d9f87e2 100644 --- a/nextflow.config +++ b/nextflow.config @@ -322,7 +322,7 @@ manifest { description = """RNA sequencing analysis pipeline for gene/isoform quantification and extensive quality control.""" mainScript = 'main.nf' nextflowVersion = '!>=23.04.0' - version = '3.14.0dev' + version = '3.14.0' doi = 'https://doi.org/10.5281/zenodo.1400710' } From 213d904a320abaa1199b52c2edacd8e3346fafb0 Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Thu, 4 Jan 2024 18:18:54 +0000 Subject: [PATCH 4/6] Fix conditional publishing to avoid empty dirs --- conf/modules.config | 97 ++++++++++++++++++++++++--------------------- 1 file changed, 51 insertions(+), 46 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 466521922..1257ea68c 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -39,9 +39,9 @@ process { process { withName: 'GUNZIP_.*|MAKE_TRANSCRIPTS_FASTA' { publishDir = [ - path: { "${params.outdir}/genome" }, + path: { params.save_reference ? "${params.outdir}/genome" : params.outdir }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : params.save_reference ? filename : null } + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } ] } @@ -51,26 +51,26 @@ process { withName: 'UNTAR_.*|STAR_GENOMEGENERATE|STAR_GENOMEGENERATE_IGENOMES|HISAT2_BUILD' { publishDir = [ - path: { "${params.outdir}/genome/index" }, + path: { params.save_reference ? "${params.outdir}/genome/index" : params.outdir }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : params.save_reference ? filename : null } + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } ] } withName: 'GFFREAD' { ext.args = '--keep-exon-attrs -F -T' publishDir = [ - path: { "${params.outdir}/genome" }, + path: { params.save_reference ? "${params.outdir}/genome" : params.outdir }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : params.save_reference ? filename : null } + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } ] } withName: 'HISAT2_EXTRACTSPLICESITES' { publishDir = [ - path: { "${params.outdir}/genome/index" }, + path: { params.save_reference ? "${params.outdir}/genome/index" : params.outdir }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : params.save_reference ? filename : null } + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } ] } @@ -80,68 +80,68 @@ process { params.pseudo_aligner_kmer_size ? "-k ${params.pseudo_aligner_kmer_size}": '' ].join(' ').trim() } publishDir = [ - path: { "${params.outdir}/genome/index" }, + path: { params.save_reference ? "${params.outdir}/genome/index" : params.outdir }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : params.save_reference ? filename : null } + 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.outdir}/genome/index" }, + path: { params.save_reference ? "${params.outdir}/genome/index" : params.outdir }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : params.save_reference ? filename : null } + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } ] } withName: 'RSEM_PREPAREREFERENCE_GENOME' { ext.args = '--star' publishDir = [ - path: { "${params.outdir}/genome/index" }, + path: { params.save_reference ? "${params.outdir}/genome/index" : params.outdir }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : params.save_reference ? filename : null } + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } ] } withName: 'GTF2BED' { publishDir = [ - path: { "${params.outdir}/genome" }, + path: { params.save_reference ? "${params.outdir}/genome" : params.outdir }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : params.save_reference ? filename : null } + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } ] } withName: 'CAT_ADDITIONAL_FASTA|PREPROCESS_TRANSCRIPTS_FASTA_GENCODE' { publishDir = [ - path: { "${params.outdir}/genome" }, + path: { params.save_reference ? "${params.outdir}/genome" : params.outdir }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : params.save_reference ? filename : null } + 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.outdir}/genome" }, + path: { params.save_reference ? "${params.outdir}/genome" : params.outdir }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : params.save_reference ? filename : null } + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } ] } withName: 'CUSTOM_GETCHROMSIZES' { publishDir = [ - path: { "${params.outdir}/genome" }, + path: { params.save_reference ? "${params.outdir}/genome" : params.outdir }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : params.save_reference ? filename : null } + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } ] } withName: 'CAT_FASTQ' { publishDir = [ - path: { "${params.outdir}/fastq" }, + path: { params.save_merged_fastq ? "${params.outdir}/fastq" : params.outdir }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : params.save_merged_fastq ? filename : null } + saveAs: { filename -> (filename.endsWith('.fastq.gz') && params.save_merged_fastq) ? filename : null } ] } } @@ -151,9 +151,9 @@ if (!params.skip_bbsplit && params.bbsplit_fasta_list) { withName: '.*:PREPARE_GENOME:BBMAP_BBSPLIT' { ext.args = 'build=1' publishDir = [ - path: { "${params.outdir}/genome/index" }, + path: { params.save_reference ? "${params.outdir}/genome/index" : params.outdir }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : params.save_reference ? filename : null } + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } ] } } @@ -228,7 +228,7 @@ if (!params.skip_trimming) { pattern: "*.{html,zip}" ], [ - path: { "${params.outdir}/${params.trimmer}" }, + path: { params.save_trimmed ? "${params.outdir}/${params.trimmer}" : params.outdir }, mode: params.publish_dir_mode, pattern: "*.fq.gz", saveAs: { params.save_trimmed ? it : null } @@ -259,7 +259,7 @@ if (!params.skip_trimming) { pattern: "*.log" ], [ - path: { "${params.outdir}/${params.trimmer}" }, + path: { params.save_trimmed ? "${params.outdir}/${params.trimmer}" : params.outdir }, mode: params.publish_dir_mode, pattern: "*.fastq.gz", saveAs: { params.save_trimmed ? it : null } @@ -286,7 +286,7 @@ if (params.with_umi && !params.skip_umi_extract) { pattern: "*.log" ], [ - path: { "${params.outdir}/umitools" }, + path: { params.save_umi_intermeds ? "${params.outdir}/umitools" : params.outdir }, mode: params.publish_dir_mode, pattern: "*.fastq.gz", saveAs: { params.save_umi_intermeds ? it : null } @@ -311,7 +311,7 @@ if (!params.skip_bbsplit) { pattern: '*.txt' ], [ - path: { "${params.outdir}/bbsplit" }, + path: { params.save_bbsplit_reads ? "${params.outdir}/bbsplit" : params.outdir }, mode: params.publish_dir_mode, pattern: '*.fastq.gz', saveAs: { params.save_bbsplit_reads ? it : null } @@ -332,7 +332,7 @@ if (params.remove_ribo_rna) { pattern: "*.log" ], [ - path: { "${params.outdir}/sortmerna" }, + path: { params.save_non_ribo_reads ? "${params.outdir}/sortmerna" : params.outdir }, mode: params.publish_dir_mode, pattern: "*.fastq.gz", saveAs: { params.save_non_ribo_reads ? it : null } @@ -360,7 +360,9 @@ if (!params.skip_alignment) { withName: 'NFCORE_RNASEQ:RNASEQ:.*:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_SORT' { ext.prefix = { "${meta.id}.sorted" } publishDir = [ - path: { "${params.outdir}/${params.aligner}" }, + path: { ( ['star_salmon','hisat2'].contains(params.aligner) && + ( params.save_align_intermeds || ( !params.with_umi && params.skip_markduplicates ) ) + ) || params.save_align_intermeds || params.skip_markduplicates ? "${params.outdir}/${params.aligner}" : params.outdir }, mode: params.publish_dir_mode, pattern: "*.bam", saveAs: { ( ['star_salmon','hisat2'].contains(params.aligner) && @@ -372,6 +374,9 @@ if (!params.skip_alignment) { withName: 'NFCORE_RNASEQ:RNASEQ:.*:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_INDEX' { ext.args = { params.bam_csi_index ? '-c' : '' } publishDir = [ + path: { ( ['star_salmon','hisat2'].contains(params.aligner) && + ( params.save_align_intermeds || ( !params.with_umi && params.skip_markduplicates ) ) + ) || params.save_align_intermeds || params.skip_markduplicates ? "${params.outdir}/${params.aligner}" : params.outdir }, path: { "${params.outdir}/${params.aligner}" }, mode: params.publish_dir_mode, pattern: "*.{bai,csi}", @@ -438,7 +443,7 @@ if (!params.skip_alignment) { pattern: '*.tsv' ], [ - path: { "${params.outdir}/${params.aligner}" }, + path: { params.save_align_intermeds || params.with_umi || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, mode: params.publish_dir_mode, pattern: '*.bam', saveAs: { params.save_align_intermeds || params.with_umi || params.save_umi_intermeds ? it : null } @@ -450,7 +455,7 @@ if (!params.skip_alignment) { ext.args = { params.bam_csi_index ? '-c' : '' } ext.prefix = { "${meta.id}.umi_dedup.sorted" } publishDir = [ - path: { "${params.outdir}/${params.aligner}" }, + path: { params.save_align_intermeds || params.with_umi || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, mode: params.publish_dir_mode, pattern: '*.{bai,csi}', saveAs: { params.save_align_intermeds || params.with_umi || params.save_umi_intermeds ? it : null } @@ -556,13 +561,13 @@ if (!params.skip_alignment && params.aligner == 'star_salmon') { pattern: '*.{out,tab}' ], [ - path: { "${params.outdir}/${params.aligner}" }, + 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.outdir}/${params.aligner}/unmapped" }, + 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 } @@ -611,7 +616,7 @@ if (!params.skip_alignment && params.aligner == 'star_salmon') { ext.args = '-n' ext.prefix = { "${meta.id}.umi_dedup.transcriptome" } publishDir = [ - path: { "${params.outdir}/${params.aligner}" }, + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, mode: params.publish_dir_mode, pattern: '*.bam', saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } @@ -627,7 +632,7 @@ if (!params.skip_alignment && params.aligner == 'star_salmon') { pattern: '*.log' ], [ - path: { "${params.outdir}/${params.aligner}" }, + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, mode: params.publish_dir_mode, pattern: '*.bam', saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } @@ -638,7 +643,7 @@ if (!params.skip_alignment && params.aligner == 'star_salmon') { withName: 'NFCORE_RNASEQ:RNASEQ:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_SORT' { ext.prefix = { "${meta.id}.transcriptome.sorted" } publishDir = [ - path: { "${params.outdir}/${params.aligner}" }, + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, mode: params.publish_dir_mode, pattern: '*.bam', saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } @@ -647,7 +652,7 @@ if (!params.skip_alignment && params.aligner == 'star_salmon') { withName: 'NFCORE_RNASEQ:RNASEQ:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_INDEX' { publishDir = [ - path: { "${params.outdir}/${params.aligner}" }, + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, mode: params.publish_dir_mode, pattern: '*.bai', saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } @@ -657,7 +662,7 @@ if (!params.skip_alignment && params.aligner == 'star_salmon') { withName: 'NFCORE_RNASEQ:RNASEQ:BAM_SORT_STATS_SAMTOOLS:BAM_STATS_SAMTOOLS:.*' { ext.prefix = { "${meta.id}.transcriptome.sorted.bam" } publishDir = [ - path: { "${params.outdir}/${params.aligner}/samtools_stats" }, + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, mode: params.publish_dir_mode, pattern: '*.{stats,flagstat,idxstats}', saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } @@ -678,7 +683,7 @@ if (!params.skip_alignment && params.aligner == 'star_salmon') { pattern: '*.tsv' ], [ - path: { "${params.outdir}/${params.aligner}" }, + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, mode: params.publish_dir_mode, pattern: '*.bam', saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } @@ -688,7 +693,7 @@ if (!params.skip_alignment && params.aligner == 'star_salmon') { withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_TRANSCRIPTOME:SAMTOOLS_INDEX' { publishDir = [ - path: { "${params.outdir}/${params.aligner}" }, + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, mode: params.publish_dir_mode, pattern: '*.bai', saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } @@ -747,7 +752,7 @@ if (!params.skip_alignment && params.aligner == 'star_rsem') { pattern: "*.{stat,results}" ], [ - path: { "${params.outdir}/${params.aligner}" }, + 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 } @@ -804,13 +809,13 @@ if (!params.skip_alignment && params.aligner == 'hisat2') { pattern: '*.log' ], [ - path: { "${params.outdir}/${params.aligner}" }, + 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.outdir}/${params.aligner}/unmapped" }, + 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 } From 7843299751f1a64fb3d5a526a06f22a2dcaec686 Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Thu, 4 Jan 2024 18:27:03 +0000 Subject: [PATCH 5/6] [skip ci] update changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 13d46a64a..8a066269d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,9 +22,10 @@ Special thanks to the following for their contributions to the release: - [PR #1135](https://github.com/nf-core/rnaseq/pull/1135) - Update [action-tower-launch](https://github.com/marketplace/actions/action-tower-launch) to v2 which supports more variable handling - [PR #1141](https://github.com/nf-core/rnaseq/pull/1141) - Important! Template update for nf-core/tools v2.11 - [PR #1143](https://github.com/nf-core/rnaseq/pull/1143) - Move fasta check back to Groovy ([#1142](https://github.com/nf-core/rnaseq/issues/1142)) -- [PR #1144](https://github.com/nf-core/rnaseq/pull/1144) - Interface to kmer size for pseudoaligners +- [PR #1144](https://github.com/nf-core/rnaseq/pull/1144) - Interface to kmer size for pseudoaligners ([#1111](https://github.com/nf-core/rnaseq/issues/1111)) - [PR #1149](https://github.com/nf-core/rnaseq/pull/1149) - Fix and patch version commands for Fastp, FastQC and UMI-tools modules ([#1103](https://github.com/nf-core/rnaseq/issues/1103)) - [PR #1150](https://github.com/nf-core/rnaseq/pull/1150) - Be more flexible on attribute values in GTFs ([#1132](https://github.com/nf-core/rnaseq/issues/1132)) +- [PR #1154](https://github.com/nf-core/rnaseq/pull/1154) - Prerelease 3.14.0 fixes ([#1111](https://github.com/nf-core/rnaseq/issues/1111), [#1153](https://github.com/nf-core/rnaseq/issues/1153)) ### Parameters From f06f298abe39a6efd5e1d2f31e7ea1e09911dd2e Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Fri, 5 Jan 2024 09:49:33 +0000 Subject: [PATCH 6/6] Apply suggestions from code review Co-authored-by: Harshil Patel --- CHANGELOG.md | 2 +- conf/modules.config | 3 +-- workflows/rnaseq.nf | 4 +++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 73b3e39ac..7a0938d17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## v3.14.0 - 2024-01-05 +## v3.14.0 - 2024-01-08 ### Credits diff --git a/conf/modules.config b/conf/modules.config index 1257ea68c..16d635cdb 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -377,7 +377,6 @@ if (!params.skip_alignment) { path: { ( ['star_salmon','hisat2'].contains(params.aligner) && ( params.save_align_intermeds || ( !params.with_umi && params.skip_markduplicates ) ) ) || params.save_align_intermeds || params.skip_markduplicates ? "${params.outdir}/${params.aligner}" : params.outdir }, - path: { "${params.outdir}/${params.aligner}" }, mode: params.publish_dir_mode, pattern: "*.{bai,csi}", saveAs: { ( ['star_salmon','hisat2'].contains(params.aligner) && @@ -662,7 +661,7 @@ if (!params.skip_alignment && params.aligner == 'star_salmon') { withName: 'NFCORE_RNASEQ:RNASEQ:BAM_SORT_STATS_SAMTOOLS:BAM_STATS_SAMTOOLS:.*' { ext.prefix = { "${meta.id}.transcriptome.sorted.bam" } publishDir = [ - path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}/samtools_stats" : params.outdir }, mode: params.publish_dir_mode, pattern: '*.{stats,flagstat,idxstats}', saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } diff --git a/workflows/rnaseq.nf b/workflows/rnaseq.nf index 178d9003a..9250125dc 100755 --- a/workflows/rnaseq.nf +++ b/workflows/rnaseq.nf @@ -364,7 +364,9 @@ workflow RNASEQ { .set { ch_strand_fastq } // Return empty channel if ch_strand_fastq.auto_strand is empty so salmon index isn't created - PREPARE_GENOME.out.fasta + PREPARE_GENOME + .out + .fasta .combine(ch_strand_fastq.auto_strand) .map { it.first() } .first()