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

Add ability to skip fastq/falco #325

Merged
merged 3 commits into from
Jul 15, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#303](https://github.com/nf-core/taxprofiler/pull/303) Add support for taxpasta profile standardisation in single sample pipeline runs (❤️ to @artur-matysik for request, added by @jfy133)
- [#315](https://github.com/nf-core/taxprofiler/pull/315) Updated to nf-core pipeline template v2.9 (added by @sofstam & @jfy133)
- [#319](https://github.com/nf-core/taxprofiler/pull/319) Added support for virus hit expansion in Kaiju (❤️ to @dnlrxn for requesting, added by @jfy133)
- [#323](https://github.com/nf-core/taxprofiler/pull/323) Add ability to skip sequencing quality control tools (❤️ to @vinisalazar for requesting, added by @jfy133)

### `Fixed`

Expand Down
1 change: 1 addition & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ params {
databases = null

// FASTQ preprocessing
skip_preprocessing_qc = false
preprocessing_qc_tool = 'fastqc'

perform_shortread_qc = false
Expand Down
6 changes: 6 additions & 0 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@
"description": "Common options across both long and short read preprocessing QC steps",
"default": "",
"properties": {
"skip_preprocessing_qc": {
"type": "boolean",
"fa_icon": "fas fa-forward",
"description": "Specify to skip sequencing quality control of raw sequencing reads",
"help": "Skipping running of FastQC or Falco maybe useful in cases where you are already running with preprocessed data (e.g. you are also skipping short/long read qc steps) that you already know the quality of"
},
"preprocessing_qc_tool": {
"type": "string",
"default": "fastqc",
Expand Down
36 changes: 20 additions & 16 deletions workflows/taxprofiler.nf
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,16 @@ workflow TAXPROFILER {
*/
ch_input_for_fastqc = INPUT_CHECK.out.fastq.mix( INPUT_CHECK.out.nanopore )

if ( params.preprocessing_qc_tool == 'falco' ) {
FALCO ( ch_input_for_fastqc )
ch_versions = ch_versions.mix(FALCO.out.versions.first())
} else {
FASTQC ( ch_input_for_fastqc )
ch_versions = ch_versions.mix(FASTQC.out.versions.first())
if ( !params.skip_preprocessing_qc ) {
if ( params.preprocessing_qc_tool == 'falco' ) {
FALCO ( ch_input_for_fastqc )
ch_versions = ch_versions.mix(FALCO.out.versions.first())
} else {
FASTQC ( ch_input_for_fastqc )
ch_versions = ch_versions.mix(FASTQC.out.versions.first())
}
}

/*
SUBWORKFLOW: PERFORM PREPROCESSING
*/
Expand Down Expand Up @@ -281,18 +284,19 @@ workflow TAXPROFILER {
ch_multiqc_files = ch_multiqc_files.mix(ch_methods_description.collectFile(name: 'methods_description_mqc.yaml'))
ch_multiqc_files = ch_multiqc_files.mix(CUSTOM_DUMPSOFTWAREVERSIONS.out.mqc_yml.collect())

if ( params.preprocessing_qc_tool == 'falco' ) {
// only mix in files actually used by MultiQC
ch_multiqc_files = ch_multiqc_files.mix(FALCO.out.txt
.map { meta, reports -> reports }
.flatten()
.filter { path -> path.name.endsWith('_data.txt')}
.ifEmpty([]))
} else {
ch_multiqc_files = ch_multiqc_files.mix(FASTQC.out.zip.collect{it[1]}.ifEmpty([]))
if ( !params.skip_preprocessing_qc ) {
if ( params.preprocessing_qc_tool == 'falco' ) {
// only mix in files actually used by MultiQC
ch_multiqc_files = ch_multiqc_files.mix(FALCO.out.txt
.map { meta, reports -> reports }
.flatten()
.filter { path -> path.name.endsWith('_data.txt')}
.ifEmpty([]))
} else {
ch_multiqc_files = ch_multiqc_files.mix(FASTQC.out.zip.collect{it[1]}.ifEmpty([]))
}
}


if (params.perform_shortread_qc) {
ch_multiqc_files = ch_multiqc_files.mix( SHORTREAD_PREPROCESSING.out.mqc.collect{it[1]}.ifEmpty([]) )
}
Expand Down
Loading