diff --git a/CHANGELOG.md b/CHANGELOG.md index 872a049d..a06376fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [[#334]](https://github.com/nf-core/smrnaseq/pull/334) - Fix [bowtie conda version](https://github.com/nf-core/smrnaseq/issues/333) in `BOWTIE_MAP_SEQ` module - [[#335]](https://github.com/nf-core/smrnaseq/pull/335) - Final fix for [casting issue](https://github.com/nf-core/smrnaseq/issues/327) in mirtrace module - [[#337]](https://github.com/nf-core/smrnaseq/pull/337) - Fix [three_prime_adapter issue](https://github.com/nf-core/smrnaseq/issues/326), allow `auto-detect` as value +- [[#342]](https://github.com/nf-core/smrnaseq/pull/342) - Fix [phred offset issue](https://github.com/nf-core/smrnaseq/issues/341), allow specifying phred offset for FASTQ files ### Software dependencies diff --git a/docs/output.md b/docs/output.md index d2358724..10d3e677 100644 --- a/docs/output.md +++ b/docs/output.md @@ -153,7 +153,7 @@ MultiQC reports the number of reads that were removed by each of the contaminant ## miRTrace -[miRTrace](https://github.com/friedlanderlab/mirtrace) is a quality control specifically for small RNA sequencing data (smRNA-Seq). Each sample is characterized by profiling sequencing quality, read length, sequencing depth and miRNA complexity and also the amounts of miRNAs versus undesirable sequences (derived from tRNAs, rRNAs and sequencing artifacts). +[miRTrace](https://github.com/friedlanderlab/mirtrace) is a quality control specifically for small RNA sequencing data (smRNA-Seq). Each sample is characterized by profiling sequencing quality, read length, sequencing depth and miRNA complexity and also the amounts of miRNAs versus undesirable sequences (derived from tRNAs, rRNAs and sequencing artifacts). By default, the pipeline sets the PHRED-offset to the most common +33, so if you need to adjust this, use the `params.phred_offset` option to include this accordingly for your FASTQ files. **Output directory: `results/mirtrace`** diff --git a/modules/local/mirtrace.nf b/modules/local/mirtrace.nf index d9b5eb39..87526016 100644 --- a/modules/local/mirtrace.nf +++ b/modules/local/mirtrace.nf @@ -19,7 +19,6 @@ process MIRTRACE_RUN { script: // mirtrace protocol defaults to 'params.protocol' if not set - def primer = adapter ? "--adapter ${adapter}" : "" def protocol = params.protocol == 'custom' ? '' : "--protocol $params.protocol" def java_mem = '' if(task.memory){ @@ -32,7 +31,6 @@ process MIRTRACE_RUN { java $java_mem -jar \$mirtracejar/mirtrace.jar --mirtrace-wrapper-name mirtrace qc \\ --species $params.mirtrace_species \\ - $primer \\ $protocol \\ --config $mirtrace_config \\ --write-fasta \\ diff --git a/nextflow.config b/nextflow.config index 1ac5eaeb..a377a698 100644 --- a/nextflow.config +++ b/nextflow.config @@ -68,6 +68,9 @@ params { pirna = null other_contamination = null + //FASTQ handling defaults, for mirtrace + phred_offset = 33 + // References genome = null igenomes_base = 's3://ngi-igenomes/igenomes/' diff --git a/nextflow_schema.json b/nextflow_schema.json index cf2d0382..42680715 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -272,6 +272,11 @@ "type": "boolean", "description": "Save merged reads.", "default": true + }, + "phred_offset": { + "type": "integer", + "default": 33, + "description": "The PHRED quality offset to be used for any input fastq files. Default is 33, standard Illumina 1.8+ format." } } }, diff --git a/subworkflows/local/mirtrace.nf b/subworkflows/local/mirtrace.nf index d9dea8b6..528e4233 100644 --- a/subworkflows/local/mirtrace.nf +++ b/subworkflows/local/mirtrace.nf @@ -12,10 +12,11 @@ workflow MIRTRACE { //Staging the files as path() but then getting the filenames for the config file that mirtrace needs //Directly using val(reads) as in previous versions is not reliable as staging between work directories is not 100% reliable if not explicitly defined via nextflow itself + //mirtrace is a bit peculiar in parsing these config files, so looked it up in the source how its done. this way should work ch_mirtrace_config = - reads.map { adapter, ids, reads -> [ids,reads]} + reads.map { adapter, ids, reads -> [adapter, ids,reads]} .transpose() - .collectFile { id, path -> "./${path.getFileName().toString()}\n" } // operations need a channel, so, should be outside the module + .collectFile { adapter, id, path -> "./${path.getFileName().toString()},${id},${adapter},${params.phred_offset}\n" } // operations need a channel, so, should be outside the module MIRTRACE_RUN ( reads,