Skip to content

Commit

Permalink
Merge pull request #63 from nf-core/feature/nf-core_subworkflows
Browse files Browse the repository at this point in the history
Workflow updates
  • Loading branch information
matthdsm authored Oct 13, 2022
2 parents ddefe50 + 9714133 commit 241ecda
Show file tree
Hide file tree
Showing 20 changed files with 433 additions and 285 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@
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).

## v1.1.0dev

### `Added`

- [#63](https://github.com/nf-core/demultiplex/pull/63) Replace local bcl_demultiplex subworkflow with nf-core version
- [#63](https://github.com/nf-core/demultiplex/pull/63) Add bases_demultiplex local subworkflow
- [#63](https://github.com/nf-core/demultiplex/pull/63) Replace fastqc with falco for speedier QC, fixes Replace fastqc with falco #62
- [#64](https://github.com/nf-core/demultiplex/pull/64) Add subway map by @nvnieuwk

### `Fixed`

- [#63](https://github.com/nf-core/demultiplex/pull/63) Fix MultiQC report inputs, fixes MultiQC report is empty #64

## v1.0.0 - 2022-10-06

Initial release of nf-core/demultiplex, created with the [nf-core](https://nf-co.re/) template.
Expand Down
2 changes: 1 addition & 1 deletion CITATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

> Chen S, Zhou Y, Chen Y, Gu J. fastp: an ultra-fast all-in-one FASTQ preprocessor. Bioinformatics. 2018 Sep 1;34(17):i884-i890. doi: 10.1093/bioinformatics/bty560. PubMed PMID: 30423086; PubMed Central PMCID: PMC6129281.
- [FastQC](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/)
- [Falco](https://github.com/smithlabcode/falco)

- [MultiQC](https://pubmed.ncbi.nlm.nih.gov/27312411/)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ On release, automated continuous integration tests run the pipeline on a full-si
- [bcl2fastq](#bcl2fastq) - converting bcl files to fastq, and demultiplexing (CONDITIONAL)

2. [fastp](#fastp) - Adapter and quality trimming
3. [FastQC](#fastqc) - Raw read QC
3. [Falco](#falco) - Raw read QC
4. [md5sum](#md5sum) - Creates an MD5 (128-bit) checksum of every fastq.
5. [MultiQC](#multiqc) - aggregate report, describing results of the whole pipeline

Expand Down
3 changes: 3 additions & 0 deletions assets/multiqc_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ report_section_order:
order: -1002

export_plots: true
sp:
fastqc/data:
fn: "*_fastqc_data.txt"
6 changes: 1 addition & 5 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ process {
}

withName: BCLCONVERT {
ext.when = { params.demultiplexer == "bclconvert" }
ext.args = {[
meta.lane ? "--bcl-only-lane ${meta.lane}" : "",
"--force",
Expand Down Expand Up @@ -62,7 +61,6 @@ process {
}

withName: BCL2FASTQ {
ext.when = { params.demultiplexer == "bcl2fastq" }
ext.args = {[
meta.lane ? "--tiles s_${meta.lane}" : "",
].join(" ").trim()}
Expand Down Expand Up @@ -97,7 +95,6 @@ process {
}

withName: CELLRANGER_MKFASTQ {
ext.when = { params.demultiplexer == "cellranger" }
publishDir = [
path: { "${params.outdir}/fastq" },
mode: params.publish_dir_mode,
Expand All @@ -106,7 +103,6 @@ process {
}

withName: BASES2FASTQ {
ext.when = { params.demultiplexer == "bases2fastq" }
ext.args = "--strict"
publishDir = [
[
Expand Down Expand Up @@ -138,7 +134,7 @@ process {
]
}

withName: FASTQC {
withName: FALCO {
publishDir = [
path: { "${params.outdir}/${meta.fcid}" },
mode: params.publish_dir_mode,
Expand Down
11 changes: 6 additions & 5 deletions docs/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The pipeline is built using [Nextflow](https://www.nextflow.io/) and processes d
- [bases2fastq](#bases2fastq) - converting bases files to fastq, and demultiplexing (CONDITIONAL)
- [bcl2fastq](#bcl2fastq) - converting bcl files to fastq, and demultiplexing (CONDITIONAL)
- [fastp](#fastp) - Adapter and quality trimming
- [FastQC](#fastqc) - Raw read QC
- [Falco](#falco) - Raw read QC
- [md5sum](#md5sum) - Creates an MD5 (128-bit) checksum of every fastq.
- [MultiQC](#multiqc) - aggregate report, describing results of the whole pipeline

Expand Down Expand Up @@ -72,20 +72,21 @@ The pipeline is built using [Nextflow](https://www.nextflow.io/) and processes d

![MultiQC - fastp filtered reads plot](images/mqc_fastp_plot.png)

### FastQC
### Falco

<details markdown="1">
<summary>Output files</summary>

- `<flowcell_id>/`
- `*_fastqc.html`: FastQC report containing quality metrics.
- `*_fastqc.zip`: Zip archive containing the FastQC report, tab-delimited data file and plot images.
- `*_fastqc.txt`: Txt containing the FastQC report, tab-delimited data file.
- `*_summary.txt`: Txt containing the summary metrics.

> **NB:** The FastQC plots in this directory are generated relative to the raw, input reads. They may contain adapter sequence and regions of low quality. To see how your reads look after adapter and quality trimming please refer to the FastQC reports in the `trimgalore/fastqc/` directory.
> **NB:** The FastQC plots in this directory are generated relative to the raw, demultiplexed reads. They may contain adapter sequence and regions of low quality.
</details>

[FastQC](http://www.bioinformatics.babraham.ac.uk/projects/fastqc/) gives general quality metrics about your sequenced reads. It provides information about the quality score distribution across your reads, per base sequence content (%A/T/G/C), adapter contamination and overrepresented sequences. For further reading and documentation see the [FastQC help pages](http://www.bioinformatics.babraham.ac.uk/projects/fastqc/Help/).
[Falco](https://github.com/smithlabcode/falco) gives general quality metrics about your sequenced reads. It provides information about the quality score distribution across your reads, per base sequence content (%A/T/G/C), adapter contamination and overrepresented sequences.

![MultiQC - FastQC sequence counts plot](images/mqc_fastqc_counts.png)

Expand Down
59 changes: 59 additions & 0 deletions lib/FormattingService.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/**
* MIT License
*
* Copyright (c) 2022 Moritz E. Beber
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

import static groovy.json.JsonOutput.prettyPrint
import groovy.json.JsonGenerator
import java.nio.file.Path
import java.time.OffsetDateTime
import nextflow.util.Duration

/**
* Define a service that formats objects for printing.
*
* @author Moritz E. Beber
*/
class FormattingService {

/**
* Define a JSON generator with appropriate converters for problematic types.
*/
protected static JsonGenerator generator = new JsonGenerator.Options()
.dateFormat("yyyy-MM-dd'T'HH:mm:ssXXX")
.addConverter(OffsetDateTime) { OffsetDateTime offset -> offset.toString() }
.addConverter(Duration) { Duration duration -> duration.toString() }
.addConverter(Path) { Path filename -> filename.toString() }
.build()

/**
* Create a pretty string format of a given object using JSON.
*
* @param object The given object (typically a map) that is to be represented as a
* JSON-like pretty string.
* @return A JSON string.
*/
static String prettyFormat(Object object) {
return prettyPrint(generator.toJson(object))
}

}
16 changes: 12 additions & 4 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"nf-core": {
"bases2fastq": {
"branch": "master",
"git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905"
"git_sha": "f67b13d71bad1a1d805283b9537449141dff384e"
},
"bcl2fastq": {
"branch": "master",
Expand All @@ -21,11 +21,11 @@
"branch": "master",
"git_sha": "8022c68e7403eecbd8ba9c49496f69f8c49d50f0"
},
"fastp": {
"falco": {
"branch": "master",
"git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905"
"git_sha": "fc959214036403ad83efe7a41d43d0606c445cda"
},
"fastqc": {
"fastp": {
"branch": "master",
"git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905"
},
Expand All @@ -42,6 +42,14 @@
"git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905"
}
}
},
"subworkflows": {
"nf-core": {
"bcl_demultiplex": {
"branch": "master",
"git_sha": "cc980fb6f3931cb02fbae41ebd0cece34c7638f4"
}
}
}
}
}
Expand Down
42 changes: 0 additions & 42 deletions modules/nf-core/bases2fastq/bases2fastq.diff

This file was deleted.

21 changes: 8 additions & 13 deletions modules/nf-core/bases2fastq/main.nf

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

57 changes: 57 additions & 0 deletions modules/nf-core/falco/main.nf

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

Loading

0 comments on commit 241ecda

Please sign in to comment.