1
0
Fork 0
mirror of https://github.com/MillironX/taxprofiler.git synced 2024-11-25 13:29:54 +00:00
taxprofiler/subworkflows/local/shortread_preprocessing.nf

48 lines
1.8 KiB
Text
Raw Normal View History

//
// Perform read trimming and merging
//
2022-03-25 13:58:06 +00:00
include { SHORTREAD_FASTP } from './shortread_fastp'
2022-03-31 13:31:45 +00:00
include { SHORTREAD_ADAPTERREMOVAL } from './shortread_adapterremoval'
2022-10-18 15:43:16 +00:00
include { FASTQC as FASTQC_PROCESSED } from '../../modules/nf-core/fastqc/main'
include { FALCO as FALCO_PROCESSED } from '../../modules/nf-core/falco/main'
workflow SHORTREAD_PREPROCESSING {
take:
reads // [ [ meta ], [ reads ] ]
adapterlist // file
main:
2022-03-25 13:58:06 +00:00
ch_versions = Channel.empty()
ch_multiqc_files = Channel.empty()
if ( params.shortread_qc_tool == "fastp" ) {
2022-11-02 11:39:34 +00:00
ch_processed_reads = SHORTREAD_FASTP ( reads, adapterlist ).reads
2022-03-25 13:58:06 +00:00
ch_versions = ch_versions.mix( SHORTREAD_FASTP.out.versions )
ch_multiqc_files = ch_multiqc_files.mix( SHORTREAD_FASTP.out.mqc )
} else if ( params.shortread_qc_tool == "adapterremoval" ) {
2022-10-27 12:23:27 +00:00
ch_processed_reads = SHORTREAD_ADAPTERREMOVAL ( reads, adapterlist ).reads
ch_versions = ch_versions.mix( SHORTREAD_ADAPTERREMOVAL.out.versions )
ch_multiqc_files = ch_multiqc_files.mix( SHORTREAD_ADAPTERREMOVAL.out.mqc )
} else {
ch_processed_reads = reads
}
2022-10-20 14:55:57 +00:00
if (params.preprocessing_qc_tool == 'fastqc') {
2022-10-18 15:43:16 +00:00
FASTQC_PROCESSED ( ch_processed_reads )
ch_versions = ch_versions.mix( FASTQC_PROCESSED.out.versions )
ch_multiqc_files = ch_multiqc_files.mix( FASTQC_PROCESSED.out.zip )
2022-10-20 14:55:57 +00:00
} else if (params.preprocessing_qc_tool == 'falco') {
FALCO_PROCESSED ( ch_processed_reads )
ch_versions = ch_versions.mix( FALCO_PROCESSED.out.versions )
ch_multiqc_files = ch_multiqc_files.mix( FALCO_PROCESSED.out.txt )
2022-10-18 15:43:16 +00:00
}
emit:
reads = ch_processed_reads // channel: [ val(meta), [ reads ] ]
versions = ch_versions // channel: [ versions.yml ]
mqc = ch_multiqc_files
}