From fa0b5e5eafd6cdb40d64437cc524325504fbda50 Mon Sep 17 00:00:00 2001 From: Mia Croiset <mia.croiset@ens-lyon.fr> Date: Tue, 13 Jun 2023 14:47:39 +0200 Subject: [PATCH] correct subworkflow filter pcr dup --- conf/hicstuff.config | 1 + subworkflows/local/hicstuff_sub.nf | 36 +++++------------------------- 2 files changed, 7 insertions(+), 30 deletions(-) diff --git a/conf/hicstuff.config b/conf/hicstuff.config index 3f5cdf6..f036e4c 100644 --- a/conf/hicstuff.config +++ b/conf/hicstuff.config @@ -350,6 +350,7 @@ profiles { } docker { docker.enabled = true + docker.registry = 'quay.io' docker.userEmulation = true singularity.enabled = false podman.enabled = false diff --git a/subworkflows/local/hicstuff_sub.nf b/subworkflows/local/hicstuff_sub.nf index 221d646..28d383e 100644 --- a/subworkflows/local/hicstuff_sub.nf +++ b/subworkflows/local/hicstuff_sub.nf @@ -8,11 +8,7 @@ include { BUILD_MATRIX_COOL_ALT } from '../../modules/local/hicstuff/build_matri include { FILTER_EVENT } from '../../modules/local/hicstuff/filter_event' include { DISTANCE_LAW } from '../../modules/local/hicstuff/distance_law' include { FILTER_PCR } from '../../modules/local/hicstuff/filter_pcr' -include { SAMTOOLS_SORT } from '../../modules/nf-core/custom/samtools/sort/main' -include { SAMTOOLS_SORT_N } from '../../modules/nf-core/custom/samtools_n/sort/main' -include { FILTER_PAIR } from '../../modules/local/filterbam/main' -include { SAMTOOLS_INDEX } from '../../modules/nf-core/custom/samtools/index/main' -include { PICARD_MARKDUPLICATES } from '../../modules/nf-core/custom/picard/markduplicates/main' +include { FILTER_PCR_DUP } from './filter_pcr_dup' // Paired-end to Single-end def pairToSingle(row, mates) { @@ -65,32 +61,12 @@ workflow HICSTUFF_SUB { error "Error: filter_pcr and filter_pcr_picard can't both be true at the same time! Set one of them false in the config file" } else if (params.filter_pcr_picard){ - SAMTOOLS_SORT( - BOWTIE2_ALIGNMENT.out.bam + FILTER_PCR_DUP( + BOWTIE2_ALIGNMENT.out.bam, + fasta, + index ) - - - PICARD_MARKDUPLICATES( - SAMTOOLS_SORT.out.bam, - fasta.collect(), - index.collect() - ) - - SAMTOOLS_SORT_N( - PICARD_MARKDUPLICATES.out.bam - ) - - SAMTOOLS_SORT_N.out.bam.set{ ch_bam } - - FILTER_PAIR( - ch_bam.combine(ch_bam) - .map { - meta1, bam1, meta2, bam2 -> - meta1.id == meta2.id && meta1.chunk == meta2.chunk && meta1.mates == "R1" && meta2.mates == "R2" ? [ meta1, bam1, meta2, bam2 ] : null - }) - - FILTER_PAIR.out.bam.set{ new_ch_bam } - + FILTER_PCR_DUP.out.bam.set{ new_ch_bam } } else { -- GitLab