From 0c7400f735ee177a01a0c218b5ab29ab5e004da6 Mon Sep 17 00:00:00 2001 From: Christopher Mohr Date: Thu, 8 Feb 2024 16:22:28 +0000 Subject: [PATCH 1/5] add parameter to save aligned read optionally, use parameter to specify if merged reads should be stored --- conf/modules.config | 5 +++-- nextflow.config | 4 ++-- nextflow_schema.json | 11 +++++++++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 11c707a7..5382a1dd 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -38,7 +38,7 @@ process { path: { "${params.outdir}/cat_fastq" }, mode: params.publish_dir_mode, pattern: '*.fastq', - // enabled: params.save_merged_fastq //TODO ? implement save_merged_fastq param + enabled: params.save_merged ] } @@ -317,7 +317,8 @@ process { publishDir = [ path: { "${params.outdir}/genome_quant/bam" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, + enabled: params.save_aligned ] } diff --git a/nextflow.config b/nextflow.config index 34d26823..0382a4bf 100644 --- a/nextflow.config +++ b/nextflow.config @@ -28,6 +28,7 @@ params { mirgenedb_hairpin = null mirgenedb_gff = null mirgenedb_species = null + save_aligned = false // UMI handling with_umi = false @@ -46,7 +47,7 @@ params { fastp_min_length = 17 fastp_known_mirna_adapters = "$projectDir/assets/known_adapters.fa" save_trimmed_fail = false - save_merged = false + save_merged = true skip_fastqc = false skip_multiqc = false skip_mirdeep = false @@ -83,7 +84,6 @@ params { version = false // Config options - custom_config_version = 'master' custom_config_base = "https://raw.githubusercontent.com/nf-core/configs/${params.custom_config_version}" config_profile_description = null diff --git a/nextflow_schema.json b/nextflow_schema.json index 9a2f84a4..301f51a0 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -78,7 +78,8 @@ "skip_umi_extract": { "type": "boolean", "fa_icon": "fas fa-compress-alt", - "description": "Skip the UMI extraction from the read in case the UMIs have been moved to the headers in advance of the pipeline run." + "description": "Skip the UMI extraction from the read in case the UMIs have been moved to the headers in advance of the pipeline run.", + "default": true }, "umitools_bc_pattern": { "type": "string", @@ -184,6 +185,11 @@ "help_text": "Saving generated references means that you can use them for future pipeline runs, reducing processing times.", "fa_icon": "fas fa-save" }, + "save_aligned": { + "type": "boolean", + "fa_icon": "fas fa-download", + "description": "Save aligned reads in bam format." + }, "igenomes_ignore": { "type": "boolean", "description": "Do not load the iGenomes reference config.", @@ -254,7 +260,8 @@ }, "save_merged": { "type": "boolean", - "description": "Save merged reads." + "description": "Save merged reads.", + "default": true } } }, From 9b1994075adc3556c9a33a523eb0a4a067383738 Mon Sep 17 00:00:00 2001 From: Christopher Mohr Date: Thu, 8 Feb 2024 16:24:46 +0000 Subject: [PATCH 2/5] do not store aligned reads for test --- conf/test.config | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/test.config b/conf/test.config index e699776b..f29eb50e 100644 --- a/conf/test.config +++ b/conf/test.config @@ -27,5 +27,6 @@ params { mirtrace_species = 'hsa' protocol = 'illumina' skip_mirdeep = true + save_aligned = false } From 3faa16c01cff141fdf9de57415c66f6385ea6d81 Mon Sep 17 00:00:00 2001 From: Christopher Mohr Date: Fri, 9 Feb 2024 07:55:39 +0000 Subject: [PATCH 3/5] set save_merged to false for test profile --- conf/test.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/test.config b/conf/test.config index f29eb50e..94317d86 100644 --- a/conf/test.config +++ b/conf/test.config @@ -27,6 +27,6 @@ params { mirtrace_species = 'hsa' protocol = 'illumina' skip_mirdeep = true - save_aligned = false + save_merged = false } From 598af9415e1c10084ad156bed9ea93cf5cb19082 Mon Sep 17 00:00:00 2001 From: Christopher Mohr Date: Fri, 9 Feb 2024 08:44:05 +0000 Subject: [PATCH 4/5] add parameter for specifying whether to save aligned reads from mirna quant subworkflow --- conf/modules.config | 9 ++++++--- nextflow.config | 1 + nextflow_schema.json | 5 +++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 5382a1dd..fb26908e 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -230,7 +230,8 @@ process { publishDir = [ path: { "${params.outdir}/mirna_quant/bam/mature" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, + enabled: params.save_aligned_mirna_quant ] } withName: 'NFCORE_SMRNASEQ:SMRNASEQ:MIRNA_QUANT:BAM_STATS_MATURE:.*' { @@ -245,7 +246,8 @@ process { publishDir = [ path: { "${params.outdir}/mirna_quant/bam/hairpin" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, + enabled: params.save_aligned_mirna_quant ] } withName: 'NFCORE_SMRNASEQ:SMRNASEQ:MIRNA_QUANT:BAM_STATS_HAIRPIN:.*' { @@ -274,7 +276,8 @@ process { publishDir = [ path: { "${params.outdir}/mirna_quant/bam/seqcluster" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, + enabled: params.save_aligned_mirna_quant ] } withName: 'MIRTOP_QUANT' { diff --git a/nextflow.config b/nextflow.config index 0382a4bf..850030a0 100644 --- a/nextflow.config +++ b/nextflow.config @@ -29,6 +29,7 @@ params { mirgenedb_gff = null mirgenedb_species = null save_aligned = false + save_aligned_mirna_quant = true // UMI handling with_umi = false diff --git a/nextflow_schema.json b/nextflow_schema.json index 301f51a0..15df803b 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -190,6 +190,11 @@ "fa_icon": "fas fa-download", "description": "Save aligned reads in bam format." }, + "save_aligned_mirna_quant": { + "type": "boolean", + "default": true, + "description": "Save aligned reads in bam format of miRNA quant subworkflow." + }, "igenomes_ignore": { "type": "boolean", "description": "Do not load the iGenomes reference config.", From 7d0a74939731565f0902f60cc409b97789a58a1b Mon Sep 17 00:00:00 2001 From: Christopher Mohr Date: Fri, 9 Feb 2024 08:45:05 +0000 Subject: [PATCH 5/5] do not store aligned reads from mirna quant subworkflow in test --- conf/test.config | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/conf/test.config b/conf/test.config index 94317d86..e826354b 100644 --- a/conf/test.config +++ b/conf/test.config @@ -24,9 +24,10 @@ params { input = 'https://github.com/nf-core/test-datasets/raw/smrnaseq/samplesheet/v2.0/samplesheet.csv' fasta = 'https://github.com/nf-core/test-datasets/raw/smrnaseq/reference/genome.fa' - mirtrace_species = 'hsa' - protocol = 'illumina' - skip_mirdeep = true - save_merged = false + mirtrace_species = 'hsa' + protocol = 'illumina' + skip_mirdeep = true + save_merged = false + save_aligned_mirna_quant = false }