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

Optional-phred-scores #342

Merged
merged 10 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`**

Expand Down
2 changes: 0 additions & 2 deletions modules/local/mirtrace.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand All @@ -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 \\
Expand Down
3 changes: 3 additions & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -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/'
Expand Down
5 changes: 5 additions & 0 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
}
},
Expand Down
5 changes: 3 additions & 2 deletions subworkflows/local/mirtrace.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down