Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### `Added`

- []() - Add skip_fastqc switch to turn off FastQC reporting (by @jorondo1)

- [#1006](https://github.com/nf-core/mag/pull/1006) - Add citations and references texts in the `utils_nfcore_mag_pipeline` subworkflow (by @dialvarezs)

### `Changed`
Expand Down
2 changes: 2 additions & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ params {
adapterremoval_trim_quality_stretch = false
keep_phix = false
skip_shortread_qc = false
skip_fastqc = false

// long read preprocessing options
longread_adaptertrimming_tool = "porechop_abi"
longread_filtering_tool = "filtlong"
Expand Down
7 changes: 6 additions & 1 deletion nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,12 @@
"skip_shortread_qc": {
"type": "boolean",
"description": "Skip all default QC steps for short reads (adapter trimming, phiX removal).",
"help": "Skips clipping and removal of phiX sequences. Does not affect host sequence removal as this is opt in."
"help": "Skips clipping and removal of phiX sequences. Does not affect host sequence removal as this is opt in. Does not prevent FastQC from running if host removal is enabled."
},
"skip_fastqc": {
"type": "boolean",
"description": "Skip running FastQC on short reads both before and after QC.",
"help": "Skips running FastQC on short reads. Most metrics are redundant with fastp reports, but some metrics are not available in fastp. This option is useful to save time and resources when running the pipeline."
},
"save_phixremoved_reads": {
"type": "boolean",
Expand Down
28 changes: 17 additions & 11 deletions subworkflows/local/preprocessing_shortread/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,17 @@ workflow SHORTREAD_PREPROCESSING {
ch_host_genome_index // path(fasta) (optional)
ch_phix_db_file // [val(meta), path(fasta)] (optional)
val_skip_qc // val(boolean)
val_skip_fastqc // val(boolean)

main:
ch_versions = channel.empty()
ch_multiqc_files = channel.empty()

FASTQC_RAW(ch_raw_short_reads)
ch_versions = ch_versions.mix(FASTQC_RAW.out.versions)
ch_multiqc_files = ch_multiqc_files.mix(FASTQC_RAW.out.zip)
if (!val_skip_fastqc) {
FASTQC_RAW(ch_raw_short_reads)
ch_versions = ch_versions.mix(FASTQC_RAW.out.versions)
ch_multiqc_files = ch_multiqc_files.mix(FASTQC_RAW.out.zip)
}

if (!params.skip_clipping && !val_skip_qc) {
if (params.clip_tool == 'fastp') {
Expand Down Expand Up @@ -148,16 +151,19 @@ workflow SHORTREAD_PREPROCESSING {

/**
* Conditions for *not* running FASTQC_TRIMMED:
* - No host removal and skip_qc (params.skip_shortread_qc)
* - Skip fastqc (params.skip_fastqc)
* - No host removal, skip_qc (params.skip_shortread_qc)
* - No host removal and *both* --keep_phix --skip_clipping
*/
if (!(val_skip_qc && !(params.host_fasta || params.host_genome))) {
if (!(params.keep_phix && params.skip_clipping && !(params.host_genome || params.host_fasta))) {
FASTQC_TRIMMED(
ch_short_reads_phixremoved
)
ch_versions = ch_versions.mix(FASTQC_TRIMMED.out.versions)
ch_multiqc_files = ch_multiqc_files.mix(FASTQC_TRIMMED.out.zip)
if (!val_skip_fastqc) {
if (!(val_skip_qc && !(params.host_fasta || params.host_genome))) {
if (!(params.keep_phix && params.skip_clipping && !(params.host_genome || params.host_fasta))) {
FASTQC_TRIMMED(
ch_short_reads_phixremoved
)
ch_versions = ch_versions.mix(FASTQC_TRIMMED.out.versions)
ch_multiqc_files = ch_multiqc_files.mix(FASTQC_TRIMMED.out.zip)
}
}
}

Expand Down
1 change: 1 addition & 0 deletions workflows/mag.nf
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ workflow MAG {
ch_host_bowtie2index,
ch_phix_db_file,
params.skip_shortread_qc,
params.skip_fastqc,
)
ch_versions = ch_versions.mix(SHORTREAD_PREPROCESSING.out.versions)
ch_multiqc_files = ch_multiqc_files.mix(
Expand Down
Loading