Skip to content

Commit

Permalink
Improvements to channel handling
Browse files Browse the repository at this point in the history
  • Loading branch information
apeltzer committed Jan 11, 2024
1 parent e1b232f commit 2828bd2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
7 changes: 4 additions & 3 deletions subworkflows/local/umi_dedup.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
17 changes: 12 additions & 5 deletions workflows/smrnaseq.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand All @@ -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 }
Expand Down

0 comments on commit 2828bd2

Please sign in to comment.