From 2828bd2a05dc1d6282dfaa5f4d7a5be96482ae18 Mon Sep 17 00:00:00 2001 From: Alexander Peltzer Date: Thu, 11 Jan 2024 14:16:18 +0000 Subject: [PATCH] Improvements to channel handling --- subworkflows/local/umi_dedup.nf | 7 ++++--- workflows/smrnaseq.nf | 17 ++++++++++++----- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/subworkflows/local/umi_dedup.nf b/subworkflows/local/umi_dedup.nf index 8712f526..5a5a393f 100644 --- a/subworkflows/local/umi_dedup.nf +++ b/subworkflows/local/umi_dedup.nf @@ -5,9 +5,10 @@ include { INDEX_GENOME } from '../../modules/local/bowtie_genome' include { BOWTIE_MAP_SEQ as UMI_MAP_GENOME } from '../../modules/local/bowtie_map_mirna' include { BAM_SORT_STATS_SAMTOOLS } from '../../subworkflows/nf-core/bam_sort_stats_samtools' -include { UMITOOLS_DEDUP } from '../../modules/nf-core/modules/umitools/dedup/main' -include { SAMTOOLS_BAM2FQ } from '../../modules/nf-core/modules/samtools/bam2fq/main' -include { CAT_CAT } from '../../modules/nf-core/modules/cat/cat/main' +include { UMITOOLS_DEDUP } from '../../modules/nf-core/umitools/dedup/main' +include { SAMTOOLS_BAM2FQ } from '../../modules/nf-core/samtools/bam2fq/main' +include { CAT_CAT } from '../../modules/nf-core/cat/cat/main' + workflow DEDUPLICATE_UMIS { take: diff --git a/workflows/smrnaseq.nf b/workflows/smrnaseq.nf index 04529c63..250f1991 100644 --- a/workflows/smrnaseq.nf +++ b/workflows/smrnaseq.nf @@ -137,14 +137,21 @@ workflow SMRNASEQ { FASTQ_FASTQC_UMITOOLS_FASTP ( ch_cat_fastq, - params.skip_fastqc || params.skip_qc, + params.skip_fastqc, params.with_umi, + params.skip_umi_extract, + params.umi_discard_read, params.skip_trimming, - params.umi_discard_read + params.umi_discard_read, + params.skip_trimming, + params.adapter_fasta, + params.save_trimmed_fail, + params.save_merged, + params.min_trimmed_reads ) ch_versions = ch_versions.mix(FASTQ_FASTQC_UMITOOLS_FASTP.out.versions) - reads_for_mirna = FASTQ_FASTQC_UMITOOLS_FASTP.out.reads + reads_for_mirna = FASTQ_FASTQC_UMITOOLS_FASTP.out.trim_reads // // SUBWORKFLOW: Deduplicate UMIs by mapping them to the genome @@ -155,7 +162,7 @@ workflow SMRNASEQ { DEDUPLICATE_UMIS ( fasta_ch, bt_index, - FASTQC_UMITOOLS_FASTP.out.reads + FASTQC_UMITOOLS_FASTP.out.trim_reads ) reads_for_mirna = DEDUPLICATE_UMIS.out.reads ch_versions = ch_versions.mix(DEDUPLICATE_UMIS.out.versions) @@ -167,7 +174,7 @@ workflow SMRNASEQ { // SUBWORKFLOW: mirtrace QC // FASTQ_FASTQC_UMITOOLS_FASTP.out.adapterseq - .join( FASTQC_FASTP.out.reads ) + .join( FASTQ_FASTQC_UMITOOLS_FASTP.out.reads ) .map { meta, adapterseq, reads -> [adapterseq, meta.id, reads] } .groupTuple() .set { ch_mirtrace_inputs }